Re: Node.JS server vs. Ruby server

543 views
Skip to first unread message

Steven Soroka

unread,
Mar 16, 2011, 10:06:26 AM3/16/11
to faye-...@googlegroups.com
There's also Goliath, which Postrank had been using in production for a year before releasing it, which is Ruby, evented, and rack-esque.

On Mar 16, 2011, at 12:39 AM, Dylan Vassallo wrote:

> Hello all,
>
> I'm glad I came across this project, it's exactly what I've been
> looking for. I'm working on a group chat service, and at this point
> I've decided to use Faye for sure, but I'm not sure whether to use the
> Node.JS server or the Ruby server. I could pretty much use either one
> without hassle, but I'm curious as to whether one is recommended over
> the other, e.g. for stability or performance reasons. I would guess
> that the Node.JS version performs better under heavy loads, but I'm
> wondering if there are any differences between the two that I'm not
> aware of.
>
> Thank you!

James Coglan

unread,
Mar 16, 2011, 12:42:40 PM3/16/11
to Faye users
> > I'm glad I came across this project, it's exactly what I've been
> > looking for. I'm working on a group chat service, and at this point
> > I've decided to use Faye for sure, but I'm not sure whether to use the
> > Node.JS server or the Ruby server. I could pretty much use either one
> > without hassle, but I'm curious as to whether one is recommended over
> > the other, e.g. for stability or performance reasons. I would guess
> > that the Node.JS version performs better under heavy loads, but I'm
> > wondering if there are any differences between the two that I'm not
> > aware of.

Based on numbers I'm currently seeing out of AB on my local machine:

* Ruby 1.8.7 is not worth bothering with, it will fail requests much
sooner than other platforms, and will only handle ~300req/s
* Ruby 1.9.2 is fast (~1200req/s), but can start to fail as the number
of clients grows
* Node is fastest at ~1600req/s, I've not seen it fail yet

Node ends up using more memory than Ruby 1.9.2, but not by much on my
machine.

These numbers are just based on using Apache Bench to throw 5000
handshake requests at the server with concurrency at 1000. I don't yet
have data on which is better at connect requests and sockets, though
my guess would be Node would win.

For Ruby, Faye only works using the Thin web server, which is a very
capable async server. A few others have come out since then but Faye
currently doesn't support them.

Typical numbers I'm getting out of Node:

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.4 0 6
Processing: 1 60 35.2 53 228
Waiting: 1 60 35.2 53 228
Total: 3 60 35.2 53 228

And out of Ruby 1.9.2:

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.4 0 9
Processing: 21 81 28.3 65 166
Waiting: 15 73 27.5 59 160
Total: 25 81 28.3 65 168

Dylan Vassallo

unread,
Mar 16, 2011, 12:39:30 AM3/16/11
to Faye users
Hello all,

I'm glad I came across this project, it's exactly what I've been
looking for. I'm working on a group chat service, and at this point
I've decided to use Faye for sure, but I'm not sure whether to use the
Node.JS server or the Ruby server. I could pretty much use either one
without hassle, but I'm curious as to whether one is recommended over
the other, e.g. for stability or performance reasons. I would guess
that the Node.JS version performs better under heavy loads, but I'm
wondering if there are any differences between the two that I'm not
aware of.

Thank you!

Dylan Vassallo

unread,
Mar 16, 2011, 4:33:39 PM3/16/11
to faye-...@googlegroups.com
Thank you for the detailed reply! Looks like Node's the way to go, since I can choose any of them at this point in my project. I'm surprised it uses slightly more memory than Ruby, but it looks to be quite stable. 

Matthijs Langenberg

unread,
Mar 17, 2011, 5:08:11 AM3/17/11
to faye-...@googlegroups.com, Dylan Vassallo
One of the main reasons for me to use Node for writing our chat service is because JavaScript is just a great language to write event driven applications with.
Reply all
Reply to author
Forward
0 new messages