Azure Storage Overview

Azure Storage provides massively scalable cloud storage for unstructured data, file shares, messaging queues, and NoSQL tables. It is designed for durability, high availability, and secure access.

Blob Storage

Blob storage is optimized for storing massive amounts of unstructured data, such as text or binary data. It is ideal for serving images, documents, videos, or backups.

Common Scenarios

  • Static website hosting
  • Backup & archival
  • Media streaming
  • Big data analytics

Quick Start (C#)

using Azure.Storage.Blobs;

var connectionString = "";
var containerName = "mycontainer";
var blobName = "sample.txt";
var content = "Hello Azure Blob!";

BlobServiceClient serviceClient = new BlobServiceClient(connectionString);
BlobContainerClient container = serviceClient.GetBlobContainerClient(containerName);
await container.CreateIfNotExistsAsync();

BlobClient blob = container.GetBlobClient(blobName);
using var ms = new MemoryStream(Encoding.UTF8.GetBytes(content));
await blob.UploadAsync(ms, overwrite:true);
Console.WriteLine($"Uploaded {blobName}");

Queue Storage

Queue storage offers reliable messaging between application components, enabling asynchronous communication and decoupling.

Typical Use Cases

  • Task scheduling
  • Load balancing workloads
  • Inter-service communication

Quick Start (JavaScript)

const { QueueServiceClient } = require("@azure/storage-queue");

const connectionString = "";
const queueName = "myqueue";

async function main() {
  const client = QueueServiceClient.fromConnectionString(connectionString);
  const queueClient = client.getQueueClient(queueName);
  await queueClient.createIfNotExists();

  const enqueueResponse = await queueClient.sendMessage("Hello from Azure Queue!");
  console.log(`Message added, ID: ${enqueueResponse.messageId}`);
}
main().catch(console.error);

Table Storage

Table storage provides a NoSQL key‑value store for rapid development using a schemaless design. It is ideal for storing large collections of structured, non‑relational data.

Scenarios

  • Device telemetry data
  • User profiles
  • Metadata storage

Quick Start (Python)

from azure.data.tables import TableServiceClient, TableEntity

connection_str = ""
table_name = "SampleTable"

service = TableServiceClient.from_connection_string(conn_str=connection_str)
table_client = service.get_table_client(table_name)

try:
    table_client.create_table()
except Exception:
    pass  # Table already exists

entity = TableEntity()
entity["PartitionKey"] = "users"
entity["RowKey"] = "0001"
entity["Name"] = "John Doe"
entity["Email"] = "john@example.com"

table_client.upsert_entity(entity)
print("Entity inserted")

File Storage

File storage offers fully managed file shares in the cloud that can be mounted concurrently by Azure VMs using the SMB protocol.

When to Use

  • Lift‑and‑shift applications
  • Home directories
  • Shared configuration files

Quick Start (PowerShell)

Connect-AzAccount
$resourceGroup = "MyResourceGroup"
$storageAccount = "mystorageacct"
$shareName = "myshare"

$ctx = (Get-AzStorageAccount -ResourceGroupName $resourceGroup -Name $storageAccount).Context
New-AzStorageShare -Context $ctx -Name $shareName -QuotaGB 100
Write-Host "File share '$shareName' created."