Azure / Azure/azure-functions-host

Premium Functions not honoring Slot Traffic Routing settings

Open
#6,086 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

Deployment Slot Traffic % Routing settings don't appear to work in Premium Functions. For example, if I set 20% of traffic to route to the "blue" slot, 100% of traffic will route to the Production slot.

#### Investigative information

- Timestamp: 21-May-2020 19:13 UTC
- Function App version: v3
- Function App name: `testinprodfn-aue`
- Function name: `GetHealth`
- Invocation ID: `561802d7-7d21-4b85-8d9e-976563e54b0b` (1 of 10,000)
- Region: Australia East

#### Repro steps

1. Open [deploy.ps1](https://github.com/DanielLarsenNZ/examples/blob/master/functions-test-in-prod/deploy.ps1) and edit the vars as required.
2. Configure a load test (using loader.io for example) for 10,000 clients to connect and GET `/api/GetHealth`
3. In Application Insights, observe percentage of traffic served by `production` and `blue` slots

My test rig is deployed here:

#### Expected behavior

I expect traffic routing to work in the same way as App Services. See [this example](https://github.com/DanielLarsenNZ/examples/tree/master/appserviceplan-test-in-prod) for how to rig the exact same test using App Services. This App Service is running here:

App Services Slots with 80/20 traffic routing:

![image](https://user-images.githubusercontent.com/2294760/82766789-ecd58580-9e75-11ea-8470-66dd0ef751a7.png)

Loader.io test with 10,000 clients over 1 minute:

![image](https://user-images.githubusercontent.com/2294760/82766811-345c1180-9e76-11ea-980b-d4f481d7885e.png)

App Services correctly routes approx. 20% of traffic to `blue` slot:

![image](https://user-images.githubusercontent.com/2294760/82766820-4342c400-9e76-11ea-9445-c665c4dd1e33.png)

#### Actual behavior

Premium Functions Slots with 80/20 traffic routing:

![image](https://user-images.githubusercontent.com/2294760/82766826-535aa380-9e76-11ea-8700-656c29447952.png)

Loader.io test with ~10,000 clients over 1 minute:

![image](https://user-images.githubusercontent.com/2294760/82766831-6a999100-9e76-11ea-89c6-1956c1ceb95c.png)

Functions routes 100% of traffic to `production` slot:

![image](https://user-images.githubusercontent.com/2294760/82766840-7edd8e00-9e76-11ea-85ce-80d25a08e9f5.png)

#### Known workarounds

None that I know of.

Contributor guide

Open the contributing guide

Research direction

Start with the linked deploy.ps1 and reproduce the Premium Functions slot-routing test against the GetHealth endpoint, then compare its Application Insights results with the App Service example. Confirm whether the host or platform is responsible for ignoring the configured percentage; done means traffic reaches the blue slot at approximately the configured rate.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.