ELB Sticky Sessions

Explore how to ensure consistent user experiences by routing requests to the same instance, while addressing scalability using ELB sticky sessions in AWS.

Elastic Load Balancing (ELB) is important in providing applications reliability and high availability by evenly distributing incoming traffic across multiple targets, including Amazon EC2 instances, containers, and IP addresses. A standout feature within ELB is sticky sessions, or session affinity, which allows ELB to assign a user’s session to a specific target. This capability is essential for maintaining a uniform user experience, particularly in applications where session data is stored on the server.

Sticky sessions

Sticky sessions are a way to ensure that incoming requests, which belong to the same client session, land on the same target behind the load balancer. This feature is invaluable for applications that depend on server-side session state persistence. Without sticky sessions, users might encounter errors and inconsistencies if their requests are distributed across multiple targets, disrupting the continuity of the application’s state that is maintained locally. Here is an visual representation of user's requests without sticky sessions:

Get hands-on with 1400+ tech skills courses.