Mock Interviewer
Ask Coach
Tap a question to start, or type your own below.
Load Balancer System Design
Visual Problem Diagram

Scenario
You tap Checkout at lunch and expect the page to answer right away. The painful failure is timeouts for half the shoppers, because one server still accepts the connection but never finishes the work, and the balancer keeps sending people there.
Clarify this problem here, or open Pathway Coach if you want a prep plan first.
A shopper opens the app and taps through pages that must come back. A live screen stays attached to a server that can keep that connection. A caller who floods the site can be slowed so everyone else still gets an answer. A locked connection can end at the balancer or pass through to the server.
You need to explain how you pick a server when some calls finish instantly and some stay open a long time. You need to explain how you notice a server that accepts connections but never finishes. You need to explain how you take that server out without cutting off work already in flight. You need to explain when a shopper stays on the same server and when they can move. You need to explain how the site stays up when one balancer machine dies. Naming a balancer vendor can stay thin.
Constraints
Send each request to a server that is actually answering. Stop sending traffic to a server that is stuck. Keep a shopper on one server when the product needs that. End the locked connection at the balancer or pass it through. Slow down a caller who sends too much.
The extra wait the balancer adds stays under 1 millisecond for nearly every request, including the slowest 1 in 100, so shoppers do not feel the hop. The path stays up about 99.99 percent of the time. When a server is removed, work already in flight finishes or moves instead of being dropped.
About 1,000 servers sit behind the balancer. Callers send about 10 million requests a second. That request rate is the heavy flow. A typical request is about 1 KB and a typical response is about 10 KB. The mix includes short page calls and connections that stay open.
Stages ahead
Not ready to design yet?
Try the free Coach trial — ask how to prep, what to practice first, or how InterviewCrafted works. Sign in when you want to start this problem.
Log in to start practicing
Preview the problem below. Sign in to start your timed session, save progress, and use the AI coach.
Want full access now? View Pro pricing