Azure Blob vs File vs Disk storage

Jaked222 picture Jaked222 · Dec 13, 2016 · Viewed 7.4k times · Source

Quick question. I've been reading tons of information about the azure blob/file/disk storage options and I have a such simple storage requirement that I'm confused as to what would be the best choice. Most of the information I'm reading is going totally over my head.

I was hoping someone might be able to narrow down the field of view to a more reasonable sized set of pros/cons. My situation is as follows:

I am building an API that is doing image processing. To put it simply, the user makes a get request for a specific image with specific text to print on top, my API processes it and spits an image back out. Currently I'm running on an Azure emulator so the image files(about 3 gigs of PNGs) are being pulled from a local path. I will soon be deploying to a live azure server so I will want to store these image files somewhere (without putting them in the actual application files).

My understanding so far is that the disk and file options will allow me to keep my code relatively the same, still using general file I/O to load the image paths. The disks will only allow access of data to the machine this API is running on which would be fine, but I dont know if theres any benefit to having the disks, which impose this limitation. The blob storage will require me to change this, but there isn't very much code and I don't foresee this being too difficult.

There's so many details to each different choice that I am having trouble coming to a decision: For my situation, is there a clear choice between the three? Does it come down to whatever is easier? Performance and cost are the top priorities, so what are the pros/cons with respect to these? This does need to be able to scale to more images, but only to a certain degree. I could see it going from 3 gigs of images to 10 gigs of images in the next few years, but not from 3 gigs to 1000 gigs.

Answer

David Makogon picture David Makogon · Dec 13, 2016

Which you choose is entirely up to you, but objectively:

  • Azure File Storage may be mounted as an SMB volume (so that all instances of your app can work with it). Note: This is not something readily supported with Web Apps currently - you'd only be able to write to the file share via API, not via attached disk. Azure File Storage volumes support up to 5TB each, and throughput is max. 60MB/sec across the share. It's backed by Azure blob storage (so, just as durable as blobs).
  • Azure Disks are again blob-backed (page blobs), up to 1TB each. Each disks is mountable to a single VM. Throughput is higher than File Storage (60/Sec per blob). Cannot be shared across VMs without your own solution to sync data. Once mounted and formatted, accessible just like any other local file (e.g. no modifications to your app)
  • Azure blobs: Up to 500TB per storage account, each block blob can be up to 200GB 4.77TB. Access via REST API/SDK, not mountable as a disk / drive. Without modifying your app, you'd need to make sure blob contents were copied to local disk to perform operations on the content (you can't just open a blob as a file and modify it).

(Edited to reflect larger block-blob size, introduced December 2016)