see a puffin eat a fish

Scaling in Rails

without comments

My friend Claude pointed me to this interview with the Twitter developers regarding their Rails scaling issues. Not surprisingly, you can throw as many web instances at your site as you want but the real bottleneck ends up being the database. Then you end up having to deal with Squid, real time replication and read-only child databases. Suddenly you need an IT team.

“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.”

Indeed. When I tail my development.log and look at the SQL being generated by Rails, it makes me cringe. I know i’ll have to one day do something about it but i’m putting it off as long as possible because i’d rather preserve the illusion of Rails (for now anyway) and not clutter my code with three table joins.

Also, check out this snarky response to the Rails developers.

Written by mb

December 12th, 2007 at 12:11 pm

Leave a Reply

IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)

What is 6 + 7 ?
Please leave these two fields as-is: