2

暂且不说 IE 不支持 SSE,如果有大量客户端,Server-Sent Events 或 SignalR 性能会更好吗?

4

2 回答 2

4

One thing to bear in mind is that, under the hood, SignalR will default to the best available method of sending/receiving data e.g. Ajax long polling, server side events, web sockets.

The decision is based on attributes such as the browser in use, plus the web server (e.g. IIS8 has support for web sockets, so SignalR will use those if also the user's browser supports it). What I'm saying is that, SignalR can support many ways of creating a connection, there is no one way available. If you use server side events, then SignalR can also use them, or the next best thing which is web sockets.

So to say which is best isn't a fair question in hindsight.

EDIT: Extract from this article:

Though SignalR tries to choose the "best" connection supported by the server and client...

于 2013-08-28T20:24:24.363 回答
0

我不会进行比较,但至少,Rick Strahl 对 SignalR 的性能感到惊讶,即使他每秒发送数百条消息也无法使其过载:

http://www.west-wind.com/weblog/posts/2013/May/22/A-first-look-at-SignalR

于 2013-08-28T20:04:11.227 回答