I got into another “chat” with someone who was mocking Rails due to the fact that he keeps seeing a cat when he tries to use Twitter.
“This app is slow, therefore Rails can’t scale”
This is an old argument of course.
The problem is that Twitter doesn’t scale in the same way as many Rails applications.
I talked about how Scaling out 37 Signal-style applications is convenient. In many ways, Twitter is more similar to a real-time stock exchange than a simple CRUD application. Tweets may not be quite as important or timely as $$$ (stock info), but there are some similar issues.
This is why, for Twitter to scale nicely, it probably makes sense to use a message bus that can scale out nicely. Pull versus Push / the loose coupling can really help you out, and you can copy what NASDAQ does instead of Basecamp.
The message bus could be Ruby, could be ActiveMQ, could be TIBCO Rendezvous.
This architecture change would surely do a lot more for you than “re-write it in Java”, which may give you a slight boost (e.g. more out of less machines), but is like adding lanes to 101 instead of using public transport.
June 5th, 2007 at 8:20 pm
Yep, rails apps can scale if done properly. (from what I hear) A certain friend of mine who works on a public rails app really likes memecache a lot. He also pointed out this thread to try and convince me to sign up for facebook. (i guess it’s a nerdy enticement but whatever…we’re nerds =p )
http://lists.danga.com/pipermail/memcached/2007-May/004098.html
June 6th, 2007 at 12:57 am
Now, if only Ruby was maintainable. ;)
June 6th, 2007 at 1:28 am
The Joyent folks did an interesting half day tutorial on scalability at RailsConf 2007. The most interesting part was the initial set of technologies in their stack … roughly 50 elements, of which only two were Rails related :-).
And the Twitter folks? The most important lesson they need to learn has nothing to do with the implementation language on their front end app, and everything to do with HTTP (the ETag header):
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.19
June 6th, 2007 at 3:24 am
Just use ActiveMessaging in Rails then deploy on any message broker you like (ActiveMQ, MQSeries, TibCo etc)
http://code.google.com/p/activemessaging/wiki/ActiveMessaging
June 7th, 2007 at 2:36 am
I agree with James. ActiveMessaging is the solution to Twitter, Iraq and world hunger. Peace bros.
;-)
June 18th, 2007 at 2:00 am
And, of course, they have just added lanes to the 101, where I work, and it’s already full.
On a different note, I’ve started moving a project to JRuby and I plan on using some of that sweet integration for scalability purpose. Wonder what kind of analogy would cover that..?
May 18th, 2008 at 11:21 pm
cool