Elastic Load Balancer

InfraboyInfraboy
5 min read

AWS Elastic Load Balancing (ELB) is a service from Amazon Web Services (AWS) that automatically spreads incoming traffic across multiple targets like Amazon EC2 instances, containers, and IP addresses in different Availability Zones. This helps make sure your applications are always available, fault-tolerant, and scalable.

There are three main types of load balancers offered by AWS ELB:

  1. Application Load Balancer (ALB)

  2. Network Load Balancer (NLB)

  3. Gateway Load Balancer (GWLB)

  4. Classic Load Balancer (CLB)

1. Application Load Balancer (ALB)

Use Case: ALB is designed to handle HTTP and HTTPS traffic. It operates at the application layer (OSI layer 7).

Features:

  • Advanced Routing: Supports host-based and path-based routing, allowing you to route requests to different backend services based on the URL.

  • WebSocket Support: Supports WebSocket and HTTP/2.

  • Target Groups: ALB uses target groups to route requests. You can register EC2 instances, IP addresses, and Lambda functions as targets.

  • Health Checks: Regularly checks the health of targets to ensure they can handle requests.

  • Security: Integrates with AWS WAF for application layer protection and AWS Shield for DDoS protection.

  • Containerized Applications: Supports dynamic port mapping for containerized applications.

2. Network Load Balancer (NLB)

Use Case: NLB is designed for ultra-high performance and static IP addresses. It operates at the transport layer (OSI layer 4).

Features:

  • High Throughput and Low Latency: Capable of handling millions of requests per second while maintaining ultra-low latencies.

  • Static IP Support: Provides a single static IP per Availability Zone for the load balancer.

  • TLS Termination: Offloads TLS termination to the load balancer, reducing the burden on your applications.

  • Health Checks: Performs health checks on the targets and routes traffic only to healthy targets.

  • Scalability: Automatically scales to handle increases in traffic.

  • Zonal Isolation: Designed for resilience to zonal failures, routing traffic only to healthy targets within healthy Availability Zones.

3. Gateway Load Balancer (GWLB)

Use Case: GWLB is designed to simplify the deployment, scaling, and management of third-party virtual appliances.

Features:

  • Traffic Steering: Uses the GENEVE protocol to encapsulate traffic between the load balancer and the virtual appliances.

  • Simplified Deployment: Provides a single entry and exit point for traffic to and from your virtual appliances.

  • Elasticity: Automatically scales the virtual appliance fleet up and down based on demand.

  • High Availability: Distributes traffic across multiple instances of your virtual appliances to ensure high availability.

4. Classic Load Balancer (CLB)

Use Case: CLB provides basic load balancing across multiple Amazon EC2 instances and operates at both the application and transport layers (OSI layers 4 and 7).

Features:

  • Basic Load Balancing: Suitable for applications built within the EC2-Classic network.

  • Sticky Sessions: Supports session stickiness (also known as session affinity) to ensure that user requests are routed to the same instance.

  • Health Checks: Supports health checks to monitor the status of the backend instances.

Common Features Across All ELBs

  • Health Monitoring: All types of ELBs perform regular health checks to ensure only healthy instances receive traffic.

  • Auto Scaling Integration: Integrates with AWS Auto Scaling to automatically adjust the number of instances based on traffic.

  • Security Features: Supports integration with AWS Identity and Access Management (IAM), Amazon Virtual Private Cloud (VPC), and AWS Certificate Manager (ACM) for managing security.

  • Logging and Monitoring: Provides detailed CloudWatch metrics, access logs, and request tracing.

Key Benefits

  • High Availability: Distributes traffic across multiple instances and Availability Zones to ensure high availability and fault tolerance.

  • Scalability: Automatically scales to handle varying levels of application traffic.

  • Security: Enhances security through integration with AWS security services and features.

  • Cost-Effectiveness: Helps optimize costs by distributing traffic efficiently and enabling elasticity.

limits :

AWS Elastic Load Balancing (ELB) has different limits and quotas you should know about. These limits depend on the type of load balancer you are using (Application Load Balancer, Network Load Balancer, Gateway Load Balancer, or Classic Load Balancer). Here are the main limits for each type:

Application Load Balancer (ALB)

  • Listeners per load balancer: 50

  • Rules per load balancer: 100

  • Certificates per load balancer (HTTP/HTTPS listeners): 25

  • Target groups per load balancer: 100

  • Targets per target group: 1000

  • Load balancers per region: 20 (this can be increased by request)

  • Target groups per region: 3000

  • Targets per region: 3000

Network Load Balancer (NLB)

  • Listeners per load balancer: 50

  • Target groups per load balancer: 300

  • Targets per target group: 1000

  • Load balancers per region: 20 (this can be increased by request)

  • Target groups per region: 3000

  • Targets per region: 3000

  • Static IP addresses per Availability Zone: 1

Gateway Load Balancer (GWLB)

  • Listeners per load balancer: 1

  • Endpoint services per load balancer: 1000

  • Endpoint service endpoints per load balancer: 10,000

  • Load balancers per region: 20 (this can be increased by request)

Classic Load Balancer (CLB)

  • Listeners per load balancer: 100

  • Health checks per load balancer: 50

  • Load balancers per region: 20 (this can be increased by request)

  • Instances per load balancer: No hard limit, but practical limits due to performance considerations.

Common Limits Across All Load Balancers

  • Tags per load balancer: 50

  • CIDR blocks per security group rule: 20

  • Security groups per load balancer: 5

  • Security group rules per load balancer: Depends on security group limits

Quotas and Increases

  • Increase Request: Most default limits can be increased by submitting a request through the AWS Service Quotas console or by contacting AWS Support.

  • Regional Limits: Many limits are regional, meaning they apply separately to each AWS region.

Practical Considerations

  • Scaling and Performance: ELB automatically scales to handle increases in traffic, but the performance and scalability can depend on various factors such as the instance types, the application architecture, and the nature of the traffic.

  • Billing: There are costs associated with using ELB based on the number of hours load balancers are running, the amount of data processed, and the number of new connections and active connections per hour.

0
Subscribe to my newsletter

Read articles from Infraboy directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Infraboy
Infraboy

We will provide all kinds of the note which is related to IT infra courses like : Networking , Cloud Computing , AWS , CEH , Cyber Security