I'm not going to make this into a Rails vs Framework X discussion, there's plenty of those already. After seriously contemplating what framework I'm going to use for my next deployment, I decided it's very difficult to pass up the out of the box REST exposure Rails gives you for minimal work back. This is something that requires slightly more work in Django, and considering I'm putting mostly emphasis on the API portion of the app, Rails makes more sense this time around. Considering how important it is for me to write an app that contains heterogeneous clients (iphone/android/tablets) that can access (not just web browsers), I need to be able to build RESTful APIs with minimal resistance from whatever framework I'm using.
My question is, is Rails ready to handle not a Twitter sized app, but something that does roughly 75,000 unique hits a day? Does Ruby 1.9.1 really improve things? There's plenty of nightmare stories and equally as many success stories depending on who you ask. Joel Spolsky (one of the founders of stackoverflow.com), believes Ruby itself is just not ready for prime time because it's still considerably slower than other interpreted languages. I'm not worried about getting to Twitter's size (that's a problem I wish to have one day), but on the same token, I do have a site with an average of 75,000 unique users a day. I'm wondering what kind of scaling issues I'll run into by deciding to use Ruby 1.9.1 + latest Rails (CPU costs + memory footprint) as part of my API stack vs. just taking the time to actually do a little extra work in Django to build a RESTful API. As Joel mentions in his article, I don't want to buy 100 servers when I can buy 10. I would love to be convinced as to why Rails is now ready to meet my requirements.
We experimented with 1.9 a couple months ago and we were so impressed by the speed improvements that we almost immediately began the process of migrating over to it. The only libraries that did not run smoothly were Facebooker, which one of our developers was able to patch in a couple of days (The plugin is now fully 1.9 compatible), and VPim (iCalendar library) which we were able to switch out easily with the much newer RiCal plugin.
Rails 2.3 is absolutely ready to run on 1.9 and in our experience resulted in a greater than 60% improvement in request times. Our integration tests also received the same benefit. We had 1200 tests that tool 300 seconds to run now taking only 110 seconds with no other changes except switching from Ruby 1.8.7 to Ruby 1.9.1. This also means we were able to double the amount of load each of our servers could handle.
It's certainly possible that you use a gem that is not 1.9 compatible, but the vast majority of them are or can be made compatible with minor changes.
You will definitely not experience any issues with 75,000 unique visitors, and a single server should be able to host a rails application with at least ten times that level of traffic unless your application is written very poorly.
Joel's post is from TWO THOUSAND AND SIX. That's FOUR years ago. Things have changed, thankfully :) Ruby 1.9 is ready for prime-time. It's compatible with Rails 2.3.5, and Rails 3 is built with Ruby 1.9 in mind, so it will be fully compatible with it.
"My question is, is Rails ready to handle not a Twitter sized app, but something that does roughly 75,000 unique hits a day?"
That's roughly like asking if you think ten thousand eggs would help you make an omelet, not for a town, but for a family.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With