Menu
Elastic Load Balancing
User Guide

What Is Elastic Load Balancing?

Elastic Load Balancing distributes incoming application traffic across multiple EC2 instances, in multiple Availability Zones. This increases the fault tolerance of your applications.

The load balancer serves as a single point of contact for clients, which increases the availability of your application. You can add and remove instances from your load balancer as your needs change, without disrupting the overall flow of requests to your application. Elastic Load Balancing scales your load balancer as traffic to your application changes over time, and can scale to the vast majority of workloads automatically.

You can configure health checks, which are used to monitor the health of the registered instances so that the load balancer can send requests only to the healthy instances. You can also offload the work of encryption and decryption to your load balancer so that your instances can focus on their main work.

Features of Elastic Load Balancing

Elastic Load Balancing supports two types of load balancers: Application Load Balancers and Classic Load Balancers. Choose the load balancer type that meets your needs.

FeatureClassic Load BalancerApplication Load Balancer

Protocols

HTTP, HTTPS, TCP, SSL

HTTP, HTTPS

Platforms

EC2-Classic, EC2-VPC

EC2-VPC

Sticky sessions (cookies)

load balancer generated

Back-end server authentication

Back-end server encryption

Idle connection timeout

Connection draining

Cross-zone load balancing †

Always enabled

Health checks † †

Improved

CloudWatch metrics

Improved

Access logs

Improved

Path-based routing

Route to multiple ports on a single instance

HTTP/2 support

Websockets support

Load balancer deletion protection

† Cross-zone load balancing is always enabled for an Application Load Balancer. For a Classic Load Balancer, it is disabled by default, but can be enabled and disabled as needed.

† † For an Application Load Balancer, you can specify the HTTP codes that indicate a successful health check response. An Application Load Balancer returns improved information about the cause of health check failures.

For more information about Application Load Balancers, see the Application Load Balancer Guide. For more information about Classic Load Balancers, see the Classic Load Balancer Guide.

Accessing Elastic Load Balancing

You can create, access, and manage your load balancers using any of the following interfaces:

  • AWS Management Console— Provides a web interface that you can use to access Elastic Load Balancing.

  • AWS Command Line Interface (AWS CLI) — Provides commands for a broad set of AWS services, including Elastic Load Balancing, and is supported on Windows, Mac, and Linux. For more information, see AWS Command Line Interface.

  • AWS SDKs — Provides language-specific APIs and takes care of many of the connection details, such as calculating signatures, handling request retries, and error handling. For more information, see AWS SDKs.

  • Query API— Provides low-level API actions that you call using HTTPS requests. Using the Query API is the most direct way to access Elastic Load Balancing, but it requires that your application handle low-level details such as generating the hash to sign the request, and error handling. For more information, see the following:

Elastic Load Balancing works with the following services to improve the availability and scalability of your applications.

  • Amazon EC2 — Virtual servers that run your applications in the cloud. You can configure your load balancer to route traffic to your EC2 instances. For more information, see the Amazon EC2 User Guide for Linux Instances or the Amazon EC2 User Guide for Windows Instances.

  • Amazon ECS — Enables you to run, stop, and manage Docker containers on a cluster of EC2 instances. You can configure your load balancer to route traffic to your containers. For more information, see the Amazon EC2 Container Service Developer Guide.

  • Auto Scaling — Ensures that you are running your desired number of instances, even if an instance fails, and enables you to automatically increase or decrease the number of instances as the demand on your instances changes. If you enable Auto Scaling with Elastic Load Balancing, instances that are launched by Auto Scaling are automatically registered with the load balancer, and instances that are terminated by Auto Scaling are automatically de-registered from the load balancer. For more information, see the Auto Scaling User Guide.

  • Amazon CloudWatch — Enables you to monitor your load balancer and take action as needed. For more information, see the Amazon CloudWatch Developer Guide.

  • Amazon Route 53 — Provides a reliable and cost-effective way to route visitors to websites by translating domain names (such as www.example.com) into the numeric IP addresses (such as 192.0.2.1) that computers use to connect to each other. AWS assigns URLs to your resources, such as load balancers. However, you might want a URL that is easy for users to remember. For example, you can map your domain name to a load balancer. For more information, see the Amazon Route 53 Developer Guide.