From the course: AWS: High Availability

Understanding load balancing options - Amazon Web Services (AWS) Tutorial

From the course: AWS: High Availability

Start my 1-month free trial

Understanding load balancing options

- AWS provides load balancing as a service. These components let you design fault tolerant, highly available systems by distributing incoming traffic to more than one EC2 instance. Let's start off by reviewing how load balancing works. Suppose you have a web application residing on a single EC2 instance, if you route traffic to it directly, all user requests are being serviced by that single instance. If there is a problem with that instance, your users have a bad experience. In order to reduce the risk of customer dissatisfaction. You'd love to be able to have three identical web servers, and have them all handle traffic from users. This is where an elastic load balancer or ELB comes into the picture. It is a component that can split inbound traffic and distribute it to a variety of back end servers. What happens if you get many additional users and need to add more servers to handle the additional load? Not to worry, the elastic and elastic load balancer means that the ELB scales automatically to handle the additional traffic. AWS offers three types of load balancers to accommodate various types of demand. They include the application load balancer, network load balancer, and classic load balancer. Before getting into distinguishing characteristics of each load balancer type, let's talk about some important ELB features. First off, an ELB is a highly available component. That is, you don't have to create a standby ELB to point to a set of instances behind an existing ELB. However, it is possible for ELB's to fail. You can design around that by using route 53 health checks on the ELB. If route 53 detects an ELB failure, it can shift traffic to a different load balancer. An ELB can be configured to be internal or external facing. And internal ELB is useful if you want to increase the fault tolerance of an internal application. With an external ELB, you can accomplish the same objectives for internet facing components. If you want to offload SSL,TLS processing from your EC2 instances, you can choose to terminate SSL,TLS on the ELB. Another notable feature is the integration with other AWS offerings. For example, certificate manager allows you to automate the deployment and renewal process for SSL,TLS certificates. ELB's also integrate with identity and access management. So you can define and assign security groups for granular networking controls. ELB metrics are available through CloudWatch. You can create health checks on the ELB to monitor the speed of an EC2 instance, if your health check fails, the instance is considered unhealthy and is removed from the load balancer. That means it no longer receives traffic. ELB's also supports sticky sessions handled via load balancer generated cookies. Sticky sessions are great if your application needs to maintain state between a client and the component that services that client's request.

Contents