Elastic Load Balancing
View on GitHubElastic Load Balancing
Elastic Load Balancing is a regional managed service that distributes incoming network or application traffic across multiple targets to improve availability and fault tolerance. It offers multiple load balancer types for different layers (for example, application and network) and operates inside a VPC to route traffic to registered targets such as EC2 instances, IP addresses, containers, or Lambda functions. It is typically placed at the edge of application VPCs to receive client requests and forward them to target groups according to listeners and routing rules.
🗂 Resource Category
Networking and Content Delivery
🧠 Exam Memory Hook
Think: "Client traffic + path/port routing at VPC edge = Elastic Load Balancing"
📖 Ownership
Classification: AWS Managed Service
AWS responsibilities: AWS operates and maintains the Elastic Load Balancing control plane, the managed load balancer infrastructure, and the underlying AWS physical infrastructure and networking. AWS secures and patches the service platform, manages availability of the load balancer endpoints, and provides managed integrations for metrics and access logs. AWS is responsible for the managed runtime components of the load balancer service and for physical host and hypervisor patching.
Customer responsibilities: The customer configures listeners, routing rules, target groups, health checks, TLS certificates (or integrates with AWS Certificate Manager), security groups, and access controls; registers and configures targets (EC2 instances, container tasks, IP addresses, or Lambda functions); and monitors metrics, access logs, and target health. The customer secures application-layer credentials and private keys, implements appropriate security group and network ACL rules, and performs capacity planning for backend targets. The customer is responsible for application and target patching, application-level monitoring, and any automation that adjusts target capacity.
Patching responsibilities: AWS patches the physical infrastructure, hypervisor, and the managed load balancer control plane and runtime. The customer patches guest operating systems, installed runtimes, libraries, dependencies, and applications on target instances or on customer-managed container hosts. When using managed compute (for example AWS Lambda or Fargate), AWS patches the managed runtime; when using EC2/EKS worker nodes, the customer patches the guest OS and container images.
🏗 Typical Architecture
💡 Top 5 Features
- Provides multiple native load balancer types (Application Load Balancer, Network Load Balancer, Gateway Load Balancer) to address different protocol and performance requirements.
- Supports listener-based routing with host, path, and port rules to forward requests to target groups.
- Offers configurable health checks and target groups to ensure traffic is routed only to healthy targets.
- Supports TLS termination and certificate integration when configured, including Server Name Indication (SNI) for many use cases.
- Emits metrics and optional access logs for integration with Amazon CloudWatch and S3 for operational monitoring and auditing.
✅ Top 5 Use Cases
- Route HTTP/HTTPS traffic to microservices running on EC2, ECS, or EKS with path- or host-based routing and TLS termination to centralise certificate management.
- Distribute high-throughput TCP or UDP traffic to backend proxies or appliances using a Network Load Balancer for low-latency connections and static IP needs.
- Insert third-party virtual network appliances using a Gateway Load Balancer to provide inline inspection, filtering, or other L4-L7 services.
- Provide cross-AZ traffic distribution and automatic failover of client requests across healthy targets to increase application availability.
- Terminate TLS at the load balancer and forward decrypted traffic to internal targets when offloading cryptographic work from backend hosts is desired.
🏗 Architecture Placement
Elastic Load Balancing typically sits at the edge of a VPC or an internal subnet and receives traffic from clients, other AWS services, or internal consumers. It accepts traffic on configured listeners and forwards requests to registered target groups inside the VPC such as EC2 instances, container tasks, IP addresses, or Lambda functions. The service is regional and can distribute traffic across Availability Zones when configured. Placement and behaviour depend on the selected load balancer type and listener configuration.
🎯 Commonly Used With
- Amazon EC2
- Amazon ECS
- Amazon EKS
- Amazon VPC
- AWS Certificate Manager
🌍 5 Real-World Examples
- A banking web front end uses an Application Load Balancer to terminate TLS, apply host-based routing for multiple services, and forward traffic to ECS tasks for each service to simplify certificate management.
- A healthcare API uses a Network Load Balancer to accept high-volume TCP connections from partner systems and forward them to EC2-based integration servers requiring static IPs.
- A retail application uses an Application Load Balancer in front of EKS worker nodes to route requests to microservices and integrate with WAF for application-layer protections.
- A telecommunications environment uses a Gateway Load Balancer to place virtual network appliances inline for packet inspection and routing without changing existing traffic flows.
- A media processing pipeline uses a Network Load Balancer to distribute UDP and TCP ingest traffic to horizontally scaled processing instances to improve availability.
🎓 AWS Exam Clues
- Choose an Application Load Balancer when you need HTTP/HTTPS features such as host/path routing, WebSocket support, or HTTP/2.
- Choose a Network Load Balancer when you need static IPs, preserve source IP, or require extreme performance for TCP/UDP traffic.
- Choose a Gateway Load Balancer when you need to insert and scale third-party virtual appliances for network traffic inspection.
- Remember that target groups and health checks determine routing; backend targets and their patch state remain a customer responsibility.
- Security groups apply to EC2 instances and ENIs; ensure load balancer listeners and target security are configured appropriately.
📝 Quick Revision
Elastic Load Balancing distributes client traffic to registered targets using different load balancer types for L4 and L7 needs. Use ALB for HTTP/HTTPS routing and path/host rules, NLB for high-performance TCP/UDP and static IP scenarios, and ensure you manage target patching, health checks, TLS configuration, and security group rules.
🏷 Keywords
Application Load Balancer • Network Load Balancer • Gateway Load Balancer • target groups • listeners • TLS termination • health checks • cross-zone load balancing • access logs • preserve source IP • deregistration delay • SNI