Mock Interviewer

Ask Coach

Ask Coach
Clarify requirements before you design — kept separate from your stage notes.

Tap a question to start, or type your own below.

Load Balancer System Design

Visual Problem Diagram

Load Balancer System Design architecture 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.

Stuck on where to start? Ask Coach

Clarify this problem here, or open Pathway Coach if you want a prep plan first.

Free Coach trial
How should I start prep?

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

Functional

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.

Non-functional

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.

Scale

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

1Requirement Analysis
2API Design
3High-Level Design
4HLD Extensions
5Trade-offs

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.

Try Coach free

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