Web Architecture

Scaling web applications: Part 3 – Horizontal Scaling

Till now we have tried to extract more and more meat out of a single machine (vertical scaling) i e adding faster CPU, more RAM, SSD and adding certain tools Varnish cache to enable us to handle more traffic. This has a limit to it ,depending on the architecture of the application that needs to be supported.

Please go through part-1: CDN & part-2: Caching before reading this; that’s for some context.

Horizontal scaling is about handling more load by adding more machines & this requires special attention to the application architecture. In the book  “Building Scalable Web Sites by Cal Hendersonit’s clearly laid out that with vertical scaling costs increase exponentially while with horizontal scaling costs increase linearly.


Of course the first step is to identify and if the bottleneck of the application is the database, farm it out. So you put up a separate DB server to handle database requests. Want to decide when to go for a separate database server, this article on serverfault will help.

But the problem faced with this separation is the bottleneck introduced by the backroom network.

So the problem that now needs to be addressed is:

Would simply collapsing the web and application server into a single machine; with the simplification of configuration it brings; and the directness of access (local sockets rather than TCP) likely give improved performance. This decision is best left to the developers in charge, but backroom network remains the single biggest factor that plays a critical role in this decision.

With the