Database Design – Why Vertical Scaling Is Expensive

database-designscalability

As you can find here Best Practices For Horizontal Application Scaling, vertical scaling is much more expensive than horizontal scaling:

vertical scaling cost increase exponentially whereas with horizontal
scalability cost is linear.

Why is it so?
Vertical scaling means "adding more power to existing machines", while horizontal scaling means "adding more machines".

In my opinion, upgrading existing machines should be cheaper, as some parts already exist and you only have to buy additional processors, RAM, etc., whereas buying whole new machines should result in higher costs.

Best Answer

In some cases (perhaps most) the servers are already at capacity physically. An increase in the number of CPU's would require a motherboard swap. To add RAM to an existing server could be expensive, depending on how old the server is. Memory modules more than 5 years old and sourced from a dealer can be prohibitively expensive.

What all this amounts to is that upgrading from an 8 processor box with 32GB RAM to a 64 processor box with 128GB would involve purchasing an entire new server to replace the old one. This is still vertical scaling from the database/application point of view. A server that supports this many CPU's is likely far more expensive than 7 servers with 8CPU's each (keeping the original one as the 8th).

As per mustaccio's comment: High-end hardware is not just about more processors and RAM; designing hardware to support throughput and power/cooling requirements for dozens of multicore processors is far from trivial. Thus, a 256-core 2TB RAM server might cost $150000, which is about an order of magnitude more expensive than 64 4-core 32GB commodity servers