What is Elastic Load Balancing (ELB)?

  1. Home
  2. AWS
  3. What is Elastic Load Balancing (ELB)?
Elastic Load Balancing

Most organizations now require the service of managing and increasing the availability, scalability, and fault tolerance of applications. To find the best solution for this, AWS provides the Elastic Load Balancing service. This consists of a load balancer that has the ability to distributes workloads across multiple compute resources like virtual servers. 

The Load Balancing services allow you to configure health checks for monitoring the health of the compute resources. Moreover, you get the option for offloading the work of encryption and decryption to your load balancer so that your compute resources can focus on their main work. However, this is just a teaser of this service. For a complete overview, keep up with the blog. In this, we will look at the quick overview of Elastic Load Balancing, its features, and how to get started with this service.

Elastic Load Balancing (ELB): Overview

Elastic Load Balancing refers to a service that distributes incoming application traffic automatically across multiple Amazon EC2 instances. This helps in achieving higher levels of fault tolerance in your applications by providing the needed amount of load balancing capacity for distributing application traffic. Moreover, Elastic Load Balancing has the ability to detect unhealthy instances and automatically reroutes traffic to healthy instances until the unhealthy instances have been restored. Customers can easily enable Elastic Load Balancing within a single or multiple Availability Zones for more consistent application performance. Further, this can be used in an Amazon Virtual Private Cloud for distributing the traffic between application tiers in a virtual network that you explain.

Elastic Load Balancing (ELB) features

What are the various types of Load Balancers?

In Elastic Load Balancing, there are four major load balancers:

1. Application Load Balancer

Application Load Balancer is suitable for load balancing of HTTP and HTTPS traffic and providing advanced request routing targeted at the delivery of modern application architectures, including microservices and containers. This routes traffic for targets within Amazon VPC depending on the content of the request.

Features:

Some of the major features include:

  • Firstly, you can load balance HTTP/HTTPS traffic for targets that include Amazon EC2 instances, microservices, and containers depending on request attributes
  • Secondly, when using Amazon VPC,  you can create and manage security groups linked with Elastic Load Balancing for providing additional networking and security options. Moreover, you can configure an Application Load Balancer to be Internet-facing or create a load balancer without public IP addresses for serving as an internal load balancer.
  • Thirdly, the Application Load Balancer (ALB) supports AWS Outposts. This refers to a fully managed service used for extending AWS infrastructure, services, and tools to virtually any data center, co-location space, or on-premises facility for a truly consistent hybrid experience.
  • Fourthly, there is support for HTTPS termination between the clients and the load balancer. Moreover, Application Load Balancers also offer management of SSL certificates using AWS Identity and Access Management (IAM) and AWS Certificate Manager.
  • Lastly, here, you can design an HTTPS listener, which uses encrypted connections. This feature helps in enabling the traffic encryption between your load balancer and the clients by initiating SSL or TLS sessions. 
2. Network Load Balancer

Network Load Balancer is for load balancing of:

  • Transmission Control Protocol (TCP)
  • User Datagram Protocol (UDP)
  • Transport Layer Security (TLS)

It also directs traffic to Amazon VPC destinations with the potential to handle millions of requests per second while maintaining extremely low latency.

Features:

Some of the major features include:

  • Firstly, you can load balance both TCP and UDP traffic by routing connections to targets like Amazon EC2 instances, microservices, and containers.
  • Secondly, there is support for client TLS session termination. This helps in enabling to offload TLS termination tasks to the load balancer while preserving the source IP address for your back-end applications. Moreover, you can select from predefined security policies for your TLS listeners for meeting compliance and security standards.
  • Thirdly, it offers sticky sessions. This refers to the mechanism for routing requests from the same client to the same target. 
  • Fourthly, Network Load Balancer provides extremely low latencies for latency-sensitive applications.
  • Next, it preserves the client-side source IP by giving access to the back-end for seeing the IP address of the client. 
  • Network Load Balancer automatically provides a static IP per Availability Zone used by applications as the front-end IP of the load balancer.
  • Lastly, it allows you the option for assigning an Elastic IP per Availability Zone thereby providing your own fixed IP.
3. Gateway Load Balancer

Gateway Load Balancer helps in easily deploying, scaling, and running third-party virtual networking appliances. This provides load balancing and auto-scaling for fleets of third-party appliances. Moreover, Gateway Load Balancer is transparent to the source and destination of the traffic thus, making it suitable for working with third-party appliances for security, network analytics, and other use cases.

Features:

