Introduction to Elastic Load Balancing (ELB)
Elastic Load Balancing (ELB) is a fundamental AWS service for creating highly available and scalable applications by distributing incoming traffic across multiple resources.
Elastic Load Balancing (ELB) is an AWS service that distributes incoming application traffic across multiple targets, such as Amazon EC2 instances, to ensure high availability, fault tolerance, and scalability. It monitors target health, automatically scales capacity based on traffic changes, and supports various load balancer types for different application needs. (Source Page 2, 5)
Elastic Load Balancing (ELB) is a fundamental AWS service for creating highly available and scalable applications by distributing incoming traffic across multiple resources.
To function effectively, an Elastic Load Balancer relies on listeners to receive traffic and target groups to manage the backend resources.
ELB offers four types of load balancers, each optimized for different application architectures and traffic patterns.
The four main types of Elastic Load Balancers are Application Load Balancer (ALB), Network Load Balancer (NLB), Gateway Load Balancer (GWLB), and Classic Load Balancer (CLB).
Elastic Load Balancers offer several advanced features to enhance security, performance, and application reliability.
Load balancers can be created and configured using either the AWS Management Console or the AWS Command Line Interface (AWS CLI). This section outlines the general steps for creating a load balancer using the AWS CLI.
The process involves creating the load balancer itself, defining target groups for backend resources, registering instances with those groups, and configuring listeners to direct incoming traffic.
Establishes the entry point for distributing traffic.
aws elbv2 create-load-balancer --name my-load-balancer --subnets subnet-01a subnet-02b --security-groups sg-xxxxxxxx --scheme internet-facing
Organizes backend instances and defines health check settings for them.
aws elbv2 create-target-group --name my-target-group --protocol HTTP --port 80 --vpc-id vpc-xxxxxxxx
Adds instances to the pool of resources that the load balancer can send traffic to.
aws elbv2 register-targets --target-group-arn arn:aws:elasticloadbalancing:... --targets Id=i-xxxxxxxx,Port=80
Configures the load balancer to listen on specific ports/protocols and forward requests to the target group.
aws elbv2 create-listener --load-balancer-arn arn:aws:elasticloadbalancing:... --protocol HTTP --port 80 --default-actions Type=forward,TargetGroupArn=arn:aws:elasticloadbalancing:...
Confirms that registered instances are healthy and ready to receive traffic.
aws elbv2 describe-target-health --target-group-arn arn:aws:elasticloadbalancing:...
A practical demonstration of ALB configuration highlights key aspects of target setup, traffic distribution, and security group interactions.
A review of NLB configuration options reveals its flexibility for high-performance, low-latency applications, particularly in setting up listeners and target groups.
Elastic Load Balancing plays a central role in designing robust, highly available, and scalable cloud architectures by working seamlessly with other AWS services.