Elastic Load Balancing (ELB)
Cloud service · AWS · Updated

Elastic Load Balancing (ELB)

In short

Elastic Load Balancing (ELB) is a service provided by Amazon Web Services (AWS) that automatically distributes incoming application traffic across multiple targets, such as EC2 instances, containers, and IP addresses, to ensure fault tolerance and scalability.

Cloud Services Hub →

7 key features of Elastic Load Balancing (ELB)

Elastic Load Balancing ensures high availability by automatically distributing traffic across multiple targets, scaling based on demand, performing health checks, offering strong security features, providing in-depth monitoring, and delivering flexibility through various balancer types.

01
High Availability

Elastic Load Balancing automatically distributes incoming application or network traffic across multiple targets, such as EC2 instances, containers, and IP addresses, across one or more Availability Zones, ensuring high availability and fault tolerance for your applications.

02
Automatic Scaling

ELB scales its request handling capacity in response to incoming application traffic, meaning it automatically adjusts to handle the load without manual intervention, ensuring your applications can maintain performance during demand spikes and drops.

03
Health Checks

ELB continuously performs health checks on registered targets, automatically routing traffic away from unhealthy instances and towards healthy ones, enhancing the reliability and availability of your applications.

04
Security Features

Elastic Load Balancing supports security features such as SSL/TLS termination, which offloads the SSL decryption work from the application instances to the load balancer, improving security and performance. It also works seamlessly with AWS Certificate Manager for easy SSL certificate management.

05
Operational Monitoring and Logging

ELB provides detailed request-level logging and integrates with Amazon CloudWatch for metrics and analytics, enabling you to monitor and analyze the performance and health of your applications.

06
Flexible Load Balancer Types

Elastic Load Balancing offers four types of load balancers: Application Load Balancer, Network Load Balancer, Gateway Load Balancer, and Classic Load Balancer.

07
QUIC Load Balancing

Network Load Balancer supports QUIC at the transport layer (Layer 4).

Where Elastic Load Balancing (ELB) is used

Elastic Load Balancing (ELB) enhances application availability and fault tolerance, supports auto-scaling, ensures secure applications via SSL/TLS offloading, adeptly handles unpredictable traffic spikes, and offers multi-protocol support for diverse application needs.

  1. 01
    High Availability and Fault Tolerance

    ELB efficiently distributes incoming application traffic across multiple targets, such as Amazon EC2 instances, containers, IP addresses, and Lambda functions, in multiple Availability Zones. This distribution ensures that only healthy targets receive traffic, enhancing the application's overall availability and fault tolerance.

  2. 02
    Auto Scaling Support

    ELB seamlessly integrates with Auto Scaling, automatically adjusting the load balancing capacity to match the load with the number of instances available. This ensures that the application can maintain performance and promptly handle increases or decreases in traffic without manual intervention.

  3. 03
    Secure Applications

    ELB offers built-in security features like SSL/TLS termination, which enables it to decrypt requests before sending them on to the application's back-end targets. This use case helps in offloading the encryption and decryption work from the application, simplifying compliance and security management.

  4. 04
    Handling Spiky Traffic Patterns

    ELB is designed to handle sudden spikes in traffic, automatically scaling its resources to meet demand without the need for manual configuration. This capability is crucial for applications experiencing unpredictable traffic patterns or those subjected to time-based traffic patterns, such as event-driven traffic spikes.

  5. 05
    Multi-protocol Support

    Elastic Load Balancing supports multiple protocols including HTTP, HTTPS, TCP, and UDP. This flexibility enables developers to build applications that require real-time communication as well as applications that need traditional request-response protocols, ensuring that ELB can be used for a wide range of applications.

How Elastic Load Balancing (ELB) is priced

ELB pricing involves charges based on the type of load balancer (Classic, Application, Network, Gateway) with costs calculated on Load Balancer hours, Load Balancer Capacity Units (LCUs), or Data Processing Units (DPUs), depending on the service, and varies by region.

Classic Load Balancer

Charges apply for each hour or partial hour the load balancer runs and each GB of data transferred through it; partial hours are billed as full hours.

Application Load Balancer

Charges apply for each running hour or partial hour and the Load Balancer Capacity Units (LCUs) used. LCU usage is determined by the highest consumption across new connections, active connections, processed bytes, and rule evaluations.

Network Load Balancer

Charges apply for each running hour or partial hour and the capacity units used. Capacity-unit usage is determined by the highest consumption across new connections or flows, active connections or flows, and processed bytes.

Gateway Load Balancer

Charges apply for each hour or partial hour the load balancer runs and the Gateway Load Balancer Capacity Units (GLCUs) used per minute; partial running hours are billed as full hours.

Load Balancer Capacity Unit Reservation

Application, Network, and Gateway Load Balancers support capacity-unit reservation pricing: charges cover load balancer running hours, reserved capacity units per minute, and usage exceeding the reservation.

Data Transfer

Standard AWS data transfer charges apply in addition to ELB charges.

Public IPv4 Addresses

Standard public IPv4 address charges apply to all addresses consumed with load balancers.

Gateway Load Balancer Endpoints

Gateway Load Balancer endpoints are priced and billed separately under AWS PrivateLink pricing.

Mutual TLS Trust Stores

When using mutual TLS, an hourly charge applies per trust store associated with an Application Load Balancer.

AWS Free Tier

Starting July 15, 2025, new AWS customers receive up to $200 in Free Tier credits applicable to eligible services including ELB. Customers can choose a free plan available for six months or a paid plan; credits must be used within 12 months of account creation.

Services Elastic Load Balancing (ELB) works with

Amazon EC2Amazon EC2

Routes incoming traffic to Amazon EC2 instances, distributing load and improving fault tolerance across multiple instances.

Amazon API GatewayAmazon API Gateway

Elastic Load Balancing provides private backends for API Gateway through VPC links. Depending on the API and VPC link type, API Gateway can forward requests through an Application Load Balancer or Network Load Balancer to private application targets.

Amazon AthenaAmazon Athena

Elastic Load Balancing access logs stored in Amazon S3 can be queried with Athena. This lets you investigate slow requests, identify frequently accessed URLs, and analyze load balancer error responses using SQL.

Amazon CloudFrontAmazon CloudFront

Application Load Balancers and Network Load Balancers can serve as CloudFront origins, including supported configurations using private VPC origins. CloudFront delivers requests to the load balancer, which distributes them across application targets.

Amazon CloudWatchAmazon CloudWatch

Elastic Load Balancing publishes metrics to CloudWatch, including traffic volumes, target health, latency, and errors, with available metrics varying by load balancer type. CloudWatch alarms can notify operators when healthy target counts fall or response times increase.

Amazon CognitoAmazon Cognito

Application Load Balancer HTTPS listeners can authenticate users through Cognito user pools before forwarding requests to application targets. The load balancer handles the authentication redirect and passes identity information to the backend.

Amazon DevOps GuruAmazon DevOps Guru

DevOps Guru analyzes supported Elastic Load Balancing resource metrics to detect anomalous application behavior. Load balancer latency and error anomalies can become part of operational insights that help identify application problems.

Amazon EC2 Auto ScalingAmazon EC2 Auto Scaling

Elastic Load Balancing automatically registers and deregisters instances as an attached EC2 Auto Scaling group grows or shrinks. Auto Scaling can also use load balancer health checks to replace unhealthy instances and Application Load Balancer request counts to drive target tracking.

Amazon Elastic Container Service (Amazon ECS)Amazon Elastic Container Service (Amazon ECS)

Elastic Load Balancing distributes traffic to ECS service tasks, and ECS updates target registrations as tasks start and stop. Application Load Balancers can route different URL paths to different container services, while Network Load Balancers support transport-layer traffic.

Amazon Elastic Kubernetes Service (Amazon EKS)Amazon Elastic Kubernetes Service (Amazon EKS)

Application Load Balancers and Network Load Balancers expose applications running on EKS. The AWS Load Balancer Controller provisions and configures load balancers from Kubernetes Ingress and Service resources and manages their targets.

Alternatives to Elastic Load Balancing (ELB) in other clouds

Azure

Azure Application Gateway

