question

DanielTwigden-8952 avatar image
0 Votes"
DanielTwigden-8952 asked azure-cxp-api edited

Azure App Service - shared storage between deployment slots?

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-webapps
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ryanchill avatar image
1 Vote"
ryanchill answered ryanchill commented

Hi @DanielTwigden-8952,

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.


· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Wonderful - thanks for the quick response!

0 Votes 0 ·

Your very welcome @DanielTwigden-8952.

0 Votes 0 ·