How the development slot works

thsieh123 21 Reputation points
2021-10-17T06:28:39.28+00:00

I add a "devel" deployment slot in the function app's portal. The target slot is my original "production" that I have been deployed to. I can deploy different code to "devel" and "production" via vsc. It seems that the "devel" slot has been executed when client connects to the function app. This is what I understand that the "devel" maps to target "production" slot. If I want the client to hit the original "production" slot, I can only "stop" the "devel" function app. Is there other way to choose which slot is facing customer? And what is the normal use case for the different deployment slots. Because if I want my real customer still hits the production slot while my test client hits the "devel" slot. If I turn on the devel function app, the mapping happens and my customer will hit to devel one.

My function app sits behind IotHub and triggered by builtin eventhub.

Thanks

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,930 questions
0 comments No comments
{count} votes

Accepted answer
  1. MughundhanRaveendran-MSFT 12,506 Reputation points
    2021-10-18T07:27:56.36+00:00

    Hi @thsieh123 ,

    It appears that you have two slots, one is "Production" (default slot) and "devel". Looking at the details provided, devel and production has separate code bases.

    Your main concern is "It seems that the "devel" slot has been executed when client connects to the function app"

    This would happen if the IOThub triggered function present in the devel slot has been called by the client or if you have performed a slot swap. During a slot swap, the code/ app settings would be swapped from devel slot to production slot .
    If you havent swapped the slots, then you will have to check if the client is targetting the production slot's function app

    By default, all the requests/triggers would execute the production slot's function, there is no need to stop the devel slot. Again, I would suggest you to check the client side or also take a look at the integration page of the Production slot's function app and check if the trigger and bindings section has been mapped to correct IOThub resource name

    141255-image.png

    Here are the use cases for deployment slots
    https://learn.microsoft.com/en-us/azure/azure-functions/functions-deployment-slots#why-use-slots

    Please let me know if you are still facing the issue. I will be able to help you further.

    I hope this helps!

    Also please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.