Hotspotr had a record-breaking day yesterday, with a total of 61,000 pageviews according to Google Analytics. The peak hour was 5pm, shortly after it went onto the digg homepage, with just under 15,000 pageviews in one hour.
Since a frequently-expressed concern with Rails is it's ability to handle traffic, I'm happy to say the site survived without a hicup. If you are building a Rails app and wondering about scalability, here are some points of reference:
- the backend is Apache 2.2 with mod_balancer going to a cluster of four mongrels.
- the server is a Rimu hosting dedicated server, with a few other Rails apps running alongside it (none very highly trafficked yesterday though).
- I don't have quantitative measurements on its responsiveness during the peak load times, but qualitatively it seemed pretty snappy -- I hit the site myself repeatedly during the peak time to see how it was holding up.
- the hotspotr homepage has four database queries. The main map page (for any given city) has five queries.
- I've done very little to optimize hotspotr. The basics are there: no iterative retrievals, appropriate indexes on tables, and sessions in the database.
- beyond that, I haven't optimized much at all -- there's no caching of either ActiveRecord objects or HTML fragments.
You can see there is still quite a bit of room for improvement. The fact that the site survived a 15K hour certainly makes me more confident about deploying Rails in a high-traffic environment.