azureazure-blob-storageazure-storageazure-storage-files

Azure Storage: For business purposes, is it better to have many containers with fewer folders OR fewer containers with many folders?


I have an API that businesses can use to download and upload files from our Azure storage account. Each user would have their own business' files, and I want to restrict users from accessing other business' files. I also want to keep the upload and download files separate from one another. I was wondering which of the following I should do. Should I create an Azure Storage container for each business and have two folders for uploading and downloading inside of them OR have two main Azure storage containers, one for uploading files and one for downloading files, and then have folders inside of them for each business?

I'm new to Azure Storage account so I was not 100% sure what to do. There was a similar post made here Is it better to have many small Azure storage blob containers (each with some blobs) or one really large container with tons of blobs? where the user asks the same question but with a different scenario.


Solution

  • According to the answer by David Makogon Managing Azure blobs in many containers is better in terms of performance and listing or managing blobs across different containers.

    Its better to keep separate containers for each businesses and have 2 folders for uploading and downloading the blob across those containers. As bombarding a single container or 2 containers one for uploading and one for downloading with many folders for each business will reduce your performance and might cause latency while you try to manage upload, download and listing of blobs in your storage account.

    Reference:- azure-docs/storage-performance-checklist.md at main · MicrosoftDocs/azure-docs ·GitHub