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.
[ Parent
| on HN ]
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.