The concept of fault tolerance and high availability remains the same as far as cloud computing is concerned. The whole system is not supposed to stop even if there is a failure or outage in any one of the components across your infrastructure. It is recommended to follow certain practices for your AWS ELBs which can help in providing users with a complete fault-tolerant cloud environment.
What is AWS ELB (Elastic Load Balancing)?
AWS ELB (Elastic Load Balancing) distributes incoming traffic of your application across multiple resource targets, such as EC2 instances, containers, IP addresses, etc.
A load balancer can manage and balance the varying load of your application traffic in a single Availability Zone or across multiple Availability Zones.
Elastic Load Balancing consists of three types of load balancers –
- Application Load Balancers (best suited for load balancing of HTTP and HTTPS traffic)
- Network Load Balancers (best suited for load balancing of Transmission Control Protocol (TCP) traffic where extreme performance is required)
- Classic Load Balancers (provides basic load balancing across multiple Amazon EC2 instances).
Enable connection draining feature for Elastic Load Balancing
Enabling connection draining feature in a load balancer makes sure that any back-end instances you have deregistered will complete requests in progress before the deregistration process starts. Also, if a back-end instance fails to keep up with the recommended health checks, then the load balancer does not send any new requests to the unhealthy instance. Although it will still allow existing requests to complete.
AWS ELB connection draining prevents breaking open network connections while taking an instance out of service, updating its software, or replacing it with a fresh instance that contains updated software.
Connection draining avoids the situation of broken connection being displayed as a half-drawn web page, an aborted file download, or a failed web service call. It is recommended that connection draining should be enabled for your Elastic Load Balancers to ensure fault tolerance in your cloud infra.