awesome-everything RU
↑ Back to the climb

Deployment & Infra

Load balancing levels: multiple-choice review

Crux Multiple-choice synthesis across the load-balancing unit — L4 vs L7 visibility, TLS termination, algorithm choice, health checks, sticky sessions, and connection draining.
Your altitude — climbing toward senior
ZeroJuniorMiddleSenior
You are at senior altitude — in orbit
◷ 13 min

Six questions that cut across the whole unit. Each one mirrors a call you make while standing up or operating a load balancer — not a definition to recite, but a layer choice or a failure mode to read correctly under traffic.

Goal

Confirm you can connect what each layer can see to what routing it enables, and tie the operational knobs — algorithm, health checks, affinity, draining — back to the failures they prevent.

Quiz

An NLB (L4) fronts your service. Product asks to route /api/v2/* to a new backend pool while keeping /api/v1/* on the old one. What is the honest answer, and why?

Quiz

Backend request durations vary wildly: most return in 5 ms, a few take 2 s. Under round-robin, p99 latency is bad and one box is always hot. Which algorithm change helps most, and why?

Quiz

You want end-to-end encryption (nothing decrypts in the middle) AND path-based routing at the edge from a single balancer. What is true?

Quiz

During a rolling deploy, users hit connection resets mid-request whenever an old instance is removed. The pool is healthy and well-sized. What is the fix?

Quiz

A service uses cookie-based sticky sessions to keep in-memory user state on one backend. Load is uneven (one box is hot) and that box cannot be drained cleanly during deploys. What is the senior fix?

Quiz

A team uses DNS round-robin (two A records) as their load balancer. A backend dies and a slice of users keep failing for minutes. Why, and what does a real balancer give you?

Recap

The through-line of the unit is one rule: the layer you pick decides what the balancer can see, and what it can see decides what it can do. L4 forwards bytes by IP and port — fast, protocol-agnostic, capable of TLS passthrough, but blind to path, header, and cookie; L7 terminates the connection, reads HTTP, and routes on any of those, paid for in per-request CPU and crypto. On top of the layer sit the operational knobs that decide reliability: least-connections beats round-robin under uneven request durations, health checks pull dead backends but only as fast as their interval, sticky sessions trade even distribution and clean draining for pinned state (so externalise state first), and connection draining lets in-flight requests finish before a backend retires. And DNS round-robin is not a load balancer — no health awareness, failover bounded by uncontrolled TTLs and caches.

Continue the climb ↑Load balancing levels: free-recall review
shortcuts expand
search
K
prev piece
k
next piece
j
cycle tier
t
this menu
?
sources3
expand
  1. 01
  2. 02
  3. 03

Trademarks belong to their respective owners. Editorial reference only.