What Is an Application Load Balancer? Route HTTP Requests by Host and Path
An application load balancer reads web requests and forwards them to the appropriate backend service. Unlike a balancer that chooses a destination only from an IP address and port, it commonly routes at the HTTP(S) layer using request attributes such as URL paths, host names, or headers. This is useful when several web services share one entry point, but features and scope vary by product.
An application load balancer reads web requests and forwards them to the appropriate backend service. Unlike a balancer that chooses a destination only from an IP address and port, it commonly routes at the HTTP(S) layer using request attributes such as URL paths, host names, or headers. This is useful when several web services share one entry point, but features and scope vary by product.
How does it choose a destination from a request?
The client connects to one public or private frontend address. A listener accepts a protocol and port, such as HTTPS on port 443. Routing rules inspect supported request attributes and choose a backend pool. For example, a rule could send shop.example.com/images/ to an image service and /api/ to an API service. This is an illustrative example, not a deployment procedure for a particular product.
Layer 7 (L7) is the application layer of the OSI networking model, where protocols such as HTTP have meaning. An application load balancer can therefore direct requests to different services based on URL paths or host names and can serve multiple domains through one entry point. It commonly acts as a proxy: it accepts a client connection and opens a separate connection to the backend. Depending on the product, it may also terminate TLS and re-encrypt to the backend, support cookie-based session affinity, redirects, header changes, or integration with a web application firewall (WAF). Verify each feature for the selected product instead of assuming it is universal.
How is it different from a network load balancer?
An application load balancer makes decisions from HTTP request content. A network load balancer generally distributes lower-level traffic, such as TCP or UDP connections. Network-layer balancing may fit non-HTTP protocols or a requirement to preserve client IP addresses. Application-layer routing is useful when requests must be split by URL path, host, or HTTP behavior.
| Need | Application load balancer | Network load balancer |
|---|---|---|
| Typical traffic | HTTP/HTTPS | TCP/UDP and other protocols the product supports |
| Routing criteria | Host, URL path, headers, or other supported HTTP attributes | IP, port, protocol, or connection properties, depending on product |
| Typical strength | Web routing and possible integration with TLS/HTTP features | Non-HTTP traffic or connection-oriented distribution |
| Consideration | Proxy, TLS boundaries, and application rules need operation | May not inspect HTTP content for path-based routing |
Product names do not guarantee identical capabilities. AWS Application Load Balancer uses listener rules and target groups to route HTTP requests by path and host conditions. Google Cloud describes its external Application Load Balancer as a proxy-based Layer 7 service, with scope and capabilities varying across global, classic, and regional modes. Azure Application Gateway provides regional Layer 7 features such as URL path and host-header routing. These examples illustrate the concept; they are not interchangeable products.
Example: route one web domain to three services
As an illustrative scenario, suppose example.com serves a web interface, an API, and image processing. An HTTPS listener accepts requests. Rules send /api/ to the API backend, /images/ to the image backend, and other paths to the web interface. Each service can then have its own target group and capacity policy while clients keep using one domain.
Routing rules do not replace service authentication or data consistency. If TLS terminates at the load balancer, decide whether to encrypt again to the backend and how to convey the original host and client information. Limit which proxy headers the application trusts. Incorrect rule order or a poor default rule can send traffic to the wrong backend or an unintended fallback.
What do health checks and connections affect?
A health check periodically determines whether a backend can accept new requests. Decide whether to check only an open port or an HTTP path such as /health and its response code. A shallow check can miss application failures; a check that depends on too many downstream systems can mark every backend unhealthy during a shared dependency slowdown. The check should reflect the service’s actual ability to handle requests.
Removing an unhealthy backend from new traffic does not necessarily move its existing connections to another server. Consider client retries, connection draining, where session state lives, and long-lived connections. Cookie-based affinity can pin some users to one server and affect load distribution and failover. Where feasible, externalize session state and make backends replaceable, while accounting for application constraints.
When should you choose one, and what should you verify?
Consider an application load balancer when HTTP(S) requests need routing to multiple services by path, host, or supported headers, or when you want TLS termination and web security features at the entry point. A network load balancer may fit arbitrary TCP/UDP protocols, client IP preservation, or simpler connection-level distribution. For traffic selection across regions, check whether the application load balancer’s regional scope is sufficient or whether a separate global layer is needed.
Before deployment, verify supported protocols and routing conditions, region and zone scope, certificates and backend encryption, health-check meaning, logging and client-IP forwarding, scaling, and cost. In a test environment, check each rule’s intended and default path, backend failure, certificate renewal, retries, and existing-connection behavior. During an incident exercise, validate actual responses alongside target status, error rates, and latency.
An application load balancer is useful when web requests need content-aware routing to different services. L7 routing does not automatically solve service health, authentication, or data recovery. Design request rules, TLS trust boundaries, health checks, sessions, and any global routing layer together, then verify them against the selected product’s behavior.
Sources
[AWS: What is an Application Load Balancer?](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html)
[Google Cloud: External Application Load Balancer overview](https://docs.cloud.google.com/load-balancing/docs/https)
[Microsoft Learn: What is Azure Application Gateway?](https://learn.microsoft.com/en-us/azure/application-gateway/overview)