# ELB (Elastic Load Balancing)

Elastic Load Balancing (ELB) is a service provided by Amazon Web Services (AWS) that automatically distributes incoming application traffic across multiple targets, such as EC2 instances, containers, IP addresses, and Lambda functions. ELB helps ensure a high availability and fault tolerance for applications by balancing the load across different resources.

## History

Amazon Web Services launched ELB in April 2009 to address the need for scalable and fault-tolerant application infrastructure. Initially supporting only HTTP and HTTPS traffic, ELB has since evolved to include support for [TCP,](https://en.wikipedia.org/wiki/Transmission_Control_Protocol) [UDP](https://en.wikipedia.org/wiki/User_Datagram_Protocol), and [web sockets](https://en.wikipedia.org/wiki/WebSocket), with the introduction of various types of load balancers to cater to different use cases.

## Value proposition

Elastic Load Balancing offers several key benefits:

- **High availability**: ELB automatically distributes traffic across multiple targets in one or more Availability Zones, ensuring that applications remain highly available.
- **Scalability**: ELB scales your [load balancer](https://aws.amazon.com/what-is/load-balancing/) as incoming traffic changes over time, handling varying levels of traffic without manual intervention.
- **Security**: Integration with [AWS Certificate Manager (ACM)](https://docs.aws.amazon.com/acm/latest/userguide/acm-overview.html) and support for HTTPS ensures secure communication between clients and your application. ELB also works with [AWS WAF](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-awswaf.html) to protect applications from web attacks.
- **Ease of management**: Simplifies the task of managing traffic distribution and application scaling, reducing the operational burden on IT teams.

## Challenges

1. **Cost management**: Without proper monitoring, ELB costs can add up, especially in environments with fluctuating traffic.
2. **Configuration complexity**: Setting up and optimizing ELB for specific use cases can be complex, requiring careful configuration and tuning.
3. **Latency**: Additional latency can be introduced by the load balancing process, particularly if not configured correctly.
4. **Dependency on AWS**: Relying on ELB ties you to AWS infrastructure, which can be a consideration for [multi-cloud strategies](/content/finops-glossary/multi-cloud-strategy/index.html).

## Key features

1. **[Auto scaling](/content/finops-glossary/autoscaling/index.html)**: ELB automatically adjusts capacity to handle incoming traffic, ensuring consistent application performance.
2. **Health checks**: [Monitors](/content/finops-glossary/cloud-cost-monitoring/index.html) the health of registered targets and routes traffic only to healthy instances, improving application reliability.
3. **Cross-zone load balancing**: Distributes traffic evenly across targets in different [Availability Zones](https://docs.aws.amazon.com/whitepapers/latest/get-started-documentdb/aws-regions-and-availability-zones.html), enhancing fault tolerance.
4. **SSL/TLS termination**: [Offloads SSL/TLS](https://docs.aws.amazon.com/cloudhsm/latest/userguide/ssl-offload-overview.html) encryption and decryption to the load balancer, improving performance and simplifying certificate management.
5. **Sticky sessions**: Supports session affinity ( [sticky sessions](https://stackoverflow.com/questions/10494431/sticky-and-non-sticky-sessions)) to bind a user’s session to a specific target, useful for stateful applications.
6. **[Content-based routing](https://docs.elastic.io/guides/content-based-router.html)**: Advanced routing capabilities with the Application Load Balancer, such as host-based or path-based routing.

## Types of ELB

1. **[Application Load Balancer (ALB)](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html)**: Best suited for HTTP and HTTPS traffic, offering advanced routing features based on URL, host, and path.
2. **[Network Load Balancer (NLB)](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/introduction.html)**: Designed for high-performance traffic handling TCP, UDP, and TLS traffic at Layer 4, suitable for high-throughput and low-latency requirements.
3. **[Classic Load Balancer (CLB)](https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/introduction.html)**: Supports basic load balancing for applications built within the EC2-Classic network, handling both HTTP/HTTPS and TCP traffic.

## Applications

1. **Web Applications**: Distributing HTTP/HTTPS traffic across multiple instances to ensure high availability and reliability.
2. **Microservices**: Routing requests to appropriate microservices using host-based or path-based routing.
3. **API Gateways**: Load balancing traffic to backend APIs for better performance and scalability.
4. **Gaming Applications**: Handling high-throughput and low-latency traffic for real-time multiplayer games.
5. **Mobile Applications**: Ensuring seamless and reliable backend connectivity for mobile apps.

## Market

Elastic Load Balancing is widely used across various industries, including technology, finance, healthcare, and e-commerce. Its ability to enhance application performance, reliability, and security makes it a crucial component for businesses relying on AWS infrastructure. The market for ELB continues to grow as more organizations migrate to cloud-based architectures and require robust load balancing solutions.

## Similar concepts

1. [**Google Cloud Load Balancing**:](https://cloud.google.com/load-balancing/docs) A fully distributed load balancing service offered by Google Cloud.
2. [**Azure Load Balancer**:](https://learn.microsoft.com/en-us/azure/load-balancer/) Microsoft Azure’s load balancing solution for distributing network traffic across multiple resources.
3. **[NGINX](https://nginx.org/en/docs/)**: A popular open-source load balancer and reverse proxy server for handling HTTP, HTTPS, and other protocols.
4. **[HAProxy](https://www.haproxy.org/)**: Another open-source load balancer known for its high performance and reliability in distributing traffic.

## References

1. [AWS ELB Documentation](https://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/what-is-load-balancing.html)
2. [Amazon ELB Overview](https://aws.amazon.com/elasticloadbalancing/)
3. [AWS Blog: Introducing Elastic Load Balancing](https://aws.amazon.com/blogs/aws/elastic-load-balancing-reliable-scalable-and-inexpensive/)
4. [AWS Certificate Manager (ACM)](https://aws.amazon.com/certificate-manager/)
