Elastic Load Balancing (ELB)
Hello Everyone
Welcome to CloudAffaire and this is Debjeet.
In the last AWS blog series, we have discussed Python boto3 SDK for AWS.
https://cloudaffaire.com/category/aws/boto/
In this blog series, we are going to start with another core component of AWS, Elastic Load Balancing or ELB.
Elastic Load Balancing (ELB):
Elastic Load Balancing distributes the incoming application or network traffic across multiple targets, such as Amazon EC2 instances, containers, and IP addresses, in multiple Availability Zones. Elastic Load Balancing scales your load balancer as traffic to your application changes over time. It can automatically scale to the vast majority of workloads.
Elastic Load Balancer Features:
- High availability: Elastic Load Balancing automatically distributes traffic across multiple targets – Amazon EC2 instances, containers and IP addresses – in a single Availability Zone or multiple Availability Zones.
- Health checks: Elastic Load Balancing can detect unhealthy targets, stop sending traffic to them, and then spread the load across the remaining healthy targets.
- Security features: Use Amazon Virtual Private Cloud (Amazon VPC) to create and manage security groups associated with load balancers to provide additional networking and security options. You can also create an internal (non-internet-facing) load balancer.
- TLS termination: Elastic Load Balancing provides integrated certificate management and SSL/TLS decryption, allowing you the flexibility to centrally manage the SSL settings of the load balancer and offload CPU intensive work from your application.
- Layer 4 or Layer 7 load balancing: You can load balance HTTP/HTTPS applications for layer 7-specific features, or use strict layer 4 load balancing for applications that rely on the TCP and UDP protocols.
- Operational monitoring: Elastic Load Balancing provides integration with Amazon CloudWatch metrics and request tracing in order to monitor the performance of your applications in real-time.
Elastic Load Balancer Types:
- Application Load Balancers
- Network Load Balancers
- Classic Load Balancers
Application Load Balancer:
Application Load Balancer operates at the request level (layer 7), routing traffic to targets – EC2 instances, containers, IP addresses and Lambda functions based on the content of the request. Ideal for advanced load balancing of HTTP and HTTPS traffic, Application Load Balancer provides advanced request routing targeted at delivery of modern application architectures, including microservices and container-based applications. Application Load Balancer simplifies and improves the security of your application, by ensuring that the latest SSL/TLS ciphers and protocols are used at all times.
Network Load Balancer:
Network Load Balancer operates at the connection level (Layer 4), routing connections to targets – Amazon EC2 instances, microservices, and containers – within Amazon Virtual Private Cloud (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).
Classic Load Balancer:
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 were built within the EC2-Classic network. We recommend Application Load Balancer for Layer 7 and Network Load Balancer for Layer 4 when using Virtual Private Cloud (VPC).
Elastic Load Balancer Comparisons:
Feature | ALB | NLB | CLB |
Protocols | HTTP, HTTPS | TCP, UDP, TLS | TCP, SSL/TLS, HTTP, HTTPS |
Platforms | VPC | VPC | EC2-Classic, VPC |
Health checks | Supported | Supported | Supported |
CloudWatch metrics | Supported | Supported | Supported |
Logging | Supported | Supported | Supported |
Zonal fail-over | Supported | Supported | Supported |
Connection draining | Supported | Supported | Supported |
Multiple ports on the same instance | Supported | Supported | NA |
IP addresses as targets | Supported | Supported (TCP, TLS) | NA |
Load balancer deletion protection | Supported | Supported | NA |
Configurable idle connection timeout | Supported | NA | Supported |
Cross-zone load balancing | Supported | Supported | Supported |
Sticky sessions | Supported | NA | Supported |
Static IP | NA | Supported | NA |
Elastic IP address | NA | Supported | NA |
Preserve Source IP address | NA | Supported | NA |
Resource-based IAM Permissions | Supported | Supported | Supported |
Tag-based IAM permissions | Supported | Supported | NA |
Slow start | Supported | NA | NA |
WebSockets | Supported | Supported | NA |
PrivateLink Support | NA | Supported (TCP, TLS) | NA |
Source IP address CIDR-based routing | Supported | NA | NA |
Layer 7 | |||
Path-Based Routing | Supported | NA | NA |
Host-Based Routing | Supported | NA | NA |
Native HTTP/2 | Supported | NA | NA |
Redirects | Supported | NA | NA |
Fixed response | Supported | NA | NA |
Lambda functions as targets | Supported | NA | NA |
HTTP header-based routing | Supported | NA | NA |
HTTP method-based routing | Supported | NA | NA |
Query string parameter-based routing | Supported | NA | NA |
Security | |||
SSL offloading | Supported | Supported | Supported |
Server Name Indication (SNI) | Supported | Supported | NA |
Back-end server encryption | Supported | Supported | Supported |
User authentication | Supported | NA | NA |
Custom Security Policy | NA | NA | Supported |
Hope you have enjoyed this article, In the next blog post, we will discuss Application Load Balancer.
To get more details on Elastic Load Balancing, please refer below AWS documentation
https://docs.aws.amazon.com/elasticloadbalancing/index.html