When a coffee shop’s line gets too long, the owner can hire more baristas and direct customers to the next available register. Horizontal scaling, or scaling out, takes the same approach: add instances of a component across servers to handle more load. section 10.5.3
A load balancer directs incoming requests to available application servers. Adding servers increases capacity; if one fails, traffic can go to the remaining servers. By contrast, vertical scaling makes one server more powerful, but eventually reaches a physical ceiling. section 10.5.3 section 10.10
Figure 10.7 Scaling Up (Vertical) makes a single worker more powerful, but Scaling Out (Horizontal) offers a practically infinite, resilient scale by adding more identical workers.

Compare adding identical workers with making one worker more powerful. section 10.5.1
The disappearing shopping cart
Server A remembers a shopper’s cart locally. The next request lands on Server B, which knows nothing about it, so the cart appears empty. Move session state to an external data store or cache that every server can access; the application can still remember the cart without relying on a particular server. section 10.5.3
Keeping application servers stateless adds architectural work. Scaling also costs money, so choose capacity targets with the business: an internal HR tool for 500 employees may not need expensive infrastructure designed for a viral traffic spike. section 10.5.3 section 10.5.1
Scaling out can target a single busy component. For example, an inventory microservice can gain more instances without scaling the rest of the application. Document databases are also described as generally easier to scale horizontally than SQL databases, though their data-model tradeoffs still matter. section 12.2.2 section 8.2.2


















