ALB, NLB and GWLB selection
One address, many backends
Elastic Load Balancing (ELB) receives traffic and distributes it among registered targets such as EC2 instances. A listener accepts a protocol and port; its rules or default action select a target group, which defines backend protocol, port and health settings. A load balancer distributes traffic; an ASG creates or removes capacity. They work together but solve different problems. All examples are offline designs.
client -> listener -> target group -> EC2 instancesApplication Load Balancer (ALB)
ALB understands HTTP application-layer information (layer 7). It can route requests by paths or hostnames, for example sending catalog and checkout requests to different groups. HTTPS listeners can terminate client TLS using an appropriate certificate; backend encryption is a separate choice. Use a private backend network and security groups allowing required app and health-check traffic from the ALB. An internet-facing ALB need not make EC2 targets directly public. Choose rules carefully and define a default action for unmatched requests.
HTTPS :443/catalog/* -> catalog-tg/checkout/* -> checkout-tgdefault -> fixed 404 responseNetwork and Gateway Load Balancers
NLB operates primarily at the transport layer (layer 4). It suits TCP or UDP services that do not need HTTP path inspection, and supports TLS listeners for appropriate workloads. A TCP listener can pass encrypted application traffic through rather than terminating TLS at the NLB. Consult supported protocol combinations for the actual configuration. GWLB is designed to insert and scale virtual network appliances such as firewalls in a network traffic path; its appliance integration uses GENEVE encapsulation. It is not a general replacement for ALB. Classic Load Balancer is an older option; investigate migration requirements rather than selecting it for this new design.
HTTP path routing -> ALBraw TCP service -> NLBnetwork appliance insertion -> GWLBZones and cross-zone traffic
Enabling multiple AZs places load balancer nodes in those zones. With cross-zone load balancing, a node can distribute traffic across eligible targets in other enabled AZs. Without it, a node uses targets in its own zone. ALB has cross-zone enabled at the load balancer level, with target group settings available; NLB and GWLB default to disabled at load balancer level. Check the effective target group settings and supported overrides. Consider two targets in zone A and one in B: equal incoming traffic per zone could overload B when cross-zone is off. No exact request split is guaranteed.
Practice: select by requirement
Choose an ALB for the bookstore with HTTPS and path routing, an NLB for an internal raw TCP service, and a GWLB for a reviewed appliance insertion architecture. Verify required protocols, target type, zone capacity, access, certificate configuration and service availability before a real deployment. Load balancers themselves can generate hourly, capacity-related and data processing costs; exact dimensions depend on type and region. An offline architecture is not a bill estimate. Explain why an ALB listener is not an application authorization check.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
ALB, NLB and GWLB selection — knowledge check
Apply the fictional bookstore scaling and delivery design.
Which load balancer suits HTTP path-based routing?
Which type is designed for inserting virtual network appliances?
For a raw TCP service needing no HTTP inspection, which is the best fit among these?
What does a listener select using its rules or default action?
Cross-zone balancing is disabled and zone B has fewer targets than zone A. What risk follows if incoming traffic per zone is equal?