Elastic Load Balancing (ELB) is a fully managed AWS service that automatically distributes incoming application traffic across multiple targets, such as EC2 instances, containers, IP addresses, and Lambda functions. ELB helps ensure high availability, fault tolerance, and scalability for your appli…Elastic Load Balancing (ELB) is a fully managed AWS service that automatically distributes incoming application traffic across multiple targets, such as EC2 instances, containers, IP addresses, and Lambda functions. ELB helps ensure high availability, fault tolerance, and scalability for your applications.
ELB offers four types of load balancers:
1. **Application Load Balancer (ALB)**: Operates at Layer 7 (application layer) and is ideal for HTTP/HTTPS traffic. It supports advanced routing based on URL paths, host headers, and query strings. ALB is perfect for microservices and container-based architectures.
2. **Network Load Balancer (NLB)**: Operates at Layer 4 (transport layer) and handles TCP, UDP, and TLS traffic. It can handle millions of requests per second with ultra-low latency, making it suitable for high-performance applications.
3. **Gateway Load Balancer (GWLB)**: Operates at Layer 3 and is designed for deploying, scaling, and managing third-party virtual appliances like firewalls and intrusion detection systems.
4. **Classic Load Balancer**: The legacy option that works at both Layer 4 and Layer 7, though AWS recommends using newer load balancer types.
Key benefits of ELB include:
- **High Availability**: Distributes traffic across multiple Availability Zones
- **Auto Scaling Integration**: Works seamlessly with EC2 Auto Scaling to handle varying traffic loads
- **Health Checks**: Monitors target health and routes traffic only to healthy instances
- **Security**: Integrates with AWS Certificate Manager for SSL/TLS termination and supports security groups
- **Elasticity**: Automatically scales capacity to meet traffic demands
ELB is a pay-as-you-go service where you pay for the hours your load balancer runs and the data processed. It eliminates the need to manage your own load balancing infrastructure, reducing operational overhead while improving application reliability and performance.
Elastic Load Balancing (ELB) - Complete Guide
Why Elastic Load Balancing is Important
Elastic Load Balancing is a critical component in building highly available, fault-tolerant, and scalable applications on AWS. It ensures that your applications can handle varying amounts of traffic by distributing incoming requests across multiple targets, preventing any single resource from becoming overwhelmed. This is essential for maintaining performance and ensuring users have a consistent experience.
What is Elastic Load Balancing?
Elastic Load Balancing (ELB) is a fully managed AWS service that automatically distributes incoming application traffic across multiple targets such as EC2 instances, containers, IP addresses, and Lambda functions. ELB operates across multiple Availability Zones, increasing the fault tolerance of your applications.
Types of Load Balancers:
• Application Load Balancer (ALB) - Best suited for HTTP/HTTPS traffic, operates at Layer 7 (application layer), supports path-based and host-based routing
• Network Load Balancer (NLB) - Best for TCP/UDP traffic requiring ultra-high performance, operates at Layer 4 (transport layer), capable of handling millions of requests per second
• Gateway Load Balancer (GWLB) - Used for deploying, scaling, and managing third-party virtual appliances like firewalls and intrusion detection systems
• Classic Load Balancer - Legacy option supporting both Layer 4 and Layer 7, not recommended for new applications
How Elastic Load Balancing Works
1. Traffic Reception - The load balancer receives incoming traffic from clients
2. Health Checks - ELB continuously monitors the health of registered targets using configurable health checks
3. Traffic Distribution - Healthy targets receive traffic based on the configured routing algorithm
4. Scaling - ELB automatically scales its capacity to handle incoming traffic
5. Cross-Zone Load Balancing - Distributes traffic evenly across all registered targets in all enabled Availability Zones
Key Features:
• High availability across multiple Availability Zones • Automatic scaling to meet traffic demands • Integration with Auto Scaling groups • SSL/TLS termination for secure connections • Sticky sessions (session affinity) support • Integration with AWS Certificate Manager • CloudWatch metrics and access logging
Exam Tips: Answering Questions on Elastic Load Balancing (ELB)
• Know the Load Balancer Types - Understand when to use ALB (HTTP/HTTPS, Layer 7) versus NLB (TCP/UDP, Layer 4, extreme performance)
• Health Checks - Remember that ELB only sends traffic to healthy targets; unhealthy instances are removed from rotation
• High Availability - ELB works across multiple Availability Zones to provide fault tolerance
• Auto Scaling Integration - ELB and Auto Scaling work together; ELB distributes traffic while Auto Scaling adjusts capacity
• Cost Considerations - You pay for the time your load balancer runs and the amount of data processed
• Layer Understanding - If a question mentions HTTP headers, cookies, or URL paths, think ALB; if it mentions raw TCP performance, think NLB
• Security - ELB integrates with security groups and can terminate SSL/TLS connections
• Sticky Sessions - When questions mention maintaining user session data on the same instance, remember sticky sessions feature
• Classic vs Modern - For exam questions, ALB and NLB are the preferred modern solutions over Classic Load Balancer