Lesson 12 of 30
A load balancer's real job isn't spreading traffic evenly — it's noticing a target has gone bad and quietly routing around it before a human ever finds out.
11 min read
Every option explains itself — why the right one is right, and why each wrong one is wrong. Miss one and it comes back later on a spaced-repetition schedule.
Question 1 of 3
A service needs to route `/api/*` requests to one set of backend targets and `/admin/*` requests to a different set, through the same load balancer. Which type of load balancer supports this?
Hints without spoilers, and a plain explanation of why a wrong answer was wrong — answered only from this lesson. Free account, no card.
Sign up freeWhat interviewers actually ask about this, and what a strong answer has to cover.
A strong answer covers
Likely follow-ups
Elastic Load Balancing (ELB) distributes incoming traffic across multiple backend targets (EC2 instances, containers, IP addresses) so no single one gets overwhelmed, and so traffic never gets sent to a target that's already broken. Two load balancer types cover almost every real use case, and the choice between them is a genuine tradeoff:
/api/* to one set of targets, /admin/* to another), hostname, or headers, all through the same load balancer.Targets are organized into target groups — a named set of registered targets the load balancer routes to, each with its own health check configuration: a periodic probe (an HTTP path like /health, or a raw TCP handshake) that decides whether a target is fit to receive traffic right now.
A load balancer routes traffic evenly across three healthy targets.
An ALB routes requests evenly across three targets in a target group. One of them starts failing its health check — maybe its process is deadlocked, maybe a dependency it needs is down. After enough consecutive failures cross the configured threshold, the ALB marks it unhealthy and stops routing new requests to it, automatically, with no human involved. The other two targets absorb the traffic that would have gone to it. When the failing target recovers and starts passing health checks again, it's added back into rotation the same way it was removed — automatically.
"How does traffic get routed away from a broken instance without anyone paging on-call?" tests whether a candidate understands health checks as an automatic, threshold-based mechanism baked into the load balancer — not something that requires a monitoring script or a human pulling a server out of a pool by hand.