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.