Azure App Service - shared storage between deployment slots?

Daniel Twigden 21 Reputation points
2020-03-26T21:20:24.603+00:00

I've seen questions similar to this on various platforms but haven't been able to find a definitive answer.

I have an Azure App Service running an ASP.NET application - connecting with Azure SQL Database but also some static files that are used for configuration purposes. These files currently reside within the d:\home\ folder within the App Service - and are accessed by some C++ native code within the app that is exposed via C++/CLR.

I want to use the deployment slots feature to host a staging environment so we can upgrade without any downtime, this means that our configuration would ideally be shared across slots. However, as I understand, upon swapping slots the entire site content is moved to the destination slot. This includes our configuration.

I believe that each deployment slot within an App Service still resides within the same 'parent' host (the App Service Plan). Is there really no storage container for files accessible to each of the App Services (or their slots) ?

We are also looking into ways of mirroring or sync'ing this configuration across slots, but in some ways this defeats the need for having slots.

Any advice / feedback would be appreciated!

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,909 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ryan Hill 25,981 Reputation points Microsoft Employee
    2020-03-27T02:01:42.617+00:00

    Hi @Daniel Twigden ,

    To answer you initial question, app service slots do not share storage. A slot can be considered as a separate VM instance within your app service plan. A clear indicator of this is the fact you can't use slots for Shared VM SKUs.

    You can share app configurations between slots or make an app setting be dedicated to a particular slot. You achieve this by selecting the 'Slot Setting' in Application Settings under the Configuration blade. Files on the other hand aren't shared as the instance is essentially a separate VM with separate storage.

    This doc further explains what happens when you perform a swap.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful