AWS Medium technical 1 views 1 min read

What is the difference between an Application Load Balancer and a Network Load Balancer?

Peer-reviewed by HireXTech Technical Panel Updated for 2025/2026 hiring Editorial standards
Practise this track
Interviewer Expectations for this Question
01
Core Competency

Assesses fundamental understanding of AWS conventions, runtime behavior, and memory/performance considerations.

02
Evaluation Criteria

Hiring managers look for precision, avoidance of ambiguous jargon, and ability to explain trade-offs under real production conditions.

Comprehensive Model Answer Verified Solution

Both are Elastic Load Balancers, but they operate at different OSI layers.

  • Application Load Balancer (layer 7) understands HTTP and HTTPS, supports host and path-based routing, sticky sessions, and WebSockets, and integrates with WAF. It terminates TLS and adds X-Forwarded-For headers.
  • Network Load Balancer (layer 4) handles TCP, UDP, and TLS, offers extremely high throughput and ultra-low latency, and preserves the client source IP. It can have a static IP per Availability Zone.

Choose ALB for web applications and microservices that route by URL. Choose NLB for non-HTTP protocols, gaming, IoT, or when you need static IPs or millions of requests per second.

aws elbv2 create-listener --load-balancer-arn arn:aws:elasticloadbalancing:... \
  --protocol HTTPS --port 443 --certificates CertificateArn=arn:aws:acm:...

Both support health checks and cross-zone load balancing.

Candidate Response Strategy & Interview Tips

  1. Start with a concise one-sentence summary: Deliver a direct, confident answer first before expanding into nuances.
  2. Demonstrate real-world trade-offs: Discuss where this approach excels and when you would avoid it in production systems.
  3. Discuss complexity & edge cases: Proactively explain time/space complexity or boundary conditions (null values, scale limits).
  4. Prepare for interviewer follow-ups: Technical hiring panels frequently probe deeper into concurrency, backward compatibility, or alternative libraries.
Related Topics & Skills
Spotted an error or have an alternative solution?