What Is Elastic Load Balancing?
Elastic Load Balancing automatically distributes incoming traffic across multiple EC2 instances. You create a load balancer and register instances with the load balancer in one or more Availability Zones. The load balancer serves as a single point of contact for clients. This enables you to increase the availability of your application. You can add and remove EC2 instances from your load balancer as your needs change, without disrupting the overall flow of information. If an EC2 instance fails, Elastic Load Balancing automatically reroutes the traffic to the remaining running EC2 instances. If a failed EC2 instance is restored, Elastic Load Balancing restores the traffic to that instance. Elastic Load Balancing can also serve as the first line of defense against attacks on your network. You can offload the work of encryption and decryption to your load balancer so that your EC2 instances can focus on their main work.
For more information, see Elastic Load Balancing.
Features of Elastic Load Balancing
Elastic Load Balancing provides the following features:
You can use the operating systems and instance types supported by Amazon EC2. You can configure your EC2 instances to accept traffic only from your load balancer.
You can configure the load balancer to accept traffic using the following protocols: HTTP, HTTPS (secure HTTP), TCP, and SSL (secure TCP).
You can configure your load balancer to distribute requests to EC2 instances in multiple Availability Zones, minimizing the risk of overloading one single instance. If an entire Availability Zone goes offline, the load balancer routes traffic to instances in other Availability Zones.
There is no limit on the number of connections that your load balancer can attempt to make with your EC2 instances. The number of connections scales with the number of concurrent requests that the load balancer receives.
You can configure the health checks that Elastic Load Balancing uses to monitor the health of the EC2 instances registered with the load balancer so that it can send requests only to the healthy instances.
You can use end-to-end traffic encryption on those networks that use secure (HTTPS/SSL) connections.
[EC2-VPC] You can create an Internet-facing load balancer, which takes requests from clients over the Internet and routes them to your EC2 instances, or an internal-facing load balancer, which takes requests from clients in your VPC and routes them to EC2 instances in your private subnets. Load balancers in EC2-Classic are always Internet-facing.
[EC2-Classic] Load balancers for EC2-Classic support both IPv4 and IPv6 addresses. Load balancers for a VPC do not support IPv6 addresses.
You can monitor your load balancer using CloudWatch metrics, access logs, and AWS CloudTrail.
You can associate your Internet-facing load balancer with your domain name. Because the load balancer receives all requests from clients, you don't need to create and manage public domain names for the EC2 instances to which the load balancer routes traffic. You can point the instance's domain records at the load balancer instead and scale as needed (either adding or removing capacity) without having to update the records with each scaling activity.
How to Get Started with Elastic Load Balancing
Before you explore Elastic Load Balancing, you must sign up for AWS and prepare to create your load balancer. For more information, see Setting Up Elastic Load Balancing.
To learn how to create a basic load balancer and register EC2 instances with your load balancer, see Getting Started with Elastic Load Balancing.
To learn how to create an HTTPS load balancer and register EC2 instances with your load balancer, see Create an HTTPS Load Balancer.
To learn how to use the various features supported by Elastic Load Balancing, see Configure Your Load Balancer.
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 (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 APIs 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 Elastic Load Balancing API Reference.
SOAP API— Provides access to the Elastic Load Balancing web service using the SOAP web services messaging protocol. This interface is described by a Web Services Description Language (WSDL) document that defines the operations and security model. The WSDL references an XML schema document, which strictly defines the data types that might appear in SOAP requests and responses. For more information, see the Elastic Load Balancing API Reference.
Elastic Load Balancing Command Line Interface (CLI) — Provides commands to access Elastic Load Balancing.
We are no longer adding new functionality to the ELB CLI. We recommend that you use the AWS CLI instead.
PCI DSS Compliance
Elastic Load Balancing supports the processing, storage, and transmission of credit card data by a merchant or service provider, and has been validated as being compliant with Payment Card Industry (PCI) Data Security Standard (DSS). For more information about PCI DSS, including how to request a copy of the AWS PCI Compliance Package, see PCI DSS Level 1.
With Amazon Web Services, you pay only for what you use. For Elastic Load Balancing, you pay for each hour or portion of an hour that the service is running, and you pay for each gigabyte of data that is transferred through your load balancer. For current pricing information, see Elastic Load Balancing Pricing.
If your AWS account is less than 12 months old, you are eligible to use the free tier. The free tier includes 750 hours per month of Amazon EC2 usage, and 750 hours per month of Elastic Load Balancing, plus 15 GB of data processing. For more information, see AWS Free Tier.
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. For more information, see the Amazon EC2 User Guide for Linux Instances or the Amazon EC2 User Guide for Microsoft Windows Instances.
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 Load Balance Your Auto Scaling Group in the Auto Scaling User Guide.
Amazon CloudWatch — Enables you to monitor the health state of your instances 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 AWS resources, such as your load balancers. However, you might want a URL that is easy for your users to remember. For example, you can map your domain name to your load balancer. If you don't have a domain name, you can search for available domains and register them using Amazon Route 53. If you have an existing domain name, you can transfer it to Amazon Route 53. For more information, see the Amazon Route 53 Developer Guide.