Blob Storage VS. Object Storage

There are big big differences between Object Storage and Block Storage.
We are very familiar with Block Storage, for example, USB drive, your desktop hard drive, your laptop SSD drive, etc.
And based on the Block Storage, there are many popular file systems, like NTFS, ext3, ext4, etc. Block Storage is composed by a large number of blocks, every block has a predefined size, such like 4KB, 1MB.
"File" and "Folder" are the most two important concepts in a file system based on the Block Storage. Every file is composed by one or multiple blocks. The blocks' information is stored in the Metadata part of the file system. Every folder contains one or more files or sub-folders.
Generally, Block Storage supports random access, which means you can freely modify any block of a large file without affecting the other parts of the file.
Whereas for Object Storage, it contains a lot of objects. Every object can be variable length, and once created they cannot be modified any more. Strictly, there are no "folder" concept in the Object Storage, everything is an "object".
Object Storage, naturally, doesn't support random access. You cannot modify one part of an object without affecting the other parts. Under most conditions, modify one existing object means delete the object and recreate a new one.
Let's see one example, imagine there is one file which is 10GB length in a Block Storage. And now, you want to append only a single byte to the end of the file, and supposing the block size is 512 bytes, and the file system is ext4.
Then, what the ext4 file system needs to do is as following:
  • searching the metadata;
  • allocate a free block which is 512 bytes;
  • write the single byte to the block;
  • update the metadata.

Now, let's switching to the Object Storage. There is one object which is 10GB length and you want to append only a single byte to the end of the object.

What you need to do may be:

  • create a temporary file in the same name;
  • read the full content of the 10GB object and copies to the temporary file;
  • append one byte to the end of temporary file;
  • upload the temporary file to the Object Storage.

Obviously, writing a single byte for Object Storage leads to 10GB's extra reading & writing IO efforts.