Horizontal Scaling 00:00:01 A checkout machine vanishes All afternoon, one checkout worker has dealt with seventy requests a second. Suppose it can sustain a hundred. At four o’clock it loses power. Healthy or busy, it was the only route to a completed checkout. Amira puts a second worker behind a load balancer. Both run the same service. New requests can go to either machine. This is horizontal scaling, and the balancer now needs its own availability plan. The sale brings two hundred ten requests a second. Three healthy workers can each take seventy under an even split. The useful question is what happens when that count drops. 00:00:40 Count the capacity after a failure Three workers can process three hundred a second in this model. Lose one and capacity falls to two hundred. At unchanged demand, another ten requests each second must wait or be rejected. With four workers, the usual load is about fifty-two or fifty-three per worker. During a single failure three remain. Those three can still take seventy each. The extra machine bought operating margin. Now traffic reaches four hundred twenty a second. Six workers can handle it at seventy each. A seventh would preserve that same seventy-per-worker target when one goes away. That target is a design choice. 00:01:21 Who remembers the shopper? A shopper signs in through worker A. Imagine that only A knows who the shopper is. When the next request lands on B, the browser still has its cookie, but B has no matching session. Amira puts the session data in a shared store and gives the browser an identifier. The store now needs capacity and a failure plan, because each worker may depend on it. Worker B receives the next request, looks up the identifier, and can continue the same checkout. Losing worker A no longer erases that shopper’s session. 00:01:55 Let the fleet follow the sale Two ready workers now average ninety percent processor use. The operator wants sixty percent. Under a proportional-work assumption, the existing demand needs the capacity of one point eight fully occupied workers. Spread that demand across three and the average becomes sixty percent. This arithmetic estimates a desired worker count. It cannot make a third worker instantly ready to serve buyers. The new process loads its configuration and connects to its dependencies. Until readiness checks pass, the balancer keeps it out of rotation. The original pair continues to carry the entire load. 00:02:33 Inspect the last dependency When the rush subsides, stop assigning a retiring worker new requests. Let its current checkouts finish before shutting it down. Abrupt termination would turn an ordinary scale-down into visible errors. During a rehearsal Amira removes one worker. She checks that traffic actually moves to healthy machines and watches completed checkouts and slow responses. A green instance count alone cannot show the buyer’s experience. If every checkout now waits on the same database lock, extra workers merely add competitors. Scale out the part that can work independently, then test the complete path again with one worker missing.