Cloud load balancing distributes incoming network traffic across multiple servers or computing resources to ensure no single resource becomes overwhelmed, improving application availability, fault tolerance, and performance. Operating at various layers of the OSI model (Layer 4 for transport-level and Layer 7 for application-level routing), load balancers are essential infrastructure components for modern cloud architectures, supporting everything from simple round-robin distribution to sophisticated content-based routing with health checks, SSL termination, and cross-region failover. A key distinction to understand: Layer 4 load balancers route traffic based on IP addresses and TCP/UDP ports without inspecting packet contents, while Layer 7 load balancers make intelligent routing decisions by analyzing HTTP headers, URLs, cookies, and application data—this fundamental difference determines which balancer type suits your use case, whether you need raw throughput and minimal latency (Layer 4) or advanced content routing and protocol-aware features (Layer 7).
What This Cheat Sheet Covers
This topic spans 25 focused tables and 172 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: AWS Load Balancer Types
| Type | Example | Description |
|---|---|---|
aws elbv2 create-load-balancer --name my-alb --subnets subnet-12345 --scheme internet-facing | • Layer 7 (HTTP/HTTPS) load balancer with content-based routing • supports path-based and host-based rules, WebSocket, HTTP/2, and gRPC. | |
aws elbv2 create-load-balancer --name my-nlb --type network --subnets subnet-12345 | • Layer 4 (TCP/UDP/TLS) load balancer optimized for ultra-low latency and millions of requests per second • preserves source IP addresses. |