Difference between types of blobs in Azure
-
Hey all,
Still don't fully get the concept of Block, Append, Page blob.
- Between block and append blob I can see that the difference is in being able to modify actual block inside a blob, but technically we can override entire blob and do the same thing, I am struggling to find any benefits of using append blobs? And also I didn't find any way to target blocks specifically trough programming/scripting, rather then u Rest API.
- What exactly is a page blob, why don't we use just one type of blob for all, and why is page blob most suited for disks?
Could someone please help me understand these concepts better or point me to some resources?
I found this Microsoft documentation, but these questions remain still.Thank you!
-
For your first question, you can overwrite the entire blob and do the same thing, but that wouldn't be very efficient. Append blobs are great for things like logging. When a new event occurs, we just need to add a new record to the end of the blob. This is a much faster and more efficient operation that trying to rewrite the entire blob, especially at scale. Think of 1000's of devices entering new events to a log file! Also, append blobs don't support updating or deleting existing blocks, so we have data integrity.
Your second question is a little more involved. I am not a storage engineer, so I don't have any more information than what Microsoft provides.
Block blobs are optimized for uploading large amounts of data efficiently, basically for write operations. Think copying files from a local source to Azure, file shares, etc. When you do large data writes, it's like you are filling up the storage, from the bottom to the top, like filling a cup with water.
Page blobs are optimized for random read / write operations, like an operating system does on a local hard drive. Unlike with block blobs, reads and writes don't go from the bottom to the top, like filling it with water. They jump around, needing data from here and there, writing data here and there. This is why Azure VMs store their VHDs using page blobs.
Now how they are optimized to support the different storage needs, I don't know. I just know which one to use based on my needs.
Hope this helps!
-
@Mike-Rodrick Thanks a lot, this was very helpful, especially large scale comparison, I always forgot that Azure/Cloud is actually designed to support large scale solutions, this will also help me in future topic understanding.
-
You're welcome, glad to help!!