How does an Elastic Load Balancer work, and what are ALB vs NLB vs CLB?
AWS · Basic level
Answer
Elastic Load Balancing distributes traffic to healthy targets. ALB is Layer 7 for HTTP/HTTPS routing, NLB is Layer 4 for TCP/UDP/TLS and high performance/static IP needs, and CLB is legacy for older patterns.
Technical explanation
ALB is application-aware; NLB is transport-focused; CLB should generally be treated as legacy.
Compute design should balance availability, scaling speed, startup time, instance limits, health checks, and deployment rollback, not just raw instance size.
Autoscaling and load balancing only work well when health checks reflect readiness and when applications externalize state.
Cost optimization should be tied to utilization data and workload tolerance for interruption, commitment, and architecture changes.
Hands-on example
1. Build a launch template or workload definition with IAM role, security groups, user data/bootstrap, health endpoint, and CloudWatch metrics.
2. Place compute behind an ALB/NLB or scaling group and run a controlled load test to observe scaling and health behavior.
3. Tune scaling policy, warmup/cooldown, target group health checks, and rollback procedure.
4. Compare cost and reliability after the test, then promote the configuration through IaC.
Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.
More AWS interview questions
- Difference between a launch template and a launch configuration.
- What is a target group, and how do health checks work on a load balancer?
- What are the S3 storage classes, and how do you pick between them?
- How would you give a Kubernetes pod scoped AWS permissions (IRSA / IAM Roles for Service Accounts)?
- How does S3 lifecycle management work?
- Explain how an IAM policy is evaluated when there is both an allow and an explicit deny.
- What is the difference between an identity-based and a resource-based policy?
- What is the difference between an IAM role and an IAM user, and when do you use a role?