azure containers and managed disks

1.4k Views Asked by At

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

1

There are 1 best solutions below

3
On

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.