L4 vs L7 Load Balancing
What common mistakes do candidates make around L4 vs L7 Load Balancing, and how do you avoid them?
Answers use simple, clear English.
Quick interview answer
Common mistakes: L7 LB without health checks; single LB bottleneck. Best practices: Health check app endpoint not TCP only; cross-zone LB.
Detailed answer
Common mistakes: L7 LB without health checks; single LB bottleneck. Best practices: Health check app endpoint not TCP only; cross-zone LB. Core: L4 (TCP) routes by IP/port fast. L7 (HTTP) routes by path/header/cookie — enables sticky sessions, TLS, WAF integration. Real-time example: ALB routes /api → API target group, /static → S3; NLB for gRPC TCP passthrough. Pros: L7 smart routing; L4 performance for non-HTTP. Cons: L7 terminates TLS — cert management; L4 no URL awareness. Common mistakes: L7 LB without health checks; single LB bottleneck. Best practices: Health check app endpoint not TCP only; cross-zone LB. Audience level: Fresher.
Full explanation
L4 (TCP) routes by IP/port fast. L7 (HTTP) routes by path/header/cookie — enables sticky sessions, TLS, WAF integration.
Real example & use case
ALB routes /api → API target group, /static → S3; NLB for gRPC TCP passthrough.
Pros & cons
Pros: L7 smart routing; L4 performance for non-HTTP. Cons: L7 terminates TLS — cert management; L4 no URL awareness.
Common mistakes
L7 LB without health checks; single LB bottleneck.
Best practices
Health check app endpoint not TCP only; cross-zone LB.
Follow-up questions
Open one as its own read / solve / listen card