What Is AWS ELB, and Why Is It Used?
For years network architects relied on physical hardware known as load balancers to divvy network traffic to multiple, physical servers and ensure a fast user experience. Today in hybrid and native cloud-based infrastructures, virtual devices known as elastic load balancers replace their physical forerunners and scale your network automatically as demand ebbs and flows.
Amazon Web Services’ Elastic Load Balancer (AWS ELB) integrates seamlessly with Amazon’s other cloud services, spinning up new ELB instances without manual intervention to meet high demand periods and scaling them back, in off peak hours to get the most out of your IT budget.
Below is a brief overview of working with AWS ELB and intelligently managing the mountains of web access requests or REST API requests that must be served even if the servers from the web cluster have failed. ELB balances the traffic evenly by balancing load between multiple servers and in the event of a server failure, it not only detects the failure but it sends the request to the working instances of web servers by re-routing the request that might have been received by the non-responsive server.
In addition to plain old faster workflow and user experience, AWS ELB can enable a host of powerful performance improvements. Some benefits of applying load balancing across your AWS environment:
SSL Termination. AWS ELB works with secure socket layer and certificates to encrypt traffic between the load balancer and the client via HTTPS connection. AWS ELB is the end of the line for incoming traffic, which must pass strict checks against access control lists (ACLs) before moving on to EC2 instances and hosted resources. AWS ELB replicates routing table rules in real-time with ELB autoscaling, greatly simplifying dynamic enterprise security.
Session ‘stickiness.’ AWS ELB can assign a user session to the particular instance with the “stickiness” configuration. Session can be sticky for a duration of time as specified in the ELB cookie. ELB can serve up the cookie by itself or matches its cookie to the application cookie. ELB cookie when matched with application cookie gives control to the application developer.
Dynamic load distribution. Set parameters for latency tolerance and your AWS ELB will do the rest. For instance, if normal request turnaround is 1.5 seconds and 3 seconds is unacceptably slow, ELB can monitor your response metrics and deploy one or many more additional instances of resources to make sure they remain readily available to users around the world no matter how heavy the network traffic.
Now here’s a look at the two distinct methods of elastic load balancing Amazon utilizes.
Two Kinds of Elastic Load Balancers
In cloud environments the days of physical load balancers are long gone. AWS deploys two distinct types of virtual load balancing to fine tune your application performance. These include:
- Classic Load Balancing (CLB). This more closely resembles traditional load balancing, but virtual devices replace physical hardware to evenly distribute your incoming requests and ensure clean, fast user experience.
- Application Load Balancing (ALB). Application load balancing identifies incoming traffic and directs it to the right resource type. For example, URLs tagged with /API extensions can be routed to the appropriate application resources, while traffic bound for /MOBILE can be directed to resources managing mobile access.
Want to know more? Check out our comparison of CLB and ALB.
Both types of load balancing offer improved availability and a wealth of logging data you can use for deep insights and real-time analytics about your operations. You can use the logs in AWS ELB to track metrics like:
Request count. Chart traffic globally and at the the resource level so you know what users need and when they need it.
Surge queue length. If requests stack up faster than resources can process them in real-time, AWS ELB puts them in a queue and takes them as compute power becomes available. This count lets you know how often and how many requests have to wait in line.
Latency. Know if resources in specific availability zones are performing poorly and if necessary create new instances in nearby zones to handle traffic.
Through the built-in logging capabilities these and other metrics can be monitored and configured to trip alarms so you can respond quickly to trouble.
Real-time analytics with AWS ELB logging
In addition to keeping your access logs current, Amazon’s classic and application load balancers integrate directly with Amazon Cloudwatch and Cloudtrail to provide constant, current data on the nitty gritty details of how your network is performing, who is visiting, and what they’re doing. Use these valuable customer and performance insights for agile responses within minutes, not days or weeks.