What is: Azure Storage Blob?

Microsoft Azure Storage provides an unstructured storage service for binary and text data known as Blob. It can be used to store any form of data including audio, video, images, documents and other media files. It can be accessed over the internet via HTTP or HTTPS, though the access can be controlled. The data stored in blob storage can be exposed publicly to anyone or can be accessed privately using Shared Access Keys.

Blob storage can be used in following scenarios(not limited to):

  • Sharing media/documents over the internet
  • Audio & Video live Streaming
  • Data backup, disaster recovery, and data archiving

Blob service contains the following three components:

  1. Storage Account: This is the root of all the Azure Storage resources. It acts as a unique namespace for the storage resources clubbed together. All the storage resources within a storage account are billed together as a single unit.
  2. Containers: A container refers to a group of blobs. All blobs must be in a container and a container can have any number of blobs.A container does not have any content on its own and only contains properties and metadata.
  3. Blobs: A blob is an actual file stored in a container. It could be of any type or size. A blob has content, properties as well as metadata.

object-storage

Any resource within Azure Storage is internet-addressable or in other words, can be accessed over the internet using a resource URI. Resource URI for the shown example will appear like

https://media.blob.core.windows.net/images/image1.jpg.

Since the resources are internet addressable and can be accessed over HTTP, they support the HTTP verbs like GET, PUT, HEAD and DELETE.

There are 3 types of blobs:

  1. Block Blobs: These blobs are made of blocks. A block blob can have a maximum of 50000 blocks of size 4MB each. Maximum size allowed for a block blob is slightly over 195 GB(50000 * 4). A block blob more than 64MB in size cannot be committed in a single operation and should be committed as a set of blocks – block by block.
  2. Append Blobs: These blobs are similar to Block blobs except they are optimized for append operations. These blobs are generally used for logging.
  3. Page Blobs: These blobs store data in pages and are designed to be more efficient for frequent read/write operations. Page blobs are used in Azure VMs as OS and data disks.

Points to note:

  1. The type of the blob is specified at the time of blob creation and cannot be changed later.
  2. Blob’s content can be updated anytime using appropriate operations for the type of the blob.
  3. Two storage accounts can have a container with the same name, but, a container name is unique within a storage account.
  4. Two containers can have blob with the same name, but, a blob name is unique within a container.
  5. Container names should always be in lowercase and should always start with a letter or a number.
  6. Blob names are case sensitive, hence, keep a note of the casing while creating a blob.