AWS Elastic Load Balancing – distributes incoming traffic across multiple Amazon EC2 instances:
You can use Elastic Load Balancing on its own, or in conjunction with Auto Scaling. When combined, the two features allow you to create a system that automatically adds and removes EC2 instances in response to changing load
Elastic Load Balancing supports two types of load balancers: Application Load Balancers (new) and Classic Load Balancers. Choose the load balancer type that meets your needs
- An Application Load Balancer makes routing decisions at the application layer (HTTP/HTTPS), supports path-based routing, and can route requests to one or more ports on each EC2 instance or container instance in your VPC.
- A Classic Load Balancer makes routing decisions at either the transport layer (TCP/SSL) or the application layer (HTTP/HTTPS), and supports either EC2-Classic or a VPC.
Classic Load Balancer Overview
A load balancer distributes incoming application traffic across multiple EC2 instances in multiple Availability Zones. This increases the fault tolerance of
your applications. Elastic Load Balancing detects unhealthy instances and routes traffic only to healthy instances.
Classic Load Balancer Features
High Availability
Health Checks
Security Features
SSL Offloading
Sticky Sessions
IPv6 Support
Layer 4 or Layer 7 Load Balancing
Operational Monitoting
Steps to create an AWS – ELB (Clasic Load Balancer)
Define Load Balancer
Assign Security Group
Configure Security Settings
Configure Health Check
Add EC2 instances
Add Tags
Review
Load
Balancer Protocol :
HTTP
HTTPS ( Secure HTTP)
TCP
SSL( Secure TCP)
Cross-Zone Load Balancing
Cross-Zone Load Balancing distributes traffic evenly across all your back-end instances in all Availability Zones.
Connection Drainning – The number of seconds to allow existing traffic to continue flowing
ELB can not stretch across region
– Before you start using Elastic Load Balancing, you must configure one or more listeners for your Classic Load Balancer.
A listener is a process that checks for connection requests. It is configured with a protocol and a port for front-end (client to load balancer)
connections, and a protocol and a port for back-end (load balancer to back-end instance) connections
By default, we’ve configured your load balancer with a standard web server on port 80.
You can use Amazon Route 53 health checking and DNS failover features to enhance the availability of the applications running behind Elastic Load Balancers.
Route 53 will fail away from a load balancer if there are no healthy EC2 instances registered with the load balancer or if the load balancer itself is unhealthy.
Using Route 53 DNS failover, you can run applications in multiple AWS regions and designate alternate load balancers for failover across regions. In the event that your application is unresponsive, Route 53 will remove the unavailable load balancer endpoint from service and direct traffic to an alternate load balancer in another region
When you create a load balancer in your VPC, you can specify whether the load balancer is internet-facing (the default) or internal. If you select internal, you do not need to have an internet gateway to reach the load balancer, and the private IP addresses of the load balancer will be used in the load balancer’s DNS record.
Monitoring
You can use the following features to monitor your load balancers, analyze traffic patterns, and troubleshoot issues with your load balancers and back-end instances
– CloudWatch metrics
Elastic Load Balancing provides the following metrics through Amazon CloudWatch
- Latency
- Request count
- Healthy hosts
- Unhealthy hosts
- Backend 2xx-5xx response count
- Elastic Load Balancing 4xx and 5xx response count
– CloudTrial Logs
– Access Logs for your Classic Load Balancer
Elastic Load Balancing provides access logs that capture detailed information about requests sent to your load balancer.
Each log contains information such as the time the request was received, the client’s IP address, latencies, request paths, and server responses.
You can use these access logs to analyze traffic patterns and to troubleshoot issues.
- Access logging is an optional feature of Elastic Load Balancing that is disabled by default
- By default, these logs are actually turned off. But once we turn them on, they are automatically gathered and stored in Amazon S3. When you set up the logs or any time after that, you can change the interval at which the logs are taken to 5 minutes or 60 minutes.
Monitoring the Environment
One of the benefits of Elastic Load Balancing is that it provides a number of metrics through Amazon CloudWatch. While you are performing load tests, there are three areas that are important to monitor: your load balancer, your load generating clients, and your application instances registered with Elastic Load Balancing (as well as EC2 instances that your application depends on).
-Sticky sessions can only be enable with HTTP/HTTPS
- ELB health check with the instances should be used to ensure that traffic is routed only to the healthy instances
Reference
https://aws.amazon.com/articles/1636185810492479
(the documentation at http://aws.amazon.com/documentation/cloudwatch/ – cloudwatch metrics):