Interesting interview with Alex Payne from the Twitter development team. He says that Twitter’s scalability issues are in part due to the fact that Ruby and Rails are just slow. Here’s a taste:
It’s also worth mentioning that there shouldn’t be doubt in anybody’s mind at this point that Ruby itself is slow. It’s great that people are hard at work on faster implementations of the language, but right now, it’s tough. If you’re looking to deploy a big web application and you’re language-agnostic, realize that the same operation in Ruby will take less time in Python. All of us working on Twitter are big Ruby fans, but I think it’s worth being frank that this isn’t one of those relativistic language issues. Ruby is slow.
I think this is true and important, but it’s also an issue that will be resolved in due course if the popularity of Ruby and Rails continue to rise. At one time, Java was almost unacceptably slow. That has changed. That said, in a world where the amount of money it costs to power and cool server farms is becoming an issue for companies, running on a platform that requires more wattage than another will make a difference.
It’s also worth noting that most applications are not Twitter, they’ll have relatively few users and can comfortably run without performance issues in just about any environment.
I do wonder, though, if this kind of information is going to push some startups over to PHP or Java, even if they’d prefer the development efficiencies offered by Rails. As he mentions in the article, the longer you can put off being forced into using stupid scalability tricks the better off you are.
Update: Ruby on Rails creator DHH responds. His bottom line is that this is something that the Twitter developers themselves could help fix. I do think it’s pretty lame to leverage all of the development advantages of a platform to build your application and get it out there, and then lay all the blame on it when performance problems crop up. Ruby on Rails is not as old or as widely used as Java or PHP. There are risks.