the titel says it all - is there a maximum size for an event (or message) i want to send from the server to the client?
i want to send a json string to the client and it looks something like this:
[{"id":"4e25434f0f110ec101000005","media":"4fb135d508e972664c5adf3.jpg"},
{"id":"4e2545f30f110ec101000021","media":"d09b745414e251695aa33e04.jpg"},
{"id":"4e2554ce7bcfb24702000012","media":"076eea872411e433b9.png"},
{"id":"4e255bc4f34a41cb02000010","media":"c2af3db4707db3ece.png"}]
if the array would contain e.g. 200 items, would this crash?!
The main reason for this large difference is that the browser limits the number of concurrent HTTP connections (6 by default in Chrome), while there is no limitation how many messages a websocket connection can send or receive.
Once you reboot your machine, you will now be able to happily go to 55k concurrent connections (per incoming IP).
"The Socket.IO server currently has some problems with scaling up to more than 10K simultaneous client connections when using multiple processes and the Redis store, and the client has some issues that can cause it to open multiple connections to the same server, or not know that its connection has been severed."
Socket.IO requires a lot of memory which is a potential problem. SockJS does not scale well at all and does not manage the same level of concurrency as the other two.
I dont think that will crash as node.js has an inbuilt nagle algorithm (if u havent disabled it) which buffers the data before sending it .
http://www.nodejs.org/docs/v0.5.1/api/net.html#socket.setNoDelay
Node.js alone can handle it easily for benchmarking purposes i have sent 800kb data in a chunk (random flush) . it took a lot of time to recieve on other side but was sent successfully.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With