ALB Target Group-Level Stickiness - Rollback Behavior

0

Application Load Balancers have a Target Group-Level stickiness behaviour 1, which ensures that traffic from a client is routed to the same target group. AWS suggest using this for blue/green deployments 2.

In particular, my testing suggests that a user who has a target-level stickiness cookie will remain on the same target group even if the weighting on that target group is brought down to 0. There appears to be no way to revoke that target-group level stickiness; removing the option on the ALB listener rule prevents new users from getting that cookie, but old users will still have their traffic routed as per their cookie.

This suggests that using this stickiness is unsuited for blue/green rollback scenarios, as either:

  • you would have to use such a short stickiness duration that it would defeat the point of stickines, or
  • you would have to keep the faulty application servers around and serving user traffic until the duration totally expires from when you began rollback.

Is my understanding correct, or is there someway to override the stickiness cookie here?

or-wwn
asked 3 months ago179 views
1 Answer
0

You're correct, by definition stickyness and blue/green don't work together. You can expire sessions but if your application requires sticky sessions to work, this would be problematic too because during the time you are expiring sessions (setting application generated cookie to expire in the past), sessions wouldn't be sticky :-(

Set an expiry on the cookie generated by the application that is prior to the current date and time. This will prevent clients from sending the cookie to the Application Load Balancer, which will restart the process of establishing stickiness.

https://docs.aws.amazon.com/elasticloadbalancing/latest/application/sticky-sessions.html

profile picture
EXPERT
Kallu
answered 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions