Web apps · Foundations · Split traffic across two API servers
Hello, Load Balancer system design, running live
A load balancer splits the 1,500 requests a second across two API servers, so each runs at 75% of its capacity. The database already had room; the API tier was the bottleneck.
An illustrative teaching design, not a verified diagram of any company's internal architecture. Traffic, capacity and cost are simulator estimates. Model and assumptions.
- Traffic
- 1,500 req/sMedium scale
- AWS bill
- $1,128/mo
- p99
- 395 ms
- Components
- 4
1,500 requests a second spread across two API servers.
How it works
- The load balancer routes requests to two API servers.
- Each API server carries part of the traffic instead of one server handling the full load.
- The database remains at its existing five-instance size because it was not the original bottleneck.
What each part does
- Users
- 1,500 requests a second.
- API Server
- One API server, sharing requests with the other API server.
- API Server
- One API server, sharing requests with the other API server.
- Database
- The existing five-instance database tier.
What breaks first
API capacity is the first limit as the request rate grows.
The API tier is sized around the 1,500 request preset. This blueprint does not model the challenge goal or its measured latency and error thresholds.
The simulator checks this every build: it runs the design at 1,500 req/s, then ramps traffic to 4x (6,000 req/s) and records which part fails first. In the playground, press Break it to watch the same thing happen.
Trade-offs
What it gets right
- Two servers avoid a single API process carrying all traffic.
- The design leaves a path to add API capacity horizontally.
What it costs you
- Both servers still depend on the same database.
- A two-server fleet needs enough headroom to survive a server loss.
In the real world
- A load balancer in front of multiple stateless app servers is a common web-service pattern.
- This teaching topology does not represent a specific company's production system.
In the interview
- Locate the bottleneck before adding a larger database.
- Compare one larger host with multiple hosts and explain the failure trade-off.
Run it yourself
The playground opens this design with 1,500 requests a second already flowing. Press Break it, or change one part yourself, and watch which number goes first.
Questions people ask
How does Hello, Load Balancer work at the system design level?
The load balancer routes requests to two API servers. Each API server carries part of the traffic instead of one server handling the full load. The database remains at its existing five-instance size because it was not the original bottleneck.
What breaks first in a Hello, Load Balancer design?
API capacity is the first limit as the request rate grows. The API tier is sized around the 1,500 request preset. This blueprint does not model the challenge goal or its measured latency and error thresholds.
What are the trade-offs of this Hello, Load Balancer architecture?
Two servers avoid a single API process carrying all traffic. The design leaves a path to add API capacity horizontally. Both servers still depend on the same database. A two-server fleet needs enough headroom to survive a server loss.
What do interviewers look for in a Hello, Load Balancer system design answer?
Locate the bottleneck before adding a larger database. Compare one larger host with multiple hosts and explain the failure trade-off.