In this post, I will be covering AWS Elastic Load Balancer (ELB). Its overview, features, and types. balancer
A load-balancing service for AWS deployments is called Elastic Load Balancing (ELB). It scales resources and automatically distributes incoming application traffic to handle heavy traffic demands. E
lastic Load Balancing (ELB) is a service offered by Amazon Web Services (AWS) that automatically distributes incoming network traffic across multiple targets, such as Amazon Elastic Compute Cloud (EC2) instances, containers, and IP addresses, in one or more Availability Zones.
ELB is designed to improve the availability, fault tolerance, and scalability of your applications by efficiently distributing traffic and ensuring that it is routed only to healthy targets.
- What are Load Balancers and how do they work?
- Elastic Load Balancing in AWS
- Key features and benefits of Elastic Load Balancing
- AWS Load Balancer Types
- Network Load balancer
- Application Load balancer
- Gateway Load Balancer
- Classic Load Balancer
- Difference Between Application, Classic, Gateway, And Network Load Balancer
- Elastic Load Balancing Pricing
- Conclusion
- AWS Elastic Load Balancing FAQs
What are Load Balancers and how do they work?
In order to avoid sending traffic to servers that are unable to process requests, load balancers monitor the health of the back-end resources. The process of redistributing workload in a distributed system to ensure that no computer is overloaded, underloaded, or idle is known as load balancing. It makes an effort to accelerate several aspects of the cloud environment, such as reaction time, execution time, system stability, etc. The load-balancing survey papers were unable to offer an accurate, systematic classification of methods and procedures.
Factors responsible for load unbalancing problem and also provided some methods that can be used:
- Identify the factors that cause load unbalancing problems in cloud computing.
- Provide a systematic overview of the existing approaches that are used in the load balancing process and the way in which these approaches have been used in cloud technology.
- A physical device, a virtualized instance running on specialized hardware.
- Incorporated into application delivery controllers (ADCs) designed to more broadly improve the performance and security of web and microservices-based applications, regardless of their hosting.
Read More: Amazon DynamoDB.
Elastic Load Balancing in AWS
- Distributes incoming application traffic across multiple targets, such as EC2 instances, containers (ECS), Lambda functions, and IP addresses in multiple Availability Zones(AZs).
- Distributes Client traffic across servers.
- Improves the performance of applications.
- It Accepts incoming traffic from clients and routes requests to its registered targets.
- Monitors the condition of its registered targets and routes traffic only to healthy targets.
- Enable deletion protection to stop your load balancer from being deleted accidentally. Disabled by default.
- Deleting ELB won’t delete the instances registered to it.
- Cross Zone Load Balancing – If enabled, each load balancer node automatically distributes traffic across the registered targets in all enabled AZs.
- Supports SSL Offloadirig which is a feature that allows the AWS Elastic Load Balancer to bypass the SSL termination by removing the SSL-based encryption from the incoming traffic.
Click here to read about a good example of how the DevOps principles are used in practice AWS CloudFormation.
Also, Check Our blog post on AWS for testers. & AWS Elastic Beanstalk & Benefits Overview
Key features and benefits of Elastic Load Balancing:
- High availability: The most common service that relies on Elastic Load Balancer is Amazon’s EC2 Instances, as Elastic Load Balancer performs a health checkup to confirm an instance continues to be running before sending traffic thereto. A developer can integrate Amazon Route 53 and Domain name system (DNS) failover to further boost application resiliency.
- Automatic scaling: A developer can use the AWS Auto Scaling feature to ensure he or she has enough EC2 instances running behind an ELB. The developer sets Auto Scaling conditions, and when a condition is met, a brand new EC2 instance can spin up to satisfy the specified minimum. A developer also can set a condition to spin up new EC2 instances to scale back latency.
- Security: AWS Elastic Load Balancer supports applications within an Amazon VPC for stronger network security. An IT team can specify whether it wants an internet-facing or internal load balancer. The latter option enables a developer to route traffic through an ELB using private IP addresses.
- Traffic Distribution: ELB evenly distributes incoming traffic across multiple compute resources, such as EC2 instances or containers, to ensure that no single resource is overloaded while others remain idle. This helps optimize resource utilization.
- Availability and Fault Tolerance: ELB enhances the availability of your applications by automatically detecting and routing traffic away from unhealthy or failing targets. If a target becomes unhealthy, ELB stops sending traffic to it until it recovers, reducing the impact of potential failures.
- Auto Scaling: ELB can automatically scale its load balancer capacity in response to changes in incoming traffic. This ensures that your application can handle increased traffic loads without manual intervention.
- Health Checks: You can configure health checks that periodically assess the health of your compute resources. ELB routes traffic only to resources that pass these health checks, helping to maintain the overall reliability of your application.
- Offloading Encryption: ELB can offload the work of encryption and decryption, reducing the computational load on your compute resources and allowing them to focus on their primary tasks.
Also read: All you need to know about AWS Free Tier Account Services
AWS Load Balancer Types
4 Types of Load Balancers in AWS
- Application Load Balancers: Ideal for routing HTTP/HTTPS traffic and performing advanced traffic routing and content-based routing.
- Network Load Balancers: Designed for handling TCP/UDP traffic with high performance and low latency.
- Gateway Load Balancers: Used for deploying third-party virtual appliances, such as firewalls, intrusion detection systems, and other network appliances.
- Classic Load Balancers: An older type of load balancer that is still available for use, primarily for applications not yet migrated to the newer load balancer types.
To access and manage Elastic Load Balancing, you can use various interfaces, including the AWS Management Console, AWS Command Line Interface (CLI), AWS SDKs, and the Query API.
Also, Check Our blog post on AWS Security.
Network Load balancer
AWS Elastic Load Balancing automatically directs incoming traffic across multiple targets, such as Amazon EC2 instances, containers, and IP addresses, spread across one or more Availability Zones. Among its load balancer options, the Network Load Balancer (NLB) shines as a high-performance solution designed to operate at the transport layer (Layer 4) of the Open Systems Interconnection (OSI) model.
- Network Load Balancer handles sudden and violated traffic across the EC2 Instances in order to avoid any latency.
- Connection baseload Balancing and it supports TCP protocol.
- Ability to handle volatile workloads and scale to millions of requests per second.
- Support for static IP addresses for the load balancer. or assign one Elastic IP address per subnet enabled for the load balancer.
- Cross-zone load balancing is disabled by default
- The source IP addresses of the clients are maintained and made available to your apps when you designate targets using an instance ID. The source IP addresses are the private IP addresses of the load balancer nodes if targets are specified by IP address.
- Network Load Balancers support connections from clients over inter-region VPC peering. AWS managed VPN and third-party VPN solutions.
Also Read AWS Cloud Certification.
Limitations:
Key Components of a Network Load Balancer:
- Listeners: NLB uses listeners to check for incoming connection requests from clients. Listeners are configured with specific protocols and ports, serving as the entry point for traffic.
- Target Groups: These groups route incoming requests to registered targets, which can be EC2 instances or IP addresses. You can also configure target groups to support various protocols like TCP, UDP, TCP_UDP, and TLS, providing flexibility.
Read More: AWS Serverless Application Model.
Application Load balancer
AWS Elastic Load Balancing automatically distributes incoming traffic across multiple targets, such as EC2 instances, containers, and IP addresses, in one or more Availability Zones. Among its different load balancer types, the Application Load Balancer (ALB) stands out as a versatile solution designed to operate at the application layer, providing advanced routing and content-based traffic management.
- The Load Balancer that distributes the traffic to appropriate target groups on the basis of content is called Application Load Balancer.
- New feature-rich, layer 7 loads balancing platform.
- Supports web sockets, HTTP, HTTPS, microservices, and container-based applications, including deep integration with EC2 container service.
- Support for path-based and host-based routing. Also, provide routing requests to multiple applications on a single EC2 instance.
- Cross-zone load balancing is always enabled and you can also specify Lambda functions are targeted to serve HTTP(S) requests.
- Supports load balancer-generated cookies only for sticky sessions.
Also Read: How to Configure MFA in AWS.
Limitations:
Key Components of an Application Load Balancer:
- Listeners: ALB uses listeners to check for connection requests from clients. These listeners are configured with specific protocols and ports and are at the forefront of routing decisions.
- Rules: Listener rules define how the load balancer routes requests to its registered targets. Each rule consists of a priority, one or more actions, and conditions. Rules allow for sophisticated traffic management based on various factors.
- Target Groups: These groups route requests to registered targets, such as EC2 instances, using specified protocols and port numbers. A target can be registered with multiple target groups, and health checks can be configured per target group
Also, Check Our previous blog post on Blue-Green Deployment.
Gateway Load Balancer
AWS Elastic Load Balancing seamlessly distributes incoming network traffic across multiple targets, such as EC2 instances, containers, and IP addresses, while monitoring the health of these targets. Among its diverse load balancer offerings, the Gateway Load Balancer (GWLB) stands out as a specialized solution tailored for deploying and managing virtual appliances
- It makes it simple to scale, install, and manage your third-party virtual appliances.
- Provide you with one gateway for distributing traffic across multiple virtual appliances, while scaling them up, or down, based on demand.
- It improves availability and removes potential points of failure from your network.
- Users can find, test, and buy virtual appliances from third-party vendors directly in AWS Marketplace.
- This integrated experience streamlines the deployment process, so users can see value from your virtual appliances more quickly—whether you want to work with the same vendors you do today, or try something new.
Limitations:
Gateway Load Balancer Endpoints: GWLB uses Gateway Load Balancer endpoints to securely exchange traffic across Virtual Private Cloud (VPC) boundaries. These endpoints facilitate private connectivity between virtual appliances in the service provider VPC and application servers in the service consumer VPC. Deploying the GWLB in the same VPC as the virtual appliances allows you to register the virtual appliances with a target group for the GWLB.
Also, Read Our blog post on Amazon API Gateway. Click here
Classic Load Balancer
Classic Load Balancer (CLB) is a legacy load balancer that is no longer recommended for new applications. It is a Layer 4 load balancer that operates at the TCP/IP level and distributes traffic based on source IP address, port number, and protocol. CLB supports both HTTP and TCP applications.
AWS has announced that CLB will be deprecated on December 31, 2022. Customers are encouraged to migrate to Application Load Balancer (ALB) or Network Load Balancer (NLB) as soon as possible. ALB and NLB are more modern load balancers that offer more features and better performance than CLB.
- The Load Balancer which balances the traffic across multiple instances in multiple availability zones is called a Classic Load Balancer.
- It supports both EC2 Classic EC2-VPC and Increases the availability of your application by sending traffic to healthy Instances.
- Supports HTTP, HTTPS, TCP, and SSL listeners and supports sticky sessions using application-generated cookies.
- To make sure that the instances you have registered can handle the demand Keep roughly the same number of instances registered with the load balancer in each Availability Zone.
Limitations:
Also, read AWS Identity And Access Management.
Difference Between Application, Classic, Gateway, And Network Load Balancer
Check Out: Cloudtrail vs Cloudwatch, to know the major differences between them.
Elastic Load Balancing Pricing
- Application Load Balancer
You will be charged for each hour or partial hour that an Application Load Balancer is running and the number of Load Balancer Capacity Units (LCU) used per hour. - Network Load Balancer
You will be charged for each hour or partial hour that a Network Load Balancer is running and the number of Network Load Balancer Capacity Units (NLCU) used by the Network Load Balancer per hour. - Gateway Load Balancer
Consumers are charged 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. Gateway Load Balancer uses Gateway Load Balancer Endpoint (GWLBE), a new type of VPC Endpoint powered by AWS PrivateLink technology that simplifies how applications can securely exchange traffic with GWLB across VPC boundaries. - Classic Load Balancer
Users are charged for each hour or partial hour that a Classic Load Balancer is running and for each GB of data transferred through your load balancer.
Also, Check Our previous blog post on AWS Command Line Interface.
Conclusion
Elastic Load Balancing is a proven mechanism of distributing application and web traffic requests across multiple targets or instances. AWS Elastic Load Balancer allows you to scale your varying workloads automatically. We have also seen the three types of load balancers used in ELB and their key features.
AWS Elastic Load Balancing FAQs
Is there an SLA for load balancers?
Yes, Elastic Load Balancing guarantees monthly availability of at least 99.99% for your load balancers (Classic, Application, Gateway or Network).
Can users privately access Elastic Load Balancing APIs from my Amazon Virtual Private Cloud (VPC) without using a public IP address?
Yes, users can privately access Elastic Load Balancing APIs from their Amazon Virtual Private Cloud (VPC) by creating VPC endpoints. With VPC endpoints, the routing between the VPC and Elastic Load Balancing APIs is managed by the AWS network without the need for an Internet gateway, NAT gateway, or VPN connection.
How can users decide which load balancer to select for their application?
Elastic Load Balancing supports four types of load balancers. You can select the appropriate load balancer based on your application requirements. If you need to load balance HTTP requests, we advise you to use Application Load Balancer. For network protocols (layer4 – TCP, UDP) load balancing, and for extreme performance and low latency applications we advise using Network Load Balancer. Users should use Gateway Load Balancer when deploying inline virtual appliances where network traffic is not destined for the Gateway Load Balancer itself. If customers application is built within the EC2 Classic network then users can use Classic Load Balancer.
Related Links/References:
- How do I create and activate a new Amazon Web Services account?
- Amazon Elastic File System User guide
- Overview of Amazon Web Services & Concepts
- AWS Certified Solutions Architect Associate SAA-C03
- AWS Management Console Walkthrough
- AWS Elastic Load Balancer
Next Task For You
Begin your journey towards an AWS Cloud by joining our FREE Informative Class on Amazon Cloud Free Class by clicking on the below image.
Leave a Reply