Design a Load Balancer
Design a Load Balancer — A Staff playbook focused on L4 vs L7 tradeoffs, algorithm selection, health checking strategies, and LB failure modes — not just nginx configs.
This playbook is part of the full calibration library.
Staff interviews are decided on nuance — tradeoff framing, ownership boundaries, and failure anticipation. This playbook covers the depth that separates Senior from Staff+.
What's inside this playbook
Core sections
- •1. The Staff Lens
- •2. Problem Framing & Intent
- •3. The Fault Lines
- •4. Failure Modes & Degradation
- •5. Evaluation Rubric
- •6. Interview Flow & Pivots
- •7. Active Drills
- •8. Deep Dive Scenarios
- •9. Level Expectations Summary
- •10. Staff Insiders: Controversial Opinions
Practice & Reference
- •How to Use This Playbook
- •Executive Summary
- •What This Interview Actually Tests
- •The L5 vs L6 Contrast (Memorize This)
- •Default Staff Positions
- •System Architecture Overview
- •Interview Walkthrough
- •A.1 Layer 4 Load Balancing
- •A.2 Layer 7 Load Balancing
- •A.3 Decision Matrix
- •B.1 Round-Robin
- •B.2 Weighted Round-Robin
- •B.3 Least Connections
- •B.4 Least Response Time
- •B.5 Consistent Hashing
- •B.6 Random
- •C.1 Active Health Checks
- •C.2 Passive Health Checks
- •C.3 Combining Active + Passive
- •C.4 Tuning Parameters
- •D.1 Cookie-Based Affinity
- •D.2 IP-Based Affinity
- •D.3 Consistent Hashing
- •D.4 Externalized Session State
- •D.5 Decision Tree
- •E.1 Active-Passive (VRRP/Keepalived)
- •E.2 Active-Active
- •E.3 Cloud Load Balancers
- •E.4 Anycast
- •E.5 Client-Side Load Balancing
- •F.1 GeoDNS
- •F.2 Anycast + BGP
- •F.3 Global Server Load Balancing (GSLB)
- •F.4 Multi-Region Failover Strategy
- •G.1 Key Metrics
- •G.2 Alerting Thresholds
- •G.3 Dashboards
- •H.1 nginx
- •H.2 HAProxy
- •H.3 AWS Application Load Balancer (ALB)
- •H.4 AWS Network Load Balancer (NLB)
- •H.5 GCP Cloud Load Balancer
- •H.6 Envoy (Service Mesh)