November 12, 2009

On why there’s no such thing as a scaling problem.

There’s been a lot of talk in the past about ’scalability’, and how an application or site copes with increasing traffic. It almost always seems that the people that comment on this in a negative way (”I can’t do it this way, as it won’t scale”), have never reached a point where they actually have to worry about scaling issues.

The most common argument against the web framework Rails is that “it doesn’t scale”. Whilst I don’t think there’s any great debate over Rails (or more to the point, Ruby) not being lightning fast, there’s plenty more to scaling an application than its framework.

Scaling a web application will affect the whole infrastructure and architecture – servers, databases, amount of caching,  and so on. A well-coded, thoughfully-planned Rails app will scale better than a poorly-coded, hacked-together PHP app. It’s all relative.

Besides, once you get to a point where you seriously need to consider scaling issues, you don’t have a problem – you actually have an opportunity. If you have a good business plan in place, as David Heinemeier Hansson says, “it could be the most expensive server in the world, and it wouldn’t matter”.

When scaling problems become a real issue (that is, not considering scaling a problem before it actually is a problem), it means business is booming, customers are demanding your service, and you have the opportunity to scale in order to meet that demand.

Thousands of daily hits and requests from (hopefully) paying customers? Doesn’t sound so much of a problem now, does it?