Interview Prep/AWS/EC2, Auto Scaling and Load Balancing

What is the difference between an ALB, an NLB and a Gateway Load Balancer?

BeginnerScenarioEC2, Auto Scaling and Load Balancing
Answer

Situation read → They operate at different layers for different jobs.

What I'd do →

  1. ALB is layer 7: host and path routing, redirects, OIDC auth, WebSocket and gRPC
  2. NLB is layer 4: TCP, UDP, TLS, static IPs per AZ, extreme throughput, PrivateLink backend
  3. GWLB is layer 3: transparent insertion of firewalls and inspection appliances over GENEVE
  4. Choose ALB for HTTP microservices, NLB for non-HTTP or fixed IP, GWLB for appliances

Why → Matching layer to need avoids paying for features you do not use.

Interview tip → NLB preserves client IP by default for instance targets.

aws All AWS questions Roadmap: AWS core services

More on EC2, Auto Scaling and Load Balancing