Some of the major features include:

  • Firstly, Gateway Load Balancer works with AWS Auto Scaling groups and allows for setting target utilization levels for your virtual appliance instances. 
  • Secondly, they provide high availability and reliability by routing traffic flows using healthy virtual appliances, and rerouting flows when a virtual appliance becomes unhealthy. For this, Gateway Load Balancer runs health checks on each virtual appliance instance on a configurable cadence.
  • Thirdly, here, you can perform monitoring for Gateway Load Balancer using CloudWatch per Availability Zone metrics. These include:
    • the total number of ENIs/interfaces
    • IP addresses of ENIs/interfaces
    • number of packets in/out
    • number of bytes in/out
    • packet errors and packet drops
    • load balancer metrics
    • VPC Endpoint metrics
  • Lastly, in this, deploying a new virtual appliance is simple as selecting it in AWS Marketplace. Moreover, it also ensures private connectivity over the AWS network using Gateway Load Balancer Endpoints.
aws solution architect
4. Classic Load Balancer

Classic Load Balancer is used for providing basic load balancing across multiple Amazon EC2 instances. And, it controls and handles both the request level and the connection level. Moreover, Classic Load Balancer is planned for applications that were built within the EC2-Classic network.

Features

Some of the major features include:

  • Firstly, in this, you can load balance HTTP/HTTPS applications and use Layer 7-specific features. This includes X-Forwarded and sticky sessions.
  • Secondly, Classic Load Balancer has the complete support of:
    • SSL termination
    • offloading SSL decryption from application instances
    • centralized management of SSL certificates
    • back-end instances encryption
  • Lastly, Classic Load Balancer supports the use of both IPv4 and IPv6 for EC2-Classic networks.

Why most companies and organizations are using Elastic Load Balancing? The reasons are the advantage and benefits it provides. So, let’s take a look at the major benefits of using ELB.

Benefits of Elastic Load Balancing

1. Highly availability and elasticity

  • Elastic Load Balancing is part of the AWS network and it is a fully managed service in which you can focus on delivering applications and not installing fleets of load balancers. Moreover, the capacity is automatically added and removed depending on the utilization of the underlying application servers.

2. Security

Elastic Load Balancing works with Amazon VPC for providing robust security features, including:

  • integrated certificate management
  • User-authentication
  • SSL/TLS decryption. 

3. Feature breadth

Elastic Load Balancing provides the breadth of features required by businesses of all sizes with delivering an AWS-native experience. Moreover, it includes support for features necessary in container-based workloads, including:

  • HTTP/2
  • gRPC
  • TLS offload
  • advanced rule-based routing
  • integration with container services

4. Robust monitoring & visibility

Elastic Load Balancing provides access for monitoring the health of your applications and their performance in real-time using Amazon CloudWatch metrics, logging, and request tracing. Further, this improves visibility into:

  • the behavior of your applications
  • uncovering issues
  • identifying performance blockage in your application stack. 

5. Integration and global reach

  • ELB is integrated with AWS services like EC2, ECS/EKS, Global Accelerator, and operational tools like AWS CloudFormation and AWS Billing. Moreover, ELB is available everywhere you run your AWS workloads.
top customers

AWS ELB Use cases

1. Migrating to AWS
  • Firstly, ELB supports the load balancing capabilities critical for you to migrate to AWS. 
  • Secondly, it is well-positioned for load balancing both traditional and cloud-native applications with auto-scaling capabilities that remove the guesswork incapacity planning. 
  • Thirdly, ELB is easy for configuring and using thus, making the migration experience simple. 
  • Lastly, the managed experience of ELB states that you can focus on the most critical part of successful migration and it helps in integrating the common management tools like Terraform and Ansible.
2. Modernizing applications with serverless and containers
  • ELB helps organizations in building applications faster using a combination of modular architecture patterns, serverless operational models, and agile developer processes. Moreover, ELB adapts to these modern applications and their changing load without customer intervention. Further, ELB also includes support for containers and container orchestration using Kubernetes by providing load balancing between clients and applications and service to service communication.
3. Building a hybrid cloud
  • Elastic Load Balancing provides the ability for load balancing over AWS and on-premises resources, using a single load balancer. You can achieve this by registering all of your resources to the same target group and linking the target group with a load balancer. Or, you can use DNS-based weighted load balancing over AWS and on-premises resources across two load balancers, with one load balancer for AWS and another for on-premises resources.
4. Scaling third-party virtual appliances
  • While cloud migration, some customers look to retaining their existing appliances, and the skills and processes they have built around them. Using Gateway Load Balancer, customers can easily deploy appliances from their preferred vendor while taking advantage of the scale and flexibility of running in the cloud.

Now, we have covered the overview, features, and advantages of Elastic Load Balancing. It’s time to get started with ELB. In the next section, we will learn about the steps for creating a load balancer.

Getting started with Elastic Load Balancing

For getting started with Elastic Load Balancing, you can set up an Application Load Balancer, Network Load Balancer, or Gateway Load Balancer with APIs, AWS Command Line Interfaces (CLI), or through the AWS Management Console. However, let’s understand this better by taking an example for creating application load balancers.

Getting started with Application Load Balancers

Step 1: Selecting a load balancer type

