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
已提問 3 個月前檢視次數 226 次
1 個回答
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
專家
Kallu
已回答 3 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南