ELB
Last updated
Last updated
Elastic Load Balancing automatically distributes your incoming traffic across multiple targets, such as EC2 instances, containers, and IP addresses, in one or more Availability Zones.
A load balancer distributes workloads across multiple compute resources, such as virtual servers. Using a load balancer increases the availability and fault tolerance of your applications.
You can add and remove compute resources from your load balancer as your needs change, without disrupting the overall flow of requests to your applications.
You can configure health checks, which monitor the health of the compute resources, so that the load balancer sends requests only to the healthy ones.
Application Load Balancers
Network Load Balancers
Gateway Load Balancers
Classic Load Balancers.
Region is a separate geographic area.
Availability Zones are multiple, isolated locations within each Region.
A load balancer accepts incoming traffic from clients and routes requests to its registered targets (such as EC2 instances) in one or more Availability Zones.
The load balancer also monitors the health of its registered targets and ensures that it routes traffic only to healthy targets.
When the load balancer detects an unhealthy target, it stops routing traffic to that target.
It then resumes routing traffic to that target when it detects that the target is healthy again.
Listeners
Load balancer
Target group
A listener is a process that checks for connection requests. It is configured with a protocol and port number for connections from clients to the load balancer.You configure your load balancer to accept incoming traffic by specifying one or more listeners.
Target groups route requests to individual registered targets, such as EC2 instances, using the protocol and port number that you specify. You can register a target with multiple target groups.
Each target group is used to route requests to one or more registered targets. When you create each listener rule, you specify a target group and conditions.
Every listener has a default action, also known as the default rule. The default rule cannot be deleted and is always performed last.
The nodes for your load balancer distribute requests from clients to registered targets.
When cross-zone load balancing is enabled, each load balancer node distributes traffic across the registered targets in all enabled Availability Zones.
When cross-zone load balancing is disabled, each load balancer node distributes traffic only across the registered targets in its Availability Zone.
If cross-zone load balancing is enabled, each of the 10 targets receives 10% of the traffic. This is because each load balancer node can route its 50% of the client traffic to all 10 targets.
If cross-zone load balancing is disabled:
Each of the two targets in Availability Zone A receives 25% of the traffic.
Each of the eight targets in Availability Zone B receives 6.25% of the traffic.
cross-zone load balancing is always enabled at the load balancer level. At the target group level, cross-zone load balancing can be disabled.
Application Load Balancers intelligently provide scalability, performance, and availability. They also guarantee that your servers are not overworked and are prepared to handle traffic spikes.
Application Load Balancer, aka ALB, is an Elastic Load Balancer or ELB on AWS. It operates at the application layer (the seventh layer) of the Open Systems Interconnection (OSI) model.
The Application Load Balancer distributes incoming HTTP and HTTPS traffic across multiple targets.
Support for Path conditions: You can configure your listener with rules that forward requests based on the URL in the request. This allows you to break down your application into smaller services (microservices) and route requests to the appropriate service based on the URL’s content.
Support for Host conditions: You can configure your listener with rules that forward requests based on the host field in the HTTP header. This allows you to route requests to many domains using a single load balancer.
Routing is supported based on request information such as HTTP header conditions and methods, query parameters, and source IP addresses.
You can send routing requests to numerous applications on a single EC2 server.
An instance or IP address can be registered with numerous target groups on a separate port.
Scheme is the type of load balancer.
Internet-facing
Internal
If Scheme is internet-facing , the load balancer has a public DNS name that resolves to a public IP address.
If Scheme is internal , the load balancer has a public DNS name that resolves to a private IP address.
Both internet-facing and internal load balancers route requests to your targets using private IP addresses. Therefore, your targets don't need public IP addresses to receive requests from an internal or an internet-facing load balancer.
IPV4
Dual Stack
IPv4 if your clients use IPv4 addresses to communicate with the load balancer, or choose Dualstack if your clients use both IPv4 and IPv6 addresses to communicate with the load balancer.
If the load balancer is an internal load balancer, you must choose IPv4.
Enable two or more Availability Zones, to increase the fault tolerance of your application.
Select one subnet per zone. If you enabled dual-stack mode for the load balancer, select subnets with associated IPv6 CIDR blocks.
11. Click create target group button to start specifying group details
By default, Application Load Balancers send requests to targets using HTTP/1.1. You can use the protocol version to send requests to targets using HTTP/2 or gRPC(HTTP-Hyper Text Transfer Protocol and gRPC-High Performance Remote Procedure calls) .
Network Load Balancer operates at the connection level (Layer 4), routing connections to targets (Amazon EC2 instances, microservices, and containers) within Amazon VPC, based on IP protocol data.
Ideal for load balancing of both TCP and UDP traffic, Network Load Balancer is capable of handling millions of requests per second while maintaining ultra-low latencies.
Network Load Balancer is optimized to handle sudden and volatile traffic patterns while using a single static IP address per Availability Zone.
It is integrated with other popular AWS services such as Auto Scaling, Amazon EC2 Container Service (ECS), Amazon CloudFormation, and AWS Certificate Manager (ACM).
Connection-based Layer 4 Load Balancing
Low Latency
Static IP and Elastic IP support
Integration with Amazon Route 53
Integration with AWS Services
Clients make requests to your application.
The load balancer receives the request either directly or through an endpoint for private connectivity (via AWS PrivateLink).
The listeners in your load balancer receive requests of matching protocol and port, and route these requests based on the default action that you specify. You can use a TLS listener to offload the work of encryption and decryption to your load balancer.
Healthy targets in one or more target groups receive traffic according to the flow hash algorithm
Gateway Load Balancer helps you easily deploy, scale, and manage your third-party virtual appliances. It gives you one gateway for distributing traffic across multiple virtual appliances while scaling them up or down, based on demand. This decreases potential points of failure in your network and increases availability.
Scale your virtual appliance instances automatically.
Bring higher availability to your third-party virtual appliances.
Monitor continuous health and performance metrics.
Clients make requests to your application.
The load balancer receives the request based on the route table configurations that are set within your VPC, Internet Gateway, or Transit Gateway.
The load balancer routes requests to a target group consisting of a scalable fleet of appliances (for example, firewalls, deep packet inspection systems, URL filtering systems etc.) to process traffic flows.
The virtual appliance processes the traffic, and forwards it back to the load balancer, or drops the traffic based on its configuration. This type of load balancer acts as a bump-in-the-wire between the source and destination.
The load balancer forwards the traffic to its destination.
Classic Load Balancer provides basic load balancing across multiple Amazon EC2 instances and operates at both the request level and connection level. Classic Load Balancer is intended for applications that are built within the EC2-Classic network.
CLB operates at Layer 4 and 7 of the OSI model. This means routes traffic between clients and backend servers based on IP address and TCP port.
Using a Classic Load Balancer instead of an Application Load Balancer has the following benefits:
Support for TCP and SSL listeners.
To ensure that your registered instances are able to handle the request load in each Availability Zone, it is important to keep approximately the same number of instances in each Availability Zone registered with the load balancer.
For example, if you have ten instances in Availability Zone us-west-2a and two instances in us-west-2b, the requests are distributed evenly between the two Availability Zones. As a result, the two instances in us-west-2b serve the same amount of traffic as the ten instances in us-west-2a. Instead, you should have six instances in each Availability Zone.
By default, the load balancer distributes traffic evenly across the Availability Zones that you enable for your load balancer. To distribute traffic evenly across all registered instances in all enabled Availability Zones, enable cross-zone load balancing on your load balancer.
However, we still recommend that you maintain approximately equivalent numbers of instances in each Availability Zone for better fault tolerance.
Classic Load Balancer creation also same as Application Load Balancer changes are showed below
Cloud security at AWS is the highest priority. As an AWS customer, you benefit from a data center and network architecture that are built to meet the requirements of the most security-sensitive organizations.
Security is a shared responsibility between AWS and you.
Security of the cloud – AWS is responsible for protecting the infrastructure that runs AWS services in the AWS Cloud. AWS also provides you with services that you can use securely.
Security in the cloud – Your responsibility is determined by the AWS service that you use. You are also responsible for other factors including the sensitivity of your data, your company's requirements, and applicable laws and regulations.
You are 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.
You are 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 Network Load Balancer per hour.
You 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.
You 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.
Get started with Elastic Load Balancing for free with the AWS Free Tier. Upon sign-up, new AWS customers receive 750 hours per month shared between Classic and Application load balancers; 15 GB of data processing for Classic load balancers; and 15 LCUs for Application Load Balancers.
An LCU measures the dimensions on which the Application Load Balancer processes your traffic (averaged over an hour). The four dimensions measured are:
New connections: Number of newly established connections per second. Typically, many requests are sent per connection.
Active connections: Number of active connections per minute.
Processed bytes: The number of bytes processed by the load balancer in GBs for HTTP(S) requests and responses.
Rule evaluations: The product of the number of rules processed by your load balancer and the request rate. The first 10 processed rules are free (Rule evaluations = Request rate * (Number of rules processed - 10 free rules).