Networking & Protocols
Proxy and load balancing: multiple-choice review
Six questions that cut across the whole unit. Each one mirrors a decision you make on a real platform — not a definition to recite, but a tradeoff to weigh between speed, fairness, and state under load.
Confirm you can connect algorithm choice, L4 vs L7, health detection, session strategy, and cascade control — the synthesis the individual lessons built toward.
A fleet of 50 backends serves requests whose cost varies wildly (1 ms API calls mixed with 200 ms uploads). Which balancing algorithm is the right default, and why?
You must route /api/payments/ to a PCI-compliant pool and /api/catalog/ to a general pool, retry on HTTP 5xx, and emit per-endpoint metrics. Which layer is required and what does it cost?
A backend's disk fills; it still accepts TCP connections but returns 500 on every HTTP request. Your active health check is a TCP SYN probe and reports the backend healthy. What is the correct fix?
A team enables sticky sessions to fix users getting logged out when requests land on different backends. After deploy, load imbalance worsens and a crashed node logs out thousands of users. How do you read this?
A backend has a 500 ms GC pause. Clients and three intermediate service layers each retry once on timeout. A 500 ms blip becomes a cluster-wide outage. What is the minimum set of mitigations?
Your single L7 load balancer is itself the single point of failure: when it crashes, all traffic drops. What topology removes the SPOF, and what constraint does it impose?
The through-line of the unit is one tradeoff triangle — speed, fairness, and state — resolved at every layer. Power-of-two-choices is the fair O(1) default; L7 buys content routing and 5xx retries at 100× the L4 latency; active plus passive health checks cover both crashes and silent 5xx; sticky sessions are a stateful-backend workaround that Redis replaces; retry budgets, circuit breakers, and jitter bound the cascade; and anycast + BGP ECMP removes the LB’s own single point of failure at the cost of statelessness.