keepcalculator

06 Numbers and Powers

Azure Blob Storage: What It Is & How to Use It

Card No. 06·21125 · Updated · Standard formula, shown below

Azure Blob Storage is Microsoft’s cloud object storage service for unstructured data—things like images, videos, backups, logs, and files that don’t fit neatly into a database. You store each piece of data as a “blob” inside a container within a storage account, and you access it via HTTP/HTTPS using a REST API, SDKs, or the Azure portal. This article covers how blob storage works, how to choose the right access tier, common pitfalls, security features, costs, and alternatives.

Background: What Is a Blob and Why Use It?

The word “blob” stands for Binary Large Object, though in practice it’s any file—text, binary, or otherwise. Blob storage is designed to hold massive amounts of unstructured data, scaling to petabytes or more. Key characteristics:

  • Object storage: Each blob is stored as an object with metadata and a unique URL, not as part of a file system hierarchy.
  • Durability: Data is replicated across multiple servers and often across regions to prevent loss.
  • Accessibility: You can access blobs from anywhere via HTTP, making it ideal for serving web content, streaming media, or sharing data.
  • Integration: Works with Azure CDN, Azure Functions, Data Lake Storage, and many other services.

Typical use cases include storing website assets, backing up databases, archiving logs, storing IoT sensor data, and serving user-uploaded content.

How Azure Blob Storage Works

To use blob storage, you create a storage account (a top-level namespace), then create one or more containers (like folders, but they can’t be nested), and then upload blobs into those containers. Each blob has a unique URL like:

https://[account].blob.core.windows.net/[container]/[blob]

Blobs come in three types:

  • Block blobs: Optimized for uploading large amounts of data efficiently. Each block is uploaded independently and can be committed in a single operation. Best for images, videos, and documents.
  • Append blobs: Optimized for append operations, such as logging. You can only add blocks to the end.
  • Page blobs: Optimized for random read/write access, used as the underlying storage for Azure Virtual Machine disks.

Access is controlled via shared keys, shared access signatures (SAS), or Azure Active Directory (Azure AD) for role-based access control.

Access Tiers: Hot, Cool, Cold, and Archive

Azure offers access tiers to balance cost and access speed. Each tier has different storage and access costs:

  • Hot: For data accessed frequently. Lowest access cost, highest storage cost.
  • Cool: For data accessed occasionally (at least once a month). Lower storage cost, higher access cost.
  • Cold: For data accessed rarely (at least once a year). Even lower storage cost, higher access cost.
  • Archive: For long-term backup and compliance. Cheapest storage, but data is offline; you must rehydrate (wait) before reading, which can take up to 15 hours.

You can set a default tier at the account level and change the tier of individual blobs at any time. For example, you might upload new files to Hot, then move them to Cool after 30 days and Archive after a year.

How to Choose the Right Storage Account and Tier

When creating a storage account, you choose a performance tier (Standard or Premium) and a redundancy level. For most general-purpose use, Standard performance with Locally Redundant Storage (LRS) is sufficient. If you need higher availability, choose Zone-Redundant (ZRS), Geo-Redundant (GRS), or Read-Access Geo-Redundant (RA-GRS).

For the access tier, consider:

  • How often you read and write the data.
  • How quickly you need to access it.
  • Cost of storage vs. cost of access.

A common mistake is leaving everything in Hot tier, which inflates costs. Use lifecycle management policies to automatically move blobs to cooler tiers based on age.

Common Problems and Misconceptions

Here are frequent issues and misunderstandings:

  • Misconception: Containers are folders. They are not; they are a logical grouping. You can’t nest containers, but you can simulate folders by using slashes in blob names (e.g., folder/subfolder/file.jpg).
  • Problem: Slow upload/download. For large files, use the Azure SDK’s upload methods that automatically split into blocks and parallelize. Also consider using AzCopy or Azure Data Factory for bulk transfers.
  • Problem: Access denied. Often due to missing permissions. Check the shared key, SAS token, or Azure AD role assignments.
  • Misconception: Archive tier is like Cool but cheaper. Archive is offline; you must rehydrate before reading, which introduces delay and extra cost.
  • Problem: High egress costs. Data transfer out of Azure is billed. If you serve large files to users, consider using Azure CDN to reduce egress costs.

Security and Safety Features

Azure Blob Storage includes several security features you should enable:

  • Encryption at rest: All data is encrypted using SSE (Storage Service Encryption) with Microsoft-managed keys by default. You can use customer-managed keys for more control.
  • Encryption in transit: Use HTTPS for all connections.
  • Private endpoints: Expose your storage account only to a virtual network, not the public internet.
  • Shared Access Signatures (SAS): Grant time-limited, permission-limited access to specific blobs or containers without exposing the account key.
  • Azure AD integration: Use role-based access control (RBAC) to assign granular permissions to users and applications.
  • Soft delete: Recover accidentally deleted blobs within a retention period.
  • Versioning: Keep previous versions of blobs to protect against overwrites.

Always rotate account keys regularly and avoid embedding them in client-side code. Use managed identities for Azure resources to authenticate securely.

Cost Considerations and Monitoring

You pay for:

  • Storage capacity: Based on the amount of data stored and the tier.
  • Operations: Costs for each read/write/list operation, with higher costs for cooler tiers.
  • Data transfer: Egress (outbound) traffic is billed; ingress (inbound) is free.

To manage costs, use Azure Cost Management to monitor spending, set budgets, and use lifecycle policies to tier down old data. Also consider using Blob Storage’s immutable storage for compliance—it prevents deletion and modification for a specified interval.

Alternatives to Azure Blob Storage

Depending on your needs, other Azure services might be better:

  • Azure Files: Managed file shares with SMB protocol, ideal for lifting and shifting on-premises file servers.
  • Azure NetApp Files: High-performance NFS/SMB for enterprise workloads.
  • Azure Disk Storage: Block storage for VMs; not for unstructured data.
  • Azure Data Lake Storage Gen2: Built on blob storage but with a hierarchical namespace and POSIX permissions, better for big data analytics.
  • Amazon S3 or Google Cloud Storage: If you’re multi-cloud or want comparable object storage elsewhere.

For most general unstructured data, Blob Storage is the right choice; use alternatives when you need file shares, high-performance block storage, or hierarchical namespaces.

Frequently Asked Questions

What is the maximum size of a blob?

Block blobs can be up to about 190.7 TiB (4.75 TB per block, 50,000 blocks). However, the maximum size depends on the storage account type and API version. For practical purposes, you can store very large files, but you should use the SDK’s block upload for anything over a few hundred MB.

Can I use Azure Blob Storage to host a static website?

Yes. Enable the “Static website” feature in the storage account, which provides a default HTML page and a 404 page. You can upload your site’s files to the $web container. This is a cost-effective way to host a simple site, but it doesn’t support server-side code.

How do I move data from on-premises to Blob Storage?

You can use Azure Storage Explorer (GUI), AzCopy (command-line), Azure Data Factory, or the Azure Portal. For very large datasets, consider Azure Data Box (physical device) or Azure Import/Export service.

What’s the difference between a SAS token and an account key?

An account key grants full access to everything in the storage account. A SAS token grants limited access (e.g., read-only to one container for 1 hour) without exposing the key. SAS tokens are safer for sharing with clients or third parties.

Is Azure Blob Storage HIPAA compliant?

Azure Blob Storage is HIPAA-eligible when used in accordance with Microsoft’s compliance framework. You must configure security features like encryption and access controls, and sign a Business Associate Agreement (BAA) with Microsoft. Always verify current compliance certifications on the Azure Trust Center.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →