azureazure-functionsazure-appserviceazure-deployment-slots

Understand traffic percent setting in Azure Function deployment slot


I am trying to understand Azure Function deployment slot concept

  1. What does the traffic % column represent? Even when my staging slot traffic % is set to 0, it's still getting triggered.

  2. How does the scaling of nodes work for staging slot?

azure function deployment slots


Solution

  • What does the traffic % column represent?

    The Traffic % column in the Function App deployment slots refers to the percentage of traffic that is routed to that particular slot.

    1. By default, Traffic % is set to 0 for the newly created slot, which means all the traffic is routed to the production slot and no traffic will be routed to the non-production/staging slot.
    2. If you set Traffic setting as 20% for non-production slot, the specified % of clients will be routed to the non-production slot and the remaining 80% will be handled by the production slot.

    enter image description here

    The staging slot(<app-name/slot-name>) can be seen as a separate app with the same designation which works just like any other Function app. Slot's configuration can be changed according to the requirement.

    Even when my staging slot traffic % is set to 0, it's still getting triggered.

    1. Check the configuration of function app to make sure that all functions are referring to particular slot.
    2. Try creating a new deployment slot and check if the issue persists.

    How does the scaling of nodes work for staging slot?

    enter image description here

    References:

    Azure Functions deployment slots