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?

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달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