AWS Elastic Load Balancing, through its Application Load Balancer (ALB), and Azure Application Gateway both route HTTP and HTTPS traffic to healthy backends and support autoscaling and TLS termination. ALB integrates with AWS WAF, while Azure Application Gateway provides web application firewall protection through its WAF_v2 tier.

Compare fact by fact
Elastic Load Balancing (ELB)Azure Application Gateway
Web application firewallAWS WAF integrationWAF_v2 tier
Capacity billing factorsConnections, bytes, rule evaluationsThroughput, persistent conns, compute
Azure Front Door

AWS Elastic Load Balancing (ELB), through its Application Load Balancer (ALB), and Azure Front Door both route HTTP(S) requests to healthy backends. ELB also handles TCP and UDP through its Network Load Balancer (NLB), while Front Door focuses on global HTTP(S) delivery across regions and hosting platforms.

Compare fact by fact
Elastic Load Balancing (ELB)Azure Front Door
Traffic distribution scopeAcross AWS Availability ZonesAcross regions and hosting platforms
Azure Load Balancer

AWS Elastic Load Balancing’s Network Load Balancer (NLB) and Azure Load Balancer distribute TCP and UDP traffic across healthy backends. AWS offers HTTP request routing through a separate type, Application Load Balancer (ALB), while Azure Load Balancer routes at Layer 4 and leaves TLS termination to the backend or a separate proxy.

Compare fact by fact
Elastic Load Balancing (ELB)Azure Load Balancer
Network load balancing chargesNLB running hours + capacity unitsStandard rule-hours + data processed

What is Elastic Load Balancing (ELB)

3 min read

Elastic Load Balancing (ELB) is a pivotal service offered by Amazon Web Services (AWS) that automatically distributes incoming application traffic across multiple targets, such as Amazon EC2 instances, containers, IP addresses, and Lambda functions, among others. This service is designed to enhance the availability and scalability of an application by ensuring that no single server bears too much demand. By balancing the load, ELB helps in handling the varying load of your application traffic in a robust and seamless manner. ELB is not just about distributing load but also about ensuring that your application can provide a consistent and reliable user experience. 

ELB offers various types of load balancers that cater to different use cases. The Application Load Balancer (ALB) is ideal for HTTP and HTTPS traffic, providing advanced request routing targeted at the delivery of modern application architectures, including microservices and containers. Network Load Balancer (NLB) is best suited for TCP, UDP, and TLS traffic where extreme performance and static IP is required for the load balancer. Lastly, the Classic Load Balancer (CLB) is intended for applications that were built within the EC2-Classic network. 

Gateway Load Balancer supports deploying inline third-party virtual appliances, transparently passing Layer 3 traffic through them.

Gateway Load Balancer endpoints are VPC endpoints powered by AWS PrivateLink that allow applications to exchange traffic securely with Gateway Load Balancer across VPC boundaries.

Listeners define the protocol and port used by clients to connect to a load balancer. Target groups define the protocol and port for connections to targets and the health check settings used to assess those targets.

Classic Load Balancer distributes traffic evenly across enabled Availability Zones by default. Enabling cross-zone load balancing distributes traffic evenly across registered instances in all enabled zones; maintaining approximately equivalent instance counts in each zone is still recommended for fault tolerance.

Application Load Balancers are also available on AWS Outposts.

One of the significant benefits of using ELB is its ability to automatically adapt to the changing traffic patterns. With ELB, you don't need to provision your infrastructure to handle peak loads. ELB automatically scales its request handling capacity in response to incoming application traffic. Hence, it ensures that your application remains available and performs well even during unexpected surges in demand. 

Application Load Balancer capacity reservation lets you reserve a minimum amount of load balancing capacity in LCUs ahead of anticipated traffic increases, rather than relying solely on reactive scaling.

ELB also enhances the security posture of your application by integrating with AWS Certificate Manager (ACM) easily, allowing you to deploy SSL/TLS certificates on your load balancer and encrypt data in transit effortlessly. Furthermore, it supports security features like AWS WAF (Web Application Firewall), which can protect your applications from common web exploits. The health check feature of ELB automatically checks the health of the instances or containers it is forwarding traffic to and ensures that the traffic is only directed to the healthy ones. This ensures high availability and fault tolerance in your application architecture. 

