Azure Storage Blobs

Scalable, Secure, and Cost-Effective Object Storage for Your Cloud Data

What are Azure Storage Blobs?

Azure Blob Storage is Microsoft's cloud-based object storage solution that is optimized for storing massive amounts of unstructured data. Unstructured data includes text or binary data, such as images, videos, audio files, documents, application executables, and backup data.

You can use Blob Storage to expose files publicly to the world, or to store application data privately. Common uses for Blob Storage include:

Key Concepts

📦

Storage Account

A Azure Storage account provides a unique namespace in Azure for your storage data. All objects that you add to Azure Storage are stored within your storage account. The total size and type of service you can use depends on the type of storage account you create.

📁

Containers

A container is a logical grouping for your blobs. It's similar to a directory in a file system. You can store an unlimited number of blobs within a container, and a storage account can contain any number of containers.

📄

Blobs

A blob is the simplest type of object in Azure Storage. A blob can store any amount of text or binary data, such as a document, image, or video file. Blob Storage offers three types of blobs:

  • Block blobs: Optimized for storing large amounts of unstructured data. They are made up of blocks of data.
  • Append blobs: Optimized for append operations, such as logging data from a virtual machine.
  • Page blobs: Optimized for random read and write operations. Used for IaaS virtual machine disks.

Getting Started

To start using Azure Blob Storage, you'll need an Azure subscription and a storage account. Here’s a basic workflow:

  1. Create an Azure Storage Account: You can do this through the Azure portal, Azure CLI, or Azure PowerShell.
  2. Create a Container: Within your storage account, create a container to organize your blobs.
  3. Upload Blobs: Upload your files (images, documents, videos, etc.) to the container.
  4. Access Blobs: Access your blobs via REST APIs, SDKs (e.g., .NET, Python, Java, Node.js), or tools like Azure Storage Explorer.

Example: Uploading a Blob (Conceptual)

Here’s a conceptual snippet of how you might upload a blob using a typical SDK:


// Assuming you have a blob client initialized:
// BlobServiceClient blobServiceClient = new BlobServiceClient(connectionString);
// BlobContainerClient containerClient = blobServiceClient.GetBlobContainerClient("my-container");

string blobName = "my-document.txt";
string filePath = "path/to/your/local/document.txt";

using (var fileStream = File.OpenRead(filePath))
{
    BlobClient blobClient = containerClient.GetBlobClient(blobName);
    blobClient.Upload(fileStream, overwrite: true);
    Console.WriteLine($"Successfully uploaded {blobName}");
}
        

Pricing and Tiers

Azure Blob Storage offers different access tiers to optimize costs based on data access frequency:

Pricing is based on the amount of data stored, the number of transactions, and data egress.

Learn More on Azure Documentation