Big picture / Beginner / 6 min
The whole system in 3D
Orbit a full web backend and watch requests hit the CDN, load balancer, cache, replicas and workers.
Start the simulation → Change the load, break a part, watch what happens. Free, no sign-up.
In short
- What it is
- A web backend is a chain: DNS and CDN at the edge, a load balancer, stateless app servers, then caches, queues and databases behind them.
- Why it matters
- Each layer takes one job off the next one, so the slow and expensive parts (the database) see as little traffic as possible.
- The trade-off
- Every extra layer adds a network hop, a failure point and something to monitor, so add layers only when numbers say you need them.
- Say it in an interview
- "I keep the app servers stateless so I can add more behind the load balancer, and I put a cache in front of the database for reads."
Check yourself
Users load the same images and JavaScript again and again. Which component takes that traffic off your servers?
Answer: A CDN edge. A CDN caches static files at the edge, close to users, so those requests never reach your origin.
Why are app servers usually kept stateless?
Answer: So any server can handle any request and you can add or remove them freely. With sessions in a cache or token instead of server memory, the load balancer can send a user anywhere and scaling out is easy.
A user saves their profile and immediately reloads it from a read replica, but sees the old version. What happened?
Answer: Replication lag. Replicas apply the primary’s changes asynchronously. Until they catch up, they serve older data.