Choose from the requirement
Start with the protocol and the decision you need AWS to make. If the requirement says URL path, hostname, headers, authentication, or WAF, start with ALB. If it says TCP, UDP, QUIC, TLS pass-through, or a fixed address in each Availability Zone, start with NLB.
Start with what the workload needs
Choose from the protocol, routing decision, and address requirement. If several apply, give each service a separate job.
Use ALB
For HTTP or HTTPS applications that need routing by hostname, path, header, method, or query—and for AWS WAF or supported authentication at the load balancer.
DNS → HTTPS listener → path rule → target groupExample: /checkout → checkout-tg. Not for arbitrary TCP, UDP, or opaque TLS pass-through.Use NLB
For TCP, UDP, or QUIC services; TLS pass-through; or a stable address in each enabled Availability Zone.
DNS / zonal IP → TCP listener → target groupExample: :443 → tcp-service-tg. It cannot route from an HTTP URL or apply AWS WAF.Use GWLB
When VPC routes must insert a scalable fleet of third-party firewalls, IDS/IPS appliances, or other transparent network appliances.
route → GWLBE ⇄ firewall fleet → routeIt is an inspection hop, not the application entrance.Use Global Accelerator
When internet clients need static global anycast addresses and health-based routing to application endpoints in more than one AWS Region.
anycast IPs → Region → ALB or NLBIt does not replace ALB request rules or NLB flow selection.| Decision / option | ALB reads HTTP | NLB balances flows | GWLB inserts appliances | Global Accelerator selects regional entry |
|---|---|---|---|---|
| Scope + role | Regional application proxy · Layer 7 | Regional transport load balancer · Layer 4 | Regional routed inspection path · Layer 3 | Global standard accelerator · TCP/UDP delivery |
| Accepted traffic | HTTP, HTTPS WebSockets · HTTP/2 · gRPC support | TCP, TLS, UDP, TCP_UDP, QUIC, TCP_QUIC verified 2026-09-10 | IP packets; GENEVE encapsulation to appliances on UDP 6081 | TCP and UDP listeners |
| Decision inputs | Host, path, headers, method, query string, source-IP CIDR | Listener and flow; dual-stack rules can match source IP version | VPC route to GWLBE; flow stickiness selects appliance | Client location, endpoint health, regional traffic dials, endpoint weights |
| Selection chain | Listener rule → action → target group → target | Listener action → optional weighted target group selection → flow target | GWLBE → GWLB → appliance → GWLB → GWLBE | Listener → regional endpoint group → endpoint |
| Destination types | Instance, IP, Lambda ECS registers instance or IP targets | Instance, IP, ALB ALB target requires TCP setup | GENEVE-capable appliances registered as instance or IP targets | ALB, NLB, EC2, Elastic IP GWLB is not an endpoint |
| TLS handling | HTTPS listener terminates TLS; backend may use HTTP or HTTPS | TLS listener terminates; TCP listener can pass TLS through | Transparent insertion; decryption and inspection depend on appliance | Endpoint handles TLS; accelerator does not terminate application TLS |
| Address model | DNS endpoint with changing IPs; internet-facing or internal | Static address per enabled AZ; optional EIPs for internet-facing IPv4 NLB | Private GWLB endpoint used as a route-table target | Static anycast addresses; regional endpoints can change behind them |
| WAF + security | AWS WAF integration; ALB and target security groups | No AWS WAF integration; security groups can apply to the NLB | Appliances provide firewall, IDS, or IPS functions | No WAF integration at GA; associate WAF with an ALB endpoint |
| Choose when | HTTP applications need content routing, authentication, or WAF | Transport workloads need flow balancing, zonal static addresses, or TLS pass-through | Traffic must traverse a scalable appliance fleet | Multi-Region applications need global static entry and health-based regional selection |
[!NOTE] A common wrong turn: choosing NLB because it sounds faster, then discovering that the application needs path routing or WAF. Choose from the protocol and routing requirement first; validate capacity and latency separately.
Put each service in the path
ALB and NLB are alternative regional application entrances. Global Accelerator can sit in front of either one when clients need stable global addresses and regional failover. GWLB belongs on a route that must pass through a firewall or another virtual appliance.
Global Accelerator in front; ALB and NLB beside each other
Clients enter through Global Accelerator. Each listener reaches the regional load balancer required by that protocol. The Mumbai egress route uses GWLB for a separate firewall path.
Static anycast addresses · AWS global network · health-based regional endpoint selection
TCP :443 → ALB endpoints · TCP :8443 → NLB endpoints
EC2 · ECS · IP · Lambda where supported
EC2 · ECS · IP · ALB where supported
[!NOTE] Architecture boundary: GWLB is neither an application frontend nor the firewall. A route sends traffic to a GWLB endpoint, and GWLB selects an appliance. Repeat endpoints and appliances per Availability Zone where the production design requires zonal resilience.
Use ALB for HTTP routing
Use ALB when one HTTPS entrance must send /checkout to one service and /static to another, route multiple hostnames, apply AWS WAF, or perform supported authentication and JWT checks. The listener evaluates rules in priority order; the selected target group then chooses a healthy application target.
Route POST /checkout to the checkout service
Choose ALB because the decision depends on the hostname and URL path. This example terminates client TLS at the ALB and opens a separate HTTPS connection to the target.
1 · Client and network access
DNS resolves the ALB name. The ALB security group allows TCP 443.
POST https://shop.example.com/checkout2 · HTTPS listener :443
Protocol and port accept the connection. ACM certificate and TLS policy apply; TLS terminates here. Optional mutual TLS can verify a client certificate.
3 · AWS WAF on this ALB
A regional web ACL can allow, block, count, CAPTCHA, or challenge an HTTP request. A blocked request returns without calling an application target.
4 · checkout-tg selects a target
IP targets · HTTPS :8443 · HTTP/1.1 in this example. The target group’s configured algorithm chooses among eligible targets.
Listener and rule options
HTTP can redirect to HTTPS. Conditions include host, path, header, method, query, and source IP. Actions include forward, redirect, fixed response, and supported authentication or JWT validation features.
Target-group controls
Targets can be instance, IP, or Lambda. Configure protocol version, routing algorithm, health checks, stickiness, slow start where supported, and deregistration delay.
Network and operations
Use subnets across at least two Availability Zones in a standard Region. Observe access logs, WAF logs, target health, latency, and ALB versus target-generated HTTP status metrics.
[!NOTE] Common misconception: the target group inspects the URL. Correct model: the listener rule selects the target group.
Use NLB for transport protocols or zonal static IPs
Use NLB for TCP, TLS, UDP, TCP_UDP, QUIC, or TCP_QUIC services; for TLS pass-through; or when allowlists require a stable address per enabled Availability Zone. NLB maps a transport flow without reading an HTTP path. It can also target an ALB directly, or publish a service to interface VPC endpoints through PrivateLink—the arrows and target types matter.
Use NLB for a TCP service with a stable zonal address
The client connects to a listener, the listener forwards to a target group, and NLB selects a healthy target for that connection. It does not read an HTTP hostname or URL path.
TCP → 198.51.100.10:443- Zonal address
- 198.51.100.10
- Listener
- TCP :443
- Forwards to
- tcp-service-tg
Reads the transport flow—not Host or /checkout.
10.0.21.18:8443HEALTHY10.0.22.41:8443UNHEALTHYWhat stays together?
NLB maps a transport connection to a target. AWS does not publish the target-selection formula.
source port 51514Packets 1, 2, and 3 continue to 10.0.21.18:8443.
source port 51515Selection runs again and may choose another healthy target.
encrypted bytes → targetThe target can terminate TLS. NLB does not need to decrypt the HTTP request.
TLS ends at NLB → backend connectionNLB uses the configured target-group protocol for the target-side connection.
preserve_client_ip.enabled; topology restrictions also apply.Follow the arrows: NLB, ALB, and VPC endpoints
These patterns solve different problems. The target-group type tells you what NLB can actually forward to.
target type: alb→ALBNLB → ALB is a direct target type
Use it when the same entry needs NLB features—such as zonal static addresses or PrivateLink—and ALB still needs to route HTTP requests.
Configure: TCP target group of typealb; one ALB per target group; matching ports. Both load balancers must be in the same VPC and account, and the hop uses IPv4.endpoint service→NLBPrivateLink normally flows VPCE → NLB
Use this to publish your service privately to consumer VPCs. The consumer creates an interface endpoint; your endpoint service is associated with the provider NLB.
Do not model this as NLB → VPCE. For consumer traffic, the endpoint is the entrance and NLB is on the provider side.target type: ip→VPCE ENI IPsLiteral NLB → VPCE is an IP-target pattern
Use this only for a specific interface-endpoint bridge where the endpoint service and protocol support the path. NLB has no vpce target type.
Listener and target protocols
Listeners support TCP, TLS, UDP, TCP_UDP, QUIC, and TCP_QUIC. Target-group combinations vary by listener protocol; only a TCP listener can forward to an ALB target.
Flow and connection controls
Flow mapping uses transport fields. Configure cross-zone load balancing, deregistration delay, source-IP stickiness where supported, Proxy Protocol v2, and client-IP preservation with care.
Network and operations
Security groups can filter NLB traffic when attached. Observe healthy targets, zonal health, active and new flows, reset counts, processed bytes, port allocation errors, and TLS negotiation errors.
Use GWLB to insert a firewall fleet
Use GWLB when a route must send traffic through third-party firewalls, intrusion detection, or other GENEVE-capable appliances. The route table points to a zonal endpoint; GWLB selects an appliance and returns allowed traffic to the routed path.
Route a packet through a firewall fleet
Choose GWLB because the VPC route must insert an appliance before the packet reaches the application. Step through an allowed packet, then switch the firewall verdict to see where a dropped path ends.
service path
The destination route points at the zonal GWLB endpoint. The route, not the application listener, begins this detour.
- Route matches the application-subnet destination.
- The packet enters the zonal GWLB endpoint.
- The endpoint service carries it to GWLB.
- GWLB maps the flow to a healthy appliance.
- GWLB sends the original packet inside GENEVE over UDP 6081.
- The appliance allows or drops the packet.
- Allowed traffic returns through the endpoint and route to the application.
Route and endpoint ownership
A route table targets a zonal GWLB endpoint in the consumer VPC. PrivateLink connects that endpoint to the provider’s endpoint service and GWLB; the endpoint is distinct from the load balancer.
Flow stickiness and symmetry
Five-tuple stickiness is the default for TCP/UDP flows. Stateful appliances need both directions of a flow to traverse the expected inspection path; Transit Gateway appliance-mode designs add their own constraints.
Appliance and operations
Appliances must support GENEVE and allow UDP 6081. Observe target health, appliance capacity, dropped packets, route tables, flow logs, and forward/return-path symmetry.
[!NOTE] Common misconception: GWLB replaces the ALB or NLB. Correct model: route tables and an endpoint insert an appliance hop; allowed traffic continues toward the application entry.
Use Global Accelerator for multi-Region entry
Use a standard accelerator when clients need static anycast addresses and new connections should move between healthy regional ALB or NLB endpoints. Global Accelerator chooses the Region and endpoint; the regional load balancer still chooses the application target.
Use the same client addresses during regional failover
Choose Global Accelerator because clients need stable anycast addresses and new connections must move to another healthy Region. The ALB in that Region still handles HTTP routing.
When nothing is healthy
If Global Accelerator cannot find a healthy, positive-weight endpoint through its documented failover search, it can route to a random endpoint in the closest endpoint group. That is fail open, not a healthy result.
Addresses and listeners
A standard accelerator provides static anycast addresses. TCP and UDP listeners define accepted ports or ranges; AWS edge locations carry traffic onto the AWS global network.
Endpoint groups and controls
Each endpoint group belongs to one Region. Traffic dials adjust traffic already directed to a group; endpoint weights divide that group’s traffic among endpoints.
Health, TLS, and client IP
ALB and NLB endpoint health comes from Elastic Load Balancing. The regional endpoint terminates application TLS. Client-IP preservation depends on endpoint type and configuration and can change the VPC security path.
[!NOTE] Common misconception: a 50% traffic dial means half of all listener traffic, and changing it moves existing connections. Correct model: the dial applies to traffic already directed to that endpoint group, and updates affect new connections.
Check what happens when targets become unhealthy
A failed check changes one selector’s eligible set. It does not prove that the full request path has failed—or recovered.
What happens when a target becomes unhealthy?
Read across each row to see who detects failure, where new traffic goes, what happens to existing traffic, and why an all-unhealthy fail-open state is not recovery.
Why “fail open” is not recovery
The service stops excluding every failed candidate because exclusion would leave no route. The selected target can still reject, time out, or drop traffic. Alert on the original health loss and the resulting request outcome.
Choose a deployment pattern and test failures
Each extra selector adds a health boundary. Give every service one explicit job, then test what crosses the boundary when it fails.
Three common deployment patterns
Start with the smallest path that meets the requirement. Add another service only when it contributes a distinct capability.
Sources and documentation
- AWS architecture icons
- Elastic Load Balancing product types
- Application Load Balancer introduction
- ALB listeners
- ALB listener rule conditions
- ALB listener rule actions
- ALB JWT validation
- ALB target health
- Network Load Balancer introduction
- NLB listeners
- NLB target groups and health
- NLB target-group attributes and client IP
- Use an ALB as an NLB target
- Share a service through AWS PrivateLink
- Gateway Load Balancer introduction
- GWLB behavior and GENEVE
- GWLB inspection routing
- GWLB target failure behavior
- GWLB target-group attributes
- How Global Accelerator works
- Global Accelerator components
- Standard accelerator endpoints
- Global Accelerator traffic dials
- Global Accelerator unhealthy endpoint failover
- Global Accelerator client-IP preservation
- Client-IP preservation restrictions