Distributes incoming application traffic across multiple targets, such as Amazon EC2 instances, containers, IP addresses, and Lambda functions.

<aside> πŸ’‘ An ELB must have at least two AZs

</aside>

<aside> πŸ’‘ An ELB cannot go cross-region, one per region

</aside>

Works in the following order:

  1. Listeners
  2. Rules β€” Not for CLB
  3. Target Groups β€” Not for CLB

For ALB or NLB, ****traffic is sent to the Listeners. When the port matches it then checks the rules what to do. The rules will forward the traffic to a Target Group. The target group will evenly distribute the traffic to instances registered to that target group.

https://youtu.be/Ia-UEYYR44s?si=qcZ1JZzi8cAIr0_d&t=16004

https://youtu.be/Ia-UEYYR44s?si=qcZ1JZzi8cAIr0_d&t=16004

Sticky Sessions

Is an advanced load balancing method that allows you to bind a user’s session to a specific EC2 instance.

This ensures that all requests from that session are sent to the same instance.

Typically utilized with a Classic Load Balancer

Can be enabled for ALB though can only be set on a Target Group, not individual EC2 instances.

Cookies are used to remember which EC2 instance.


Launch Configuration