1

Assuming that I want to use the Azure Container Service or the Azure App Service, to mount docker containers with ASP.Net Core APIs or/and Web Apps.

Each API uses till now, for a part of its data, local storage in the host VM (Linux/Win) in parallel with other Azure managed persistence services e.g. SQL, Redis, Document db, etc. for good reasons.

If I use docker containers for the application, what can I do for the local storage of each API? I use SQLite, RocksDB, documents.

Is it possible to use Azure Managed Disks for docker volumes?

and is their behavior/performance the same as local disks? e.g. file locking for SQLite, speed.

Otherwise, I should stay with the VM deployment

stefan2410
  • 1,931
  • 2
  • 16
  • 21

1 Answers1

1

The short answer to this is 'Yes' you can persist volumes in Azure Storage Accounts and access those files with other services.

Right now via AKS (Azure Kubernetes Service) I am using an Azurefile Persistent Volume Claim ('PVC') to make the volumes of my services available but I am by no means an expert.

In our case we are working on migrating an existing containerized infrastructure from Docker Cloud (just sunsetted) to Azure AKS. Even with all of our containers running unchanged (attempting to run on AKS exactly as they were on Docker Cloud) this is a relatively big project. For you developing the entire infrastructure I would anticipate spending 1 week + figuring out the ins and outs.

Resources to Get Started:

  1. https://learn.microsoft.com/en-us/azure/aks/azure-files-dynamic-pv#create-storage-account

Caveat: I say short answer is 'Yes' since it will take some time to go from "I want to containerize this thing and store data in a persistent volume" to actually having the container up and running with the underlying infrastructure functioning as you describe.

Speed

In my experience moving from a Persistent Volume hosted locally on the Kubernetes Node (Azure VM) file system to the Storage Account docked me several hundred Milliseconds latency for my web application (total) but I have also not attempted to optimize it.

Our load time went from 1.3-1.4sec to 1.5-1.6sec.

Community
  • 1
  • 1
Necevil
  • 2,802
  • 5
  • 25
  • 42
  • The [Azure Disk Static](https://learn.microsoft.com/en-us/azure/aks/azure-disk-volume) seems like what I want. It is available to only a single AKS node, but I can have an API in the container. I don't know its performance and if it is available also for an Azure App Service. – stefan2410 May 30 '18 at 03:40
  • I found a relevant question in GitHub [Which of the four "Configure data volumes" alternatives is best suited for MongoDB?](https://github.com/MicrosoftDocs/azure-docs/issues/6618). The answer is "It depends on your usage scenario" – stefan2410 May 30 '18 at 04:06
  • 1
    @stefan2410 'depends on your usage scenario' is always a big UGH from me. I went with Azure File since I wanted to have easy access to the data inside the volume from external services here's one resource I used to decide: https://docs.microsoft.com/en-us/azure/storage/common/storage-decide-blobs-files-disks — not sure about the performance exactly but that wasn't a huge priority on my side. I saw this answer in the related questions which may relate closer to your case: https://stackoverflow.com/questions/43775500/mount-a-volume-while-using-a-docker-container-in-azure-app-service?rq=1 – Necevil May 30 '18 at 15:05