Day - 67 of DevOps

Day - 67 of DevOps

AWS Elastic Load Balancer: Detailed Overview And Types

Welcome to Day 67 of the #100DaysOfDevOps Challenge! Today we will see the Detailed Overview of AWS ELB And Types

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.

Elastic 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.

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.

System Design — Load Balancing. Concepts about load balancers and… | by Larry | Peng Yang | Computer Science Fundamentals | Medium

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.

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.

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.

LoadBalancers_Diagram

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.

Limitations:

Limitation

Key Components of a Network Load Balancer:

  1. 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.

  2. 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.

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.

Application load balancer

Limitations:

limitations

Key Components of an Application Load Balancer:

  1. 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.

  2. 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.

  3. 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

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:

Limits

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.

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.