One server cannot carry millions of users. This lesson shows the exact order of moves that takes a single box to a resilient, multi-tier system.
Outcomes
How to read: Follow arrows left to right: users hit the load balancer, which routes to web servers, which write to the master and read from slaves.
How to read: Watch the dots: each one is a request. The balancer alternates servers, so consecutive dots take different branches.
Your request arrives at the balancer, the single public entry point.
The balancer picks the next server in rotation: Server 1, then Server 2.
If a server stops responding, it leaves the rotation until healthy.
How to read: Follow arrows left to right: the web server asks the cache first, and only on a miss does it query the database and write the result back.