Application Load Balancer supports mutual TLS authentication of clients. In verify mode, it validates client certificates against a configured trust store; in passthrough mode, it passes client certificate information to the application for authentication.

Monitoring is another critical aspect where ELB excels. It integrates with Amazon CloudWatch, providing metrics and logs that give insights into the traffic patterns and performance of your applications. This data is instrumental in making informed decisions regarding capacity planning, optimization, and understanding user behavior.

In conclusion, Elastic Load Balancing stands as a sophisticated solution for distributing incoming application or website traffic across multiple targets, ensuring high availability, and facilitating a smoother and secure user experience. Its ability to scale and adapt to traffic variations in real-time, coupled with robust security and monitoring features, makes it an indispensable tool in the arsenal of developers and organizations aiming to optimize their applications' performance and reliability on the cloud.

Elastic Load Balancing (ELB) exam questions

Real practice exam questions on Elastic Load Balancing (ELB), with the correct answer and its explanation. Answer them with every option in the exam simulator.

CLF-C02

A company runs an online store on Amazon EC2 instances. One group of instances handles catalog requests, and another group handles order requests. Both groups must use the same website hostname. The company needs a managed solution that sends requests for /catalog to healthy catalog instances and requests for /orders to healthy order instances. Which solution meets these requirements?

Show answerCORRECT ANSWER

Use an Application Load Balancer with path-based routing rules and a target group for each instance group.

An Application Load Balancer, part of Elastic Load Balancing, can route HTTP requests based on URL paths. Separate target groups with health checks allow it to send catalog and order requests to healthy instances in the appropriate group.

SOA-C03

A company deploys an HTTP application to EC2 instances in successive batches behind an Application Load Balancer (ALB). The target group uses round-robin routing with stickiness disabled. Existing healthy instances have fully populated application caches.

Each replacement instance passes readiness checks before registration, but its cache needs approximately 180 seconds of production requests to warm up. Newly healthy instances currently receive a full share of requests immediately, causing temporary latency spikes. The remaining instances have sufficient capacity during cache warmup.

A CloudOps engineer must configure the ALB to increase each replacement instance's share of requests gradually over 180 seconds after it becomes healthy, without delaying its initial eligibility for production traffic. Which change meets these requirements?

Show answerCORRECT ANSWER

Enable slow start on the target group with a duration of 180 seconds and retain round-robin routing.

ALB slow start gradually increases the share of requests sent to a newly healthy target over the configured duration. This allows replacement instances to warm their caches while serving production requests. Round-robin routing supports slow start.

SAP-C03

A company is deploying an internet-facing application behind Application Load Balancers (ALBs) in eu-west-1 and ap-southeast-2 in the same AWS account. Both ALBs will serve https://payments.example.com through a DNS-based failover configuration. Each Region must remain ready to accept production traffic.

An external provider manages the company's authoritative public DNS. The provider will approve an initial batch of certificate-validation records, but subsequent DNS changes require a lengthy security review. The company requires publicly trusted certificates with automatic renewal and deployment to both ALBs. After initial issuance, renewal must not require human approval or a custom certificate-copying workflow.

Which solution meets these requirements?

Show answerCORRECT ANSWER

Request an ACM public certificate for payments.example.com in each Region by using DNS validation. Have the DNS provider publish the ACM validation CNAME records, deduplicating identical records, and retain them permanently. Associate each certificate with its local ALB.

ACM certificates used by ALBs must exist in the ALB's Region. For the same domain in the same account, ACM DNS validation tokens can be reused across Regions. Retaining the validation CNAME records and keeping each certificate associated with its ALB enables ACM to renew and deploy the certificates automatically without additional DNS changes.

Practice Elastic Load Balancing (ELB) in a full exam

Questions on Elastic Load Balancing (ELB) in each practice exam, with every answer option and an explanation for each:

Start a free practice exam

Learn Elastic Load Balancing (ELB) in lessons

14 short lessons on Elastic Load Balancing (ELB) in 6 certification courses.

and 8 more lessons

Open the lessons

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.