Elastic Load Balancing has various types of load balancers. Here, we are creating an Application Load Balancer.

For creating an Application Load Balancer:

  • Firstly, open the Amazon EC2 console.
  • Secondly, choose a region for your load balancer on the navigation bar. Select the same region as of EC2 instances.
  • Thirdly, choose Load Balancers under LOAD BALANCING on the navigation pane.
  • Then, select Create Load Balancer.
  • Lastly, select create for Application Load Balancer.
Step 2: Configuring your load balancer and listener

Complete the following procedure on the Configure Load Balancer page:

For configuring your load balancer and listener:

  • Firstly, enter a name for your load balancer for giving a name. However, the name of your Application Load Balancer must be unique within your set of Application Load Balancers and Network Load Balancers for the region. This can have a maximum of 32 characters with only alphanumeric characters and hyphens.
  • Secondly, keep the default values for Scheme and IP address type.
  • Thirdly, keep the default for Listeners
  • Next, select the VPC that you used for your EC2 instances for Availability Zones. However, select the Availability Zone for each Availability Zone used for launching your EC2 instances. Then, select the public subnet for Availability Zone.
  • After that, select Next: Configure Security Settings.
  • Lastly, select Next: Configure Security Groups.
Step 3: Configuring a security group for your load balancer

The security group for your load balancer must provide access for communicating with registered targets on both the listener port and the health check port. However, the console can design a security group for your load balancer with rules for specifying the correct protocols and ports.

On the Configure Security Groups page, for configuring a security group for your load balancer

  • Firstly, Create a new security group.
  • Secondly, type a name and description for the security group, or keep the default name and description. This new security group will have the rule used for allowing traffic to the load balancer listener port that you selected on the Configure Load Balancer page.
  • Lastly, select Next: Configure Routing.
Step 4: Configuring your target group

Creating a target group for requesting routing. However, the default rule for your listener routes requests to the registered targets in this target group. Further, the load balancer verifies the health of targets in this target group using the health check settings explained for the target group. 

On the Configure Routing page, for configuring your target group:

  • Firstly, keep the default for the Target group, the New target group.
  • Secondly, enter a name for the new target group.
  • Thirdly, keep the default target type (Instance), protocol (HTTP), and port (80).
  • Next, keep the settings default for Health checks.
  • Lastly, select Next: Register Targets.
Step 5: Registering targets with your target group

On the Register Targets page, for registering your instances with the target group:

  • Firstly, select one or more instances.
  • Secondly, keep the default port (80) and choose to Add to registered.
  • Lastly, after selecting instances, choose Next: Review.
Step 6: Creating and testing your load balancer

Firstly, review the settings that you selected before creating the load balancer. Then, after creating the load balancer, check that it’s sending traffic to your EC2 instances.

For creating and testing your load balancer:

  • Firstly, select Create on the Review page.
  • Secondly, after receiving the notification of the load balancer created, choose Close.
  • Thirdly, on the navigation pane, choose Target Groups under LOAD BALANCING.
  • Fourthly, select the newly created target group.
  • Then, verify that your instances are ready on the Targets tab. However, if the status of an instance is initial, then,  it’s probably due to the instance still in the process of being registered. Further, you can test your load balance when the status of at least one instance is healthy.
  • Next, choose Load Balancers under LOAD BALANCING on the navigation pane.
  • After that, select the newly created load balancer.
  • Lastly, copy the DNS name of the load balancer on the Description tab. Then, paste the DNS name into the address field of an Internet-connected web browser.

Elastic Load Balancing pricing

You pay only for what you use with Application, Network, Gateway, and Classic Load Balancers.

1. Application Load Balancer

  • In this, you will be charged for each hour or partial hour for Application Load Balancer running and the number of Load Balancer Capacity Units (LCU) used per hour.

2. Network Load Balancer

  • Charges will be for each hour or partial hour for Network Load Balancer running and the number of Network Load Balancer Capacity Units being used per hour by Network Load Balancer.

3. Gateway Load Balancer

  • Charges will be for each hour or partial hour that a Gateway Load Balancer is running and the number of Gateway Load Balancer Capacity Units (GLCU) used by Gateway Load Balancer per hour. 

4. Classic Load Balancer

  • Charges will be for each hour or partial hour that a Classic Load Balancer is running and for each GB of data transferred through your load balancer.
AWS Professional

Final Words

Elastic Load Balancing is setting a benchmark by helping the top-rated companies and organizations. This service becomes more useful by adding the support of load balancers like Application Load Balancers, Network Load Balancers, Gateway Load Balancers, and Classic Load Balancers. This is helping top well-known names like Snapchat, Adobe, and more for distributing their workloads across multiple compute resources and it even monitors the health of its registered targets. So, learning and understanding this service is beneficial. For this, you can use the AWS documentation to get familiarity with the working features of ELB.

Menu