Interview AWS

When would you choose an ALB over an NLB?

AWS · Basic level

Answer

I choose ALB when I need HTTP features such as host/path routing, redirects, headers, WAF, authentication, or Kubernetes ingress. I choose NLB for non-HTTP protocols, static IPs, low latency, or transport-level load balancing.

Technical explanation

ALB integrates well with WAF and HTTP routing rules, making it a strong default for web apps and EKS ingress.

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.

Preparing for an interview?

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

← All AWS questions