Byte Ebi's Logo

Byte Ebi 🍀

A Bit everyday A Byte every week

[AWS Cloud Fundamental Notes] Elastic Load Balancer

Introduction to Elastic Load Balancer and its usage and operational mechanism

Ray

Elastic Load Balancer (ELB) achieves traffic distribution and load balancing.
ELB distributes incoming application traffic across multiple targets and virtual devices in one or more Availability Zones(AZ) and generates Access logs.

Health Check

ELB regularly performs HTTP access to specified pages on the backend EC2 instances.
If an EC2 instance does not respond, it is considered a health check failure, and traffic will not be routed to that EC2 instance.

ELB SSL Offloading

ELB can directly send encrypted traffic to EC2 instances or use SSL Negotiation to decrypt the traffic using SSL certificates provided by us before sending it to EC2 instances.

Traditional Single-Server Application

In a stateful architecture, user login information is stored on the server.
If the next user request is forwarded to another server, it cannot determine the user’s login status, leading to an inability to perform corresponding operations.
To solve this problem, ELB provides Sticky Sessions, allowing ELB to route traffic from the same user to the same server. This ensures continuity of the user session without needing to switch to a stateless architecture.

Stateless architecture refers to separating user state from the server and storing it in a storage entity behind, allowing different servers to share it.

Container Technology Application

In a container architecture, there may be multiple ports responsible for different applications on multiple servers.
In this case, switching not only occurs between different machines but also between different port numbers.
To address this new architecture, AWS has introduced a new type of ELB: Application Load Balancer , which can forward traffic to multiple ports on multiple machines.

Four Types of Load Balancers

  • Application Load Balancer: Operates at the application layer (Layer 7) and handles HTTP/HTTPS/gRPC requests.
  • Gateway Load Balancer: Gateway load balancer endpoints to securely exchange traffic across VPC boundaries.
  • Network Load Balancer: Operates at the transport layer (Layer 4) and is suitable for high-performance requests.
  • Classic Load Balancer: Automatically distributes incoming traffic across multiple targets in one or more Availability Zones, improving application fault tolerance.

Recent Posts

Categories

Tags