Describe the purpose of AWS Elastic Load Balancing (ELB).


Amazon Web Services (AWS) Elastic Load Balancing (ELB) is a service that automatically distributes incoming application traffic across multiple Amazon EC2 instances. The primary purpose of ELB is to improve the availability and fault tolerance of your applications by ensuring that traffic is distributed evenly across healthy instances and by redirecting traffic away from instances that may be experiencing issues.

  1. Load Balancer Types:
    AWS ELB offers three types of load balancers:
    • Application Load Balancer (ALB): Operates at the application layer (Layer 7) and is best suited for routing HTTP/HTTPS traffic. It supports content-based routing, enabling the balancing of traffic based on different URL paths or hostnames.
    • Network Load Balancer (NLB): Operates at the transport layer (Layer 4) and is designed for handling TCP, UDP, and TLS traffic. NLB is suitable for low-latency and high-throughput applications.
    • Classic Load Balancer (CLB): The older generation load balancer that provides basic load balancing across multiple EC2 instances.
  2. Distribution of Traffic:
    • ELB automatically distributes incoming traffic across multiple instances within one or more Availability Zones, helping to ensure high availability.
    • It uses health checks to monitor the health of instances and routes traffic only to healthy instances, preventing requests from being sent to instances that may be experiencing issues.
  3. Auto Scaling Integration:
    • ELB seamlessly integrates with AWS Auto Scaling, allowing you to automatically adjust the number of EC2 instances based on demand. As Auto Scaling launches or terminates instances, ELB automatically adjusts the traffic distribution accordingly.
  4. Security Features:
    • Supports SSL termination, allowing ELB to handle SSL/TLS decryption, relieving the backend instances from this computational overhead.
    • Provides security groups for controlling inbound and outbound traffic to and from instances.
  5. Connection Draining:
    • Ensures that in-flight requests are completed before an instance is taken out of service, preventing disruption to users during instance scale-in or maintenance.
  6. Access Logs:
    • ELB can generate access logs that capture detailed information about requests, helping with debugging, monitoring, and analysis of application traffic.
  7. IPv6 Support:
    • ELB supports both IPv4 and IPv6 traffic, allowing applications to be accessible over the Internet using either protocol.
  8. Cross-Zone Load Balancing:
    • Distributes traffic evenly across instances in all enabled Availability Zones, improving fault tolerance and reducing the likelihood of uneven load distribution.
  9. Target Groups (for ALB and NLB):
    • ALB and NLB use target groups to route requests to registered targets (instances, IP addresses, or Lambda functions). This provides greater flexibility in defining the backend architecture.

AWS Elastic Load Balancing plays a crucial role in enhancing the scalability, availability, and fault tolerance of applications hosted on AWS by efficiently distributing incoming traffic across multiple instances and providing features for managing and securing the traffic flow.