SysPadLessons › networking lessons › Application Load Balancer

How Application Load Balancer works

Layer-7 load balancer for HTTP/HTTPS traffic. Supports path-based routing, host-based routing, WebSockets, gRPC, and WAF integration. Auto-scales to handle traffic bursts.

An Application Load Balancer is the smart receptionist in front of your servers. It doesn’t just spread load, it reads the HTTP request and routes by path, host, or header, sends it to a healthy backend, and quietly drops any server that stops responding. One stable address, many interchangeable workers behind it.

What you will learn

It reads the request (Layer 7)

An ALB operates at Layer 7 (HTTP/HTTPS), so it can see the request’s path, host, headers, and method, not just an IP and port. That lets it make routing decisions based on what is being requested.

Target groups and health checks

Backends are organised into target groups (e.g. all the API servers). The ALB spreads requests across the group and runs health checks; a target that fails is taken out of rotation until it recovers.

This is what makes a fleet resilient: any single server can die without users noticing, traffic simply flows to the healthy ones.

The standard entry point for web apps and microservices behind an Auto Scaling group.

Many apps, one address

With listener rules you route by content: /api/* to the API group, shop.example.com to the shop group, a header to a canary group. One ALB can front several services on a single domain and certificate.

ALB vs NLB

Use an ALB for HTTP/HTTPS apps that benefit from content-based routing, TLS termination, and rich health checks. Use an NLB (Layer 4) for raw TCP/UDP, ultra-high throughput, the lowest latency, static IPs, or when you must preserve the client’s source IP.

Flashcards

What does operating at Layer 7 give an ALB?
Visibility into the HTTP request (path, host, headers), so it can route by content, terminate TLS, and run HTTP health checks.
How does an ALB keep users off a broken server?
Health checks: a target group member that fails is removed from rotation until it’s healthy again.
How do you put /api and /static behind one ALB?
Listener rules route by path (or host/header) to different target groups, so several services share one address and certificate.
When NLB over ALB?
Non-HTTP (TCP/UDP), extreme throughput / lowest latency, static IPs, or source-IP preservation, all Layer-4 NLB strengths.
Why put an ALB in front of an Auto Scaling group?
One stable address spreads traffic across interchangeable instances; as the ASG adds/removes instances, the ALB routes only to healthy ones.

Sources

Open the SysPad canvas · Official Application Load Balancer documentation

Other networking lessons