158

Please correct my wrongs. From my reading on the topic so far, it appears to me that both, Azure Blob Storage and File Service offer the ability to store file(s) and folder(s) (I understand that blobs can store any binary object, but any serialized binary stream is just a file at the end of the day) in a hierarchical structure that mimics a file system.

Only the API to access them are slightly different in that the File Service allows you to query the source using Win32 File I/O like functions as well in addition to using the REST API.

Why would you choose one over another if you wanted your application to store some files owned by your application's users?

Water Cooler v2
  • 32,724
  • 54
  • 166
  • 336
  • 6
    Have you read this blog post from Azure Storage Team: http://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/12/introducing-microsoft-azure-file-service.aspx? Please scroll down to the section where it explains when to use which service. – Gaurav Mantri Jul 22 '14 at 06:41
  • 3
    Yes, I read that article before posting. I am in very early stages of thinking things through and my understanding is not yet well-formed. I still am confused. I understand all that's written in all the articles I've read but I am trying to figure out what best to use if I want to store user owned files for an application I am designing. – Water Cooler v2 Jul 22 '14 at 06:46
  • I guess it boils down to what you want to do with these user files? Will they be somehow streamed back (through a web browser etc.) or will they be processed further? If it is former, then blob storage makes sense. If it is latter, then file service makes sense. – Gaurav Mantri Jul 22 '14 at 06:52
  • 1
    Thing is: I want to let the user upload and download his own files and also share some of them with others in his group of contacts (for them to only download/read). I could use Shared Access Signatures (SAS) with Blob storage to do that, but that'd not take care of my "sharing" requirement. I was leaning towards a solution where my app/service did all the authentication and did not expose the actual storage resource to the user. In that context, for me, both File Service and Blob storage do the same thing. No one offers me any more comfort than the other. – Water Cooler v2 Jul 22 '14 at 06:57
  • @WaterCoolerv2 Can you help me choosing between azure file storage vs blob storage what did you concluded – Heemanshu Bhalla Jul 31 '17 at 16:00
  • 1
    https://learn.microsoft.com/en-us/azure/storage/common/storage-introduction – Manish Jain Dec 01 '20 at 21:30
  • 1
    It’s a good question and answers are not opinion-based – Michael Freidgeim May 30 '21 at 01:31

3 Answers3

124

A few items for your question:

  1. You can't mount Azure Blob Storage as a native share on a virtual machine.
  2. Azure Blob Storage isn't hierarchical beyond containers. You can add files that have / or \ characters in them that are interpreted as folders by many apps that read blob storage.
  3. Azure File Service provides a SMB protocol interface to Azure Blob Storage which solves the problem with (1).

If you are developing a new application then leverage the native Azure API directly into Blob Storage.

If you are porting an existing application that needs to share files then use Azure File Service.

Note that there are a few SMB protocol features that Azure File Service doesn't support.

Simon W
  • 5,481
  • 3
  • 24
  • 35
  • 1
    Thanks very much, Simon. A few things about your reply. See, at the end of the day, I want an end-result. From that point-of-view, I posted this question. From an end-result point of view, arguments #1 and #3 on your list are not pertinent. I am not arguing with you at all. :-) Your answer is extremely helpful. I am just trying to tell you the thought process that led me to ask this question. And argument #2 is a non-issue as it presents a problem and says that that's not a problem, though. Supposing I wanted to store user owned files, I was thinking, why would I prefer one over the other? – Water Cooler v2 Jul 22 '14 at 06:50
  • See the two points after the numbered list - that should be your guide. – Simon W Jul 22 '14 at 06:51
  • 1
    @SimonW - the two points after your guide are stated as "the way to do it." However, they're not absolutes. They're more like suggestions, within that scenario. There are cases where you wouldn't want to use the Azure API directly, even with a new app. Likewise, there are cases where you may want to rework existing apps to use the Azure API. – David Makogon Jul 22 '14 at 12:11
  • Is there any IOPS performance difference between them? – iamnicoj Jan 06 '16 at 23:15
  • @SimonW - can you elaborate on point 3 above? Is this a way to mount a Blob as an SBM file share or accessing it as a "disk" in some way? – Neil Weicher Aug 05 '19 at 16:43
  • Sorry for the slow response. Azure Files utilise storage accounts as their underlying storage mechanism, so it's not really just a Blob, it could be multiple Blobs. – Simon W Dec 06 '19 at 10:11
49

A few other things to consider:

  • Pricing: Blob storage is much cheaper than file storage.
  • Portability: With blob storage if you decide to migrate to a diff platform in future you may have to change your app code but with File storage you can migrate your app to any other platform that supports SMB (assuming you are using native file system APIs in your app)
Dharmendar Kumar 'DK'
  • 2,082
  • 17
  • 18
  • 4
    The price here is a massive factor (about a 5x difference currently), and also worth a mention is the 5TB limit of file storage. – TZHX Sep 20 '17 at 14:38
  • 2
    Old post, but i'm reading it first time today. There is a 5TB limit by default on the standard price tier, but that can be changed via a switch to a 100TB limit. Note* Enabling large file shares on an account is an irreversible process on an Azure Storage account. https://learn.microsoft.com/azure/storage/files/storage-files-how-to-create-large-file-share – DamnedNForsaken May 13 '20 at 17:11
14

Azure File Service is targeted more to internal file handling. With internal I mean mounting a directory to a VM in the cloud or on-premises so it can be loaded in you back-end (SMB based protocol).

For sharing files with end-users (web or apps) it probably makes more sense to use blob storage as this simplifies downloading through a URL and securing download through Shared Access Signatures.

This post shares more details on the comparison (at the bottom): https://blogs.msdn.microsoft.com/windowsazurestorage/2014/05/12/introducing-microsoft-azure-file-service/

  • Hi Clemens Schotte, what do mean by blob storage allows downloading throug a url Do you mean file storage don't provide urls – Heemanshu Bhalla Jul 29 '17 at 16:55
  • 2
    Some things have changed since these posts, but the File Service does support downloading through a URL and other REST APIs (https://learn.microsoft.com/en-us/azure/storage/common/storage-decide-blobs-files-disks). In addition, security seems to be at the Storage Account level, so it should be very similar betweem Blobs and File Service (https://learn.microsoft.com/en-us/azure/storage/common/storage-security-guide). – K J Jun 14 '18 at 17:32