How scalable is Ruby?
I had an idea for a project that has the potential to drive quite a bit of traffic and I was considering using Ruby on Rails. I was curious though if anyone has any experience with its scalability.
From what I have read, it seems that the Mongrel container is the way to go(?), and some hosts such as Media Temple offer Ruby on their grid platform. Anyone using it for a high traffic site?
Surely the 37Signals guys have experience with this, anyone know about their setups?
Don’t miss anything, subscribe!
Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically to your feed reader.
Comments
[...] When I asked how scalable is Ruby, I mentioned Mongrel but what really surprised me from reading Jared’s blog was that Mongrel isn’t multi-threaded. Maybe it is just because I’ve been in the Java world too long with having multi-threaded servers, but that seems a bit inefficient. It seems that if Mongrel is ‘the’ container to use then to really make Rails perform you would need some pretty good hardware (as in multiple CPUs) to make all those processes run. Maybe I’m wrong though. grails, Ruby, ruby on rails Don’t miss anything, subscribe! [...]
[...] This isn’t the first time that Ruby on Rails scalability has been called into question, even I asked how scalable is Ruby. The Grails vs. Rails benchmark by Graeme got a lot of attention, but it was a small benchmark and wasn’t a real world example. Well you don’t get more real world than Twitter now do you? [...]

I think currently Mongrel-based deployment is the way to go. CGI is dead slow and fastcgi is reported to give strange problems.
Recently I did some blogs about rails deployment. You might find them interesting. There’s one about mongrel-based deployment on http://techpolesen.blogspot.com/2007/03/mongrel-based-rails-deployment.html but there’s also a CGI-based post and a more general with comparison to Java deployment.
I don’t have numbers for high traffic sites, but with the mongrel-based setup with mod_proxy_balancer in front, you can scale a) the number of mongrel servers and b) the number of mongrel instances on each such server. This way, I think it will be the database that is the bottle-neck, as it is with many like scenarious in the Java world.
And it then boils down to how well ActiveRecord performs. Or more likely, how well the database access has been written in the application