Share via

How to successfully migrate Azure Function Apps to use deployment slots

Chris Buley 161 Reputation points
2024-06-06T00:02:40.6733333+00:00

Hi everyone,

Our Azure Functions Apps currently don't use deployment slots and we're looking at migrating our function apps to use them.

If we create deployment slots and then deploy updated code to the slots, what will happen to the original function app? Will it still function with all the relevant settings?

We have applications that link to the original function app name, and since the deployment slot will have a different hostname, we may have issues with production traffic not being routed to the relevant deployment slot etc.

Regards

Chris.

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.

0 comments No comments

Answer accepted by question author

  1. Abiola Akinbade 30,490 Reputation points Volunteer Moderator
    2024-06-06T00:37:05.67+00:00

    Hello Chris,

    Thanks for your question.

    Deployment slots, are isolated environments so your original code is fine.

    Yes, deployment slots get unique host names.

    See below Settings that are swapped and aren't ( from the official doc): https://learn.microsoft.com/en-us/azure/azure-functions/functions-deployment-slots?tabs=azure-portal#manage-deployment-slots

    You'd need to ensure DNS and routing mechanisms points to the correct hostname after a swap.

    https://learn.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-custom-domain?tabs=root%2Cazurecli

    If above answer was helpful, please remember to "Accept Answer"

    Was this answer helpful?


0 additional answers

Sort by: Most helpful

Your answer

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