Sheet 05

Load Balancer Architecture

Two-tier load balancing strategy: L4 Network Load Balancer (NLB) + L7 Application Load Balancer (ALB).

Open Sockets13,333

Layer 4 (NLB)

TCP / UDP / TLS Passthrough
Latency Added< 0.5 ms
Target ThroughputMillions of conns/sec
Primary Role: Absorbs SYN floods, Anycast VIP, TLS offload

Layer 7 (ALB)

HTTP/1.1, HTTP/2, gRPC, WebSocket
Latency Added~1.5 ms
Target Throughput100k+ RPS / unit
Primary Role: Path-based routing, header rewrite, cookie stickiness

Load Balancer Connection & Protocol Math

1. Concurrent TCP Sockets

Peak_RPS × 2 (2s average connection hold duration)

2. TLS Handshakes / sec

Peak_RPS × SSL_Rate% (10% new connection negotiation)

3. LB Forwarding Latency Added

Fixed NLB + ALB routing hop

2 ms
4. Health Check Probe Interval

TCP & HTTP /health endpoint check periodicity

5 seconds
5. Connection Draining Window

Grace period for in-flight requests during rolling updates

30 seconds