Don't say I didn't say I told you so

I’ve had, shall we say, heated debates with a few of my friends about the stability of Ruby on Rails. After hearing about the way Ruby on Rails handles database interactions I was fairly convinced that it would make serious scaling a huge pain in the butt. Today, by way of an interview of a Twitter developer, comes the answer I’ve been expecting:

Running on Rails has forced us to deal with scaling issues – issues that any growing site eventually contends with – far sooner than I think we would on another framework.

All the convenience methods and syntactical sugar that makes Rails such a pleasure for coders ends up being absolutely punishing, performance-wise. Once you hit a certain threshold of traffic, either you need to strip out all the costly neat stuff that Rails does for you (RJS, ActiveRecord, ActiveSupport, etc.) or move the slow parts of your application out of Rails, or both.

It’s also worth mentioning that there shouldn’t be doubt in anybody’s mind at this point that Ruby itself is slow.

I knew ActiveRecord was a pile of crap from the minute I read in their documentation that it was “only” 50% slower than going straight to bare metal. Combine that with the fact that you can’t connect to more than one database server, force indexes or do other various MySQL-specific DB foo and you’ve got a recipe for disaster once you hit a certain amount of traffic.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>