Raghava Akula
Raghava Akula

Reputation: 111

How Azure Application Gateway's **cookie based affinity** works on VMSS downsizing

I was wondering how cookie-based affinity option in Application Gateway works while **downsizing **VMSS instance

I am having 2 VMSS instances with IIS installed & 10+ .NET applications, I have setup a custom autoscale rule that if my CPU usage goes up by >70% for 5 mins if will spin up new instance(3rd instance) and route the traffic to the newly created one , but suddenly if the CPU percentage comes <50% then it will automatically delete newest instance that is created.

but what if one my request is still active on 3rd(newly created instance ). will my VM(3rd instance)wait for the request to complete or simply shutdown the instance?

Thanks.

Enabled Cookie-based affinity option enter image description here

Upvotes: 0

Views: 520

Answers (1)

ChaitanyaN-MSFT
ChaitanyaN-MSFT

Reputation: 551

The 3rd instance will be removed, you will need to configure connection draining on your Azure Application Gateway HTTP settings for existing sessions to complete.

Upvotes: 0

Related Questions