Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment slots created with AR Affinity turned on by default #498

Open
christopheranderson opened this issue Sep 13, 2017 · 9 comments
Open

Comments

@christopheranderson
Copy link
Contributor

Reported on twitter: https://twitter.com/DerSia_/status/908024321917960192

AR Affinity should not be turned on by default for users for Functions.

@dersia
Copy link

dersia commented Sep 13, 2017

just to sum it all up here again:

For the production slot of a function-app the ARR affinity setting is disabled by default, which is the expected behavior.
For the test slot, though, it is by default enabled, which is not expected for stateless services.

Since the setting is disabled on the Application Setting page, it can't be change manually.

@christopheranderson
Copy link
Contributor Author

Since the setting is disabled on the Application Setting page, it can't be change manually.

Ugh, too smart for our own good, here. You can attempt to do it via resources.azure.com if you don't mind just calling ARM APIs yourself.

@dersia
Copy link

dersia commented Sep 13, 2017

You can attempt to do it via resources.azure.com if you don't mind just calling ARM APIs yourself.

Yeah did that already :)

@alexkarcher-msft alexkarcher-msft added this to the Triaged milestone Feb 20, 2019
@zmarty
Copy link

zmarty commented Mar 8, 2019

We use Azure Functions v2 and ARR Affinity is set to On by default.

Since ARR Affinity is set to On by default when we deploy Azure Functions, it seems this has a negative impact on how we receive Event Grid messages. When we have a peak of incoming Event Grid messages to a single function, all the messages go to a single machine in our pool (!!), apparently because ARR Affinity is set to On. Related issue: #1127

In order to fix this, we have to manually go to each App and set it to Off in the Azure portal.

Requested fixes

  1. Stop setting ARR Affinity to On by default for Azure Functions
  2. Allow setting the ARR Affinity setting using the Azure Functions json configuration files which we store in our source code repo

@alexkarcher-msft

@zmarty
Copy link

zmarty commented Sep 27, 2020

Hello bug my old friend. We again encountered this while moving our app into a Premium App Service plan. I thought this was fixed a long time ago @brettsam?

@brettsam
Copy link
Member

@shubDhond -- any idea on this one?

@shubDhond
Copy link

Hi @zmarty, I am the primary developer for deployment slots and wanted to confirm that you are only seeing this behaviour when you create a slot via portal?

@zmarty
Copy link

zmarty commented Sep 29, 2020

Hi @shubDhond

Yes, I created this app from the portal before I deployed code to it. Did not create any particular slot.

@zmarty
Copy link

zmarty commented Oct 5, 2020

@shubDhond Any update? We just created an app in a new Premium Plan and every time ARR Affinity is turned on by default. This is presumably the production slot, we did not create any extra/specific slots.

Also it's unclear to me what happens when ARR Affinity is on and our Azure Functions app receives HTTP Event Grid traffic. My best guess based on looking at CPU usage logs is that instead of correctly being load balanced, the traffic goes to only some machines for some functions. Is this a correct interpretation? It's difficult to tell from the graphs exactly. ARR Affinity is supposed to work with cookies but obviously no cookied are involved in incoming Event Grid traffic, so is ARR Affinity affecting load balancing beyond cookies too somehow?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants