Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any benchmarks showing how many Comet requests per second can be handled by Node.js 0.6.8?

The reason I'm asking is that this post

http://amix.dk/blog/post/19577

Indicates that Node.js 0.2.2 seems to have a threshold of 500/s and is outperformed 10x by Netty. In the comments, Ryan Dahl indicates that it was possibly because of a bug which has been subsequently fixed. However I cannot find in the remainder of the post or elsewhere any confirmation that the issue was resolved and if so updated benchmarks. We are now many versions ahead of the one referenced above and I'm wondering if there are any benchmarks, formal or otherwise pertaining to Comet requests/second.

If there are no benchmarks, it would be good to know in general terms whether the issue flagged by Amir is still outstanding. 500 comet/second is a threshhold that could be reached by a modest sized chat/game focused site.

like image 546
deltanovember Avatar asked Nov 04 '22 07:11

deltanovember


1 Answers

node.js has come a long long way from 0.2.2. It seems likely there were also implementation issues with the architecture being discussed in the linked post, as comments suggest they did not consider using multiple node processes with a load balancer.

This is clearly a necessity for high performance applications -- indeed, the last paragraph of the node.js official about section reads:

But what about multiple-processor concurrency? Aren't threads necessary to scale programs to multi-core computers? You can start new processes via child_process.fork() these other processes will be scheduled in parallel. For load balancing incoming connections across multiple processes use the cluster module.

Now, considering that a single node 0.2.2 process used %10 of the resources of Netty (as is mentioned in the OP linked post), then they could have run 10 node processes on the same hardware, which begs the question: If Netty is 10x faster than node, but uses 10x the resources, then wasn't their performance actually the same? Meanwhile, node's performance has been drastically improved in the >=0.6.0 releases, especially on machines running Windows, which is now supported natively. See the Windows benchmarks from the 0.6.0 release notes:

The http benchmark was done with 600 clients on a 10GE network served from three load generation machines.

                            v0.4.12 (windows)   v0.6.0 (windows)
http_simple.js /bytes/1024  3858 r/s            5823 r/s
io.js read                  12.41 mB/s          26.51 mB/s
io.js write                 12.61 mB/s          33.58 mB/s
startup.js                  152.81 ms           52.04 ms

Meanwhile, though nobody seems to want to talk about what exactly they're doing, it seems some of the highest traffic tech players are turning to node.js for extremely high-capacity systems. Google, Yahoo, Mozilla, LinkedIn and startup i.TV are all profiled in the article Node at scale published yesterday on venturebeat.com.

While I couldn't find exact benchmarks for comet/second, it seems clear that with proper system architecture it is much, much higher than 500.

like image 104
Daniel Mendel Avatar answered Nov 07 '22 20:11

Daniel Mendel