3.1.1.1. Create and Configure Storage Accounts
š” First Principle: Selecting the correct storage account type, performance tier, and redundancy option is fundamental to aligning storage capabilities with workload requirements for performance, durability, and cost.
Scenario: You need to create a storage account for a new application that will store both frequently accessed web assets (images, CSS) and less frequently accessed backups. The application also requires protection against regional outages.
What It Is: An Azure storage account is a unique account within Azure that provides access to all Azure storage services (blobs, files, queues, tables, disks).
Types of Storage Accounts:
- General-purpose v2 (GPv2): Supports all storage services (blobs, files, queues, tables, disks); recommended for most scenarios as it offers the latest features and optimal pricing.
- BlobStorage: Optimized for block and append blobs, designed for high-throughput or very large-scale unstructured data.
- FileStorage: Premium performance for file shares, using SSDs for low latency and high IOPS.
Key Configuration Options:
- Performance Tier:
- Standard: Cost-effective, HDD-backed (for general-purpose, non-latency-sensitive workloads).
- Premium: High performance, SSD-backed (for workloads requiring low latency and high IOPS, like databases).
- Redundancy: Defines how data is replicated to ensure durability and availability.
- LRS (Locally Redundant Storage): Replicates data within one datacenter. Cost-effective, but not resilient to datacenter-level outages.
- GRS (Geo-Redundant Storage): Replicates data to a secondary Region hundreds of miles away, providing disaster protection.
- RA-GRS (Read-Access GRS): Adds read access to the secondary Region for GRS, enabling high availability for reads during a regional outage.
- ZRS (Zone-Redundant Storage): Spreads data across 3 Availability Zones (AZs) in the primary Region, resilient to AZ failures.
- GZRS (Geo-Zone-Redundant Storage): Combines ZRS in the primary Region with LRS to a secondary Region. Highest durability.
- RA-GZRS: Adds read access to GZRS.
- Access Tier (for blobs):
- Hot: Frequent access.
- Cool: Infrequent access, lower storage cost, higher retrieval fees.
- Archive: Rare access, lowest storage cost, highest retrieval latency.
Practical Implementation: Creating a Storage Account with Azure CLI
# Create a geo-redundant, general-purpose v2 storage account
az storage account create \
--name myuniquestorageaccount123 \
--resource-group MyResourceGroup \
--location eastus \
--sku Standard_GRS \
--kind StorageV2
Visual: Azure Storage Account Redundancy Options
Loading diagram...
ā ļø Common Pitfall: Choosing LRS (Locally-Redundant Storage) for critical production data to save costs, which leaves the data vulnerable to a datacenter-level outage.
Key Trade-Offs:
- Durability/Availability vs. Cost: Higher redundancy options like GRS and GZRS provide greater protection against failures but are more expensive than LRS.
Reflection Question: How does choosing the right storage account type, performance tier, and redundancy option (e.g., GPv2 with GRS) fundamentally ensure your data is stored with the required performance, durability, and security, while optimizing costs?