News for hackers. Stuff that matters.
Re:SocketCluster – WebSockets that scale to 100K messages pe... by alecsmart1 on Thursday May 08, 2014 @12:49AM (#7713992)
From their readme-

"The test was only set to reach up to 100 concurrent connections (each sending 1000 messages per second) - Total of 100K messages per second."

So they had only 100 concurrent connections.

Re:SocketCluster – WebSockets that scale to 100K messages pe... by denizozger on Tuesday May 13, 2014 @11:59AM (#7738795)
Number of connections, message size, and frequency of messages sent are three main parameters to measure performance, and for some frameworks like Engine.IO, number of connections seems to have the biggest impact on performance (https://medium.com/node-js-javascript/b63bfca0539). It would be good to see the benchmarks with much higher number of connections, as non-blocking IO is usually why people choose Node.js platform.
Re:SocketCluster – WebSockets that scale to 100K messages pe... by teacup50 on Wednesday May 07, 2014 @07:41PM (#7713217)
Is 100K mps on 8 cores considered high for node/websockets microbenchmarking of the socket path?

That doesn't seem like much from past experience writing high-throughput messaging code, and all this is doing is spitting out length-framed messages to a socket.

Re:SocketCluster – WebSockets that scale to 100K messages pe... by bhauer on Wednesday May 07, 2014 @09:04PM (#7713459)
We do not (yet) measure the performance of Websocket in our project (the TechEmpower framework benchmarks), but our "Plaintext" test is a rough analogue to a ping-pong test on Websocket. Our Plaintext test uses HTTP pipelining on a keep-alive connection. However, in our case, each request is sending a couple hundred bytes of HTTP request headers and receiving about the same in response HTTP headers prior to a "Hello world" payload.

We see approximately 600,000 of these HTTP "messages" per second on a i7-2600K 8 HT core workstation [1] from top performers such as Netty and Undertow and these top performers are network limited by our gigabit Ethernet.

We are using Undertow for a Websocket project presently and its performance there has been very good.

[1] http://www.techempower.com/benchmarks/#section=data-r9&hw=i7...

Re:SocketCluster – WebSockets that scale to 100K messages pe... by bilbo0s on Wednesday May 07, 2014 @07:59PM (#7713280)
It's not high at all.

I have never worked with node though... so maybe it's ... sort of ... "fast for node". Not fast in absolute terms.

Re:SocketCluster – WebSockets that scale to 100K messages pe... by Pacabel on Wednesday May 07, 2014 @08:00PM (#7713284)
That's what I was thinking, too. That's merely around 13,000 messages per second per core. Rates like that weren't all that impressive on low end server hardware a decade ago, so I'd hope that it's even less impressive today when using more modern hardware (or even VMs).
Re:SocketCluster – WebSockets that scale to 100K messages pe... by zoomerang on Wednesday May 07, 2014 @10:09PM (#7713624)
I'd be expecting more in the realm of millions of messages per second, at least from a Java solution.
Re:SocketCluster – WebSockets that scale to 100K messages pe... by limsup on Wednesday May 07, 2014 @07:58PM (#7713278)
Can you give some numbers of your past experience?
Re:SocketCluster – WebSockets that scale to 100K messages pe... by brianwawok on Wednesday May 07, 2014 @08:30PM (#7713358)
Not OP, but a solar flare can shoot 20 million packets per second..

http://www.solarflare.com/09-11-12-Solarflares-Industry-Lead...

You need to totally bypass the linux kernel to do this, and have high perf C or Java code...

Re:SocketCluster – WebSockets that scale to 100K messages pe... by chmod775 on Wednesday May 07, 2014 @08:51PM (#7713425)
That's raw network (TCP/UDP) packets, not WebSocket frames/messages. Plus that product is a solution to a hardware problem, not a software problem. It doesn't relate at all.
Re:SocketCluster – WebSockets that scale to 100K messages pe... by pktgen on Thursday May 08, 2014 @04:54AM (#7714452)
Just for anyone else who sees that and thinks "WTF": it's 20M PPS across two ports. (14,880,952 is the max for 10GbE.)
Re:SocketCluster – WebSockets that scale to 100K messages pe... by lacksconfidence on Wednesday May 07, 2014 @06:39PM (#7713025)
This is interesting, how does it compare to using nginx(or another proxy) in front of multiple socket.io instances on the same machine?
Re:SocketCluster – WebSockets that scale to 100K messages pe... by jonpress on Wednesday May 07, 2014 @11:53PM (#7713886)
I wrote SocketCluster. I haven't tried that yet, it would definitely be interesting to test.
Re:SocketCluster – WebSockets that scale to 100K messages pe... by tracker1 on Thursday May 08, 2014 @02:34AM (#7714169)
I'd be interested in seeing how difficult it would be to modify this to use multiple communication servers (redis, cassandra, etc) so that it can be scaled across multiple instances.

Would also be interested in seeing how many connections it could handle doing say 5-10 messages per second.

Re:SocketCluster – WebSockets that scale to 100K messages pe... by johtso on Thursday May 08, 2014 @06:08AM (#7714593)
There's also sockjs (http://sockjs.org) which has some rather impressive benchmark results when using the python/tornado server with PyPy (http://mrjoes.github.io/2011/12/15/sockjs-bench.html). 155,000-195,000 messages per second on a single core.
Re:SocketCluster – WebSockets that scale to 100K messages pe... by Rauchg on Thursday May 08, 2014 @12:14AM (#7713925)
It'd be nice to compare it with: https://github.com/automattic/socket.io-redis

I wrote an example application using it here: https://github.com/guille/weplay

Re:SocketCluster – WebSockets that scale to 100K messages pe... by alecsmart1 on Thursday May 08, 2014 @12:50AM (#7713995)
How many simultaneous connections are you able to achieve?
Re:SocketCluster – WebSockets that scale to 100K messages pe... by denizozger on Wednesday May 07, 2014 @07:44PM (#7713232)
Why does each worker need a seperate store process? It seems on an 8 core machine max worker count can only be 3 (1 master, 3 workers, 3 stores). If workers had in-memory stores -or at least connect to a Redis server-, with 4 more workers performance should increase.
Re:SocketCluster – WebSockets that scale to 100K messages pe... by jonpress on Wednesday May 07, 2014 @09:41PM (#7713561)
They don't. You can have fewer stores than workers. In the benchmark, we could in fact do with very few stores because they are not really used. I'm sure you could fiddle with the worker, load balancer and store count to get better performance (it depends on the system's requirements).
Re:SocketCluster – WebSockets that scale to 100K messages pe... by knodi on Wednesday May 07, 2014 @09:06PM (#7713470)
node is single threaded
Re:SocketCluster – WebSockets that scale to 100K messages pe... by denizozger on Wednesday May 07, 2014 @09:08PM (#7713475)
I'm aware, and what's the relevance? I didn't even mention threads.
Re:SocketCluster – WebSockets that scale to 100K messages pe... by AYBABTME on Thursday May 08, 2014 @01:58AM (#7714114)
You can't use more than 1 core with a unique node process. So they spawn n cores for n processes. With a multithreaded runtime, this would not be required.
Re:SocketCluster – WebSockets that scale to 100K messages pe... by denizozger on Thursday May 08, 2014 @10:35AM (#7715481)
Yes exactly. My suggestion was the application to fork (CPUs - 1) workers, ie. 1 master 7 workers, instead of 1 master 3 workers and 3 stores, and have workers manage their key-value stores. Apparently each worker don't need a store, see author's comment (https://news.ycombinator.com/item?id=7713561) so it looks good.
Re:SocketCluster – WebSockets that scale to 100K messages pe... by trungonnews on Wednesday May 07, 2014 @09:38PM (#7713555)
Do you think Golang can handle more connections than NodeJS?