Scalability: Socket.IO vs Server Sent Events

1,267 views
Skip to first unread message

Running Turtle

unread,
Jul 12, 2011, 5:17:59 PM7/12/11
to Socket.IO
Hello,

I read somewhere that a single nodejs process could handle only up to
6 thousand concurrent websocket clients on a standard hardware
configuration. Is this more or less correct ?

Also, putting aside the other differences (browser compatibility,
single vs bi-directional, etc), is it fair to assume that an
application based on server sent events would scale much more easily
than with websockets ?

Thanks

Arnout Kazemier

unread,
Jul 12, 2011, 6:23:39 PM7/12/11
to sock...@googlegroups.com
You probably read it wrong. One single node process should be able to allocate more than 100k (at a minimum) node plain concurrent requests.
But those numbers always depends on the application that is build on top of it, and which hardware you are using.

SSE vs WebSockets
It really depends on what you are trying to do here, there will be slightly more overhead for websockets because they need to be parsed down
to follow the websocket protocol and need handle the handshaking of the server. While SSE just sends plain text over the wire. But the downside
of SSE is that it's not bidirectional so if you need to send messages to the server you will need open a new connection, post data and close it.
WebSockets just work.

Side note:
Socket.IO 0.7 has been designed from the ground up to scale across multiple processes. So it will scale once we finished work on the redis store.

Reply all
Reply to author
Forward
0 new messages