AWS › Elastic Load Balancing (ALB, NLB & CLB)

What is Elastic Load Balancing and why is it important for building scalable, highly available applications?

Beginner

Answer

Elastic Load Balancing automatically distributes incoming application traffic across multiple targets, such as EC2 instances or containers, in one or more Availability Zones, improving both the fault tolerance of your application, since traffic automatically avoids unhealthy targets, and its ability to scale, since you can add or remove capacity behind the load balancer without any interruption to end users.
aws elbv2 create-load-balancer --name my-load-balancer --subnets subnet-12345 subnet-67890
Real-world example An online retailer places a load balancer in front of its fleet of EC2 instances, ensuring that if one instance becomes unhealthy during a traffic surge, the load balancer automatically stops sending it traffic while continuing to serve customers through the remaining healthy instances.

Common follow-ups: What is the difference between the three types of load balancers AWS offers?;How does a load balancer determine whether a target is healthy?