Amazon Web Services offers applications running on AWS Elastic Compute Cloud (EC2) the ability to get even traffic across all instances through an offering called Elastic Load Balancing.
Having load balancing allows better fault tolerance for your applications, since it ensures that one host does not get an unfair share of the traffic.
Moreover, AWS Elastic Load Balancing has the ability to detect unhealthy instances within a pool and redirect traffic away from those to other healthy instances, and bring back traffic once they become healthy again.
AWS Elastic Load Balancing can support a single Availability Zone or across multiple zones.
Built-into AWS's Elastic Load Balancing is the capability to scale up its request handing capacity according to incoming traffic.
Elastic Load Balancing can be used in a Virtual Private Cloud (VPC), and is not restricted to only internet-facing network. Moreover, it supports for IPv4 and IPv6 protocols which enables calls from all the operating systems to be supported.
Finally, Elastic Load Balancing exposes metrics through Amazon CloudWatch which can be monitored to see if there is any action needed on unhealthy instances (if any) reported.
Using AWS Elastic Load Balancing
AWS Elastic Load Balancing can be used from the AWS Management Console. To begin, login to your AWS Account and navigate to the AWS Management Console at https://console.aws.amazon.com/console/home?#.
Click on EC2.
Now, on the screen that appears (EC2 Dashboard), click on the LoadBalancers link on the left navigation tree.
Click the Create Load Balancer button.
Specify the load balancer name and where the load balancer needs to be created before clicking Continue.
On the next screen, you can change advanced configuration options.
Click Continue. On the next screen, you can choose the security group that will be assigned to the Elastic load balancer. You can choose from any existing security group or create a new one.
On the next screen, you can manually choose the EC2 instances you want to add to the load balancers.
Finally, we review the settings we have specified for the load balancer, before we actually create one.
Click Create button to actually create the load balancer.
Note that running Load Balancers costs actual money, so delete any load balancers you don't really need.
You can see your running load balancers under the load balancers tab on the EC2 dashboard.
To delete a load balancer, select the load balancer and click delete.
As you can see, creating load balancers is very easy with the AWS Management Console.
Typically, the acceptable ports for both HTTPS/SSL and HTTP/TCP connections are 25, 80, 443, and 1024-65535, so you will need to configure your load balancers accordingly.
Costs for running AWS Elastic Load Balancers
With AWS Elastic Load Balancers, you pay for what you use. The Elastic Load Balancing pricing varies by region. For US East (North Virginia) Availability Zone, the rates are as follows:
$.025 per Elastic Load Balancer-hour (or partial hour)
$.008 per GB of data processed by an Elastic Load Balancer
In this article, we learned about the basics of AWS Elastic Load Balancing and how to create Load Balancers in the AWS Management Console. I hope you have found this information useful.