Facebook, Rails and Scaling

Common rails development philosophy is to build your app and worry about scaling later. As 37Signals suggets, we should, “Create a great app and then worry about what to do once its wildly successful. Otherwise you may waste energy, time, and money fixating on something that never even happens”. While this would generally be great advice, we quickly learned that the facebook platform may reduce the time between initial deployment and wild success to less than a week or even 24 hours.

Sticky Notes was launched on a Wednesday and had tens of thousands of users by Monday. Needless to say, scaling quickly became our primary issue. So much so that we enlisted the help of Tony from Clickcaster, Darren from Photobucket, Alex from Twitter, Mike from Fuser, and Brian and the guys at Viget Labs. Our discussions ranged from server and database architecture to rails and mongrel configuration. We would like to thank everyone for their great advice.

Over the next few posts we’ll discuss many of these issues and try to shed some light on what we’ve learned about scaling rails in the last four weeks. It’s important to remember that the Facebook platform instantly introduces your application to millions of potential users, so scaling should be more than an afterthought.


4 responses to “Facebook, Rails and Scaling

  1. why you guys dont respond emails? :@

  2. Joe – glad we were able to help out. I’m looking forward to hearing the details about which strategies worked the best for you.

  3. To help people plan capacity for Facebook applications, could you describe in future posts the volume of traffic you have experienced? Developers who can forecast traffic can easily performance-test their application to find out what the limits and bottlenecks are. I gave a presentation at EuroOSCON in 2006 on how to do this, see:


    Rails performance tuning and optimization isn’t particularly difficult and usually is worth the investment of a day or two of effort. You’ll be glad you did.

  4. I heard iLike is using like 150 servers these days. Can you give some details on how many servers you guys are using — structure [db servers vs app servers], and who you’re using for hosting?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s