Session stickiness is the feature from the Application Load Balancer product in AWS that allows you to route requests to the same instance in an auto-scaling group behind a load balancer.
Normally, a load balancer will route requests independently of one another to instances in a target group.
Because of this, if you have an application that stores some kind of session information from a client in the compute instances of an auto-scaling group, you cannot count on ALB routing all requests to the same instance unless you configure it to use sticky sessions.
Sticky session (or session affinity) binds a user session for a given length of time to a specific instance. The length of time of this binding is given by the duration of the cookie generated by ALB, which you can specify.
The ALB generates a cookie named AWSALB, which is sent to a client upon its first request to the ALB, and is expected to be included in all subsequent requests made to the load balancer. The Expires attribute is reseted after every request. **For this to work, the client requesting the ALB must support cookies.
With this configuration in place, you are assured that ALB will route all requests from a given client to the same instance for as long as the cookie generated has not expired, maintaining a continuous experience.