Azure Blob Storage
Azure Blob Storage is the most widely used storage service in Azure. It is designed to store massive amounts of unstructured data — data that does not fit into a table with rows and columns. Images, videos, PDFs, log files, backups, and audio files are all examples of unstructured data that Blob Storage handles perfectly.
"Blob" stands for Binary Large Object. It simply means any file — regardless of type — that is stored as a chunk of binary data.
Blob Storage Structure
Blob Storage is organized in a three-level hierarchy:
Diagram – Blob Storage Hierarchy
Storage Account: mystorageaccount
│
├── Container: profile-photos ← Like a folder/bucket
│ ├── user1.jpg ← Blob (file)
│ ├── user2.png
│ └── user3.jpg
│
├── Container: documents
│ ├── invoice-001.pdf
│ ├── contract-2024.pdf
│ └── reports/
│ └── q1-report.xlsx
│
└── Container: backups
├── db-backup-2024-01-01.bak
└── db-backup-2024-01-02.bak
| Level | Description |
|---|---|
| Storage Account | The top-level namespace. Provides the base URL for all blobs. |
| Container | A grouping of blobs — similar to a folder or S3 bucket. All blobs must be inside a container. |
| Blob | The actual file/object stored. Can be any type and any size. |
Types of Blobs
Azure Blob Storage offers three types of blobs, each optimized for different scenarios:
Block Blob
The most common blob type. It stores data as individual blocks that are assembled into a single blob. Designed for text and binary files — images, videos, documents, backups. Can store up to 190.7 TB per blob.
Append Blob
Optimized for append operations — data can only be added to the end, never modified in the middle. Perfect for logging scenarios where records are continuously added to a log file.
Example: Application logs where each new log entry is appended to the end of the file.
Page Blob
Optimized for random read and write operations in 512-byte pages. Used internally by Azure for Virtual Machine disk files (VHDs). Can store up to 8 TB per blob.
| Blob Type | Max Size | Use Case |
|---|---|---|
| Block Blob | 190.7 TB | Images, videos, documents, general-purpose files |
| Append Blob | 195 GB | Log files, audit trails, data streams |
| Page Blob | 8 TB | Virtual machine OS and data disks (VHD format) |
Container Access Levels
Each container has an access level setting that controls whether blobs are publicly accessible or require authentication:
| Access Level | Who Can Access | Use Case |
|---|---|---|
| Private (default) | Only authenticated requests with storage credentials | Sensitive files, database backups, private documents |
| Blob (public read for blobs) | Anyone with the direct blob URL can read the file | Public images on a website where direct links are shared |
| Container (public read for container + blobs) | Anyone can list all blobs in the container and read any file | Rarely used — only for fully public content libraries |
Blob Lifecycle Management
Data naturally becomes less valuable over time. A backup from yesterday is critical; a backup from two years ago is rarely accessed. Lifecycle management policies automatically move or delete blobs based on age to reduce storage costs.
Example Lifecycle Policy
Policy: BackupLifecycle Rule 1: Move to Cool tier after 30 days (data older than 30 days) Rule 2: Move to Archive tier after 90 days Rule 3: Delete blobs after 365 days Timeline for a backup file created on Day 0: ┌──────────┬──────────┬──────────────┬────────────┐ │ Day 0 │ Day 30 │ Day 90 │ Day 365 │ │ HOT │ COOL │ ARCHIVE │ DELETED │ │ (Active) │ (Cheaper)│ (Cheapest) │ │ └──────────┴──────────┴──────────────┴────────────┘
Static Website Hosting with Blob Storage
Azure Blob Storage can host a static website — an HTML/CSS/JavaScript website with no server-side code. This is an extremely cost-effective way to host simple websites, landing pages, or documentation sites.
How to Enable Static Website Hosting
- Go to the storage account → Static website (under Data management)
- Toggle Enabled
- Set the Index document name (e.g., index.html)
- Set the Error document path (e.g., 404.html)
- Upload website files to the automatically created $web container
- The website is accessible via the URL shown (e.g., https://mystorageaccount.z13.web.core.windows.net)
Uploading and Accessing Blobs
Using Azure Portal
Open the storage account → Containers → Open the container → Upload button → Browse and select files. Simple drag-and-drop is also supported.
Using Azure CLI
# Upload a file to blob storage
az storage blob upload \
--account-name mystorageaccount \
--container-name documents \
--name invoice.pdf \
--file /local/path/invoice.pdf
# List all blobs in a container
az storage blob list \
--account-name mystorageaccount \
--container-name documents \
--output table
# Download a blob
az storage blob download \
--account-name mystorageaccount \
--container-name documents \
--name invoice.pdf \
--file /local/downloads/invoice.pdf
Using Azure Storage Explorer
Azure Storage Explorer is a free desktop application (Windows, macOS, Linux) that provides a graphical interface for managing storage accounts. It supports drag-and-drop uploads, folder navigation, and SAS token generation — no command line needed.
Blob Storage Pricing Factors
- Storage used: Charged per GB stored per month, varies by access tier (Hot, Cool, Cold, Archive)
- Operations: Charged per 10,000 read or write operations
- Data transfer: Inbound (upload to Azure) is free; outbound (download from Azure) is charged per GB
- Redundancy: GRS costs more than LRS
- Lifecycle transitions: Moving a blob from Hot to Archive is a one-time operation charge, but saves on ongoing storage cost
Key Takeaways
- Azure Blob Storage stores unstructured data — any file type and any size.
- Blobs are organized inside containers, which are inside storage accounts.
- Three blob types exist: Block Blob (general files), Append Blob (log files), Page Blob (VM disks).
- Container access levels control whether blobs are private (authenticated only) or publicly readable.
- Lifecycle management policies automate moving blobs between Hot, Cool, Cold, and Archive tiers to reduce cost.
- Blob Storage can host a static website (HTML/CSS/JS) at very low cost.
