J-Squared Media: Inside

Facebook, Rails and Scaling

July 31, 2007 · 4 Comments

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.

Categories: Uncategorized

4 responses so far ↓

  • adil // July 31, 2007 at 11:53 pm

    why you guys dont respond emails? :@

  • Patrick Reagan // August 1, 2007 at 4:10 pm

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

  • Dennis Linnell // August 6, 2007 at 2:30 pm

    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:

    http://conferences.oreillynet.com/cs/euos2006/view/e_sess/9211

    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.

  • Steve Poland // August 17, 2007 at 3:55 pm

    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 Comment