AZ-305 Semi-Structured and Unstructured Storage Design: Cosmos DB, Blob Storage, Azure Files and Data Protection
Designing storage for semi-structured and unstructured data in Azure means choosing the store for JSON documents, key-value entities, files and objects, then configuring it so the data is fast enough, cheap enough, durable and protected. For semi-structured data the choice is usually Azure Cosmos DB (with the right API, capacity mode, partition key and consistency level) or Azure Table storage; for unstructured data it is Azure Blob Storage, Azure Data Lake Storage, Azure Files or Azure NetApp Files. This lesson covers all four AZ-305 skills in the task: storing semi-structured data, storing unstructured data, balancing features, performance and cost, and designing for protection and durability.
On this page10 sections
- What semi-structured and unstructured storage design covers in Azure
- Storing semi-structured data: Cosmos DB, Table storage and the Cosmos DB APIs
- Cosmos DB capacity modes: serverless, autoscale and manual throughput
- Designing the Cosmos DB partition key
- Cosmos DB consistency levels
- Storing unstructured data: Blob Storage, Azure Files, Azure NetApp Files and disks
- Balancing performance and cost: account types and access tiers
- Automating tiering: lifecycle management and smart tier
- Durability: choosing storage redundancy
- Protection: recovery features, immutability and encryption
- Recommend Azure Cosmos DB for NoSQL, a compatible Cosmos DB API or Azure Table storage from an application's data shape, query pattern, regions and existing code
- Choose a Cosmos DB capacity mode, partition key and consistency level that meet throughput, atomicity, freshness and cost requirements
- Recommend Blob Storage, Data Lake Storage, Azure Files, Azure NetApp Files or shared disks for an unstructured workload, including how Linux clients mount blob data
- Balance performance and cost with premium or standard accounts, blob access tiers, lifecycle management rules and smart tier
- Recommend storage redundancy from the zone and region failures the data must survive and whether the secondary must be readable
- Design blob protection with soft delete, versioning, point-in-time restore, immutability policies and encryption keys, and know the hierarchical namespace limits
What semi-structured and unstructured storage design covers in Azure
Designing storage for semi-structured and unstructured data means choosing where JSON documents, key-value entities, files and binary objects live in Azure, and then configuring that store so it meets the workload's performance, cost, durability and protection requirements. The official task has four skills: recommend a solution for storing semi-structured data, recommend a solution for storing unstructured data, recommend a data storage solution that balances features, performance and costs, and recommend a data solution for protection and durability.
Semi-structured data has a shape but no fixed schema: product documents whose attributes vary by category, device readings, user profiles. Unstructured data is anything stored as an opaque object or file: images, video, scanned forms, logs, backups and data-lake files. In Azure, a small set of services covers almost every case.
| Need | Service to consider first |
|---|---|
| JSON documents queried on any property, low latency, one or many regions | Azure Cosmos DB for NoSQL |
| Cheap key-value entities read only by their two keys | Azure Table storage |
| Existing Table, Cassandra or MongoDB apps that need global distribution without a rewrite | The matching Azure Cosmos DB API |
| Objects at any scale: media, documents, backups, logs | Azure Blob Storage |
| Analytics files with real directories and POSIX-style ACLs | Azure Data Lake Storage (Blob Storage with a hierarchical namespace) |
| Managed SMB or NFS file shares for VMs and on-premises clients | Azure Files |
| Shared NFS/SMB with sub-millisecond latency for demanding enterprise or HPC workloads | Azure NetApp Files |
Choosing the service is only half the design. The rest is configuration: Cosmos DB capacity mode, partition key and consistency level; storage account type, access tier, lifecycle rules and redundancy; and the recovery, immutability and encryption features that protect the data. As everywhere in AZ-305, the right recommendation meets every stated requirement at the least cost or effort. Relational stores belong to the sibling topic on relational data, and moving or analysing data belongs to the data integration topic. Backups with Azure Backup and regional failover are covered in the business continuity domain.
Storing semi-structured data: Cosmos DB, Table storage and the Cosmos DB APIs
Use Azure Cosmos DB for NoSQL when documents vary in shape and are queried on many properties; use Azure Table storage when entities are only ever read by their keys and cost matters most. Cosmos DB for NoSQL stores schema-agnostic JSON items and, by default, indexes every property, so a new attribute becomes queryable without schema or index work. Adding regions to the account replicates the data so each region serves local reads with single-digit millisecond latency.
Azure Table storage lives in a storage account and indexes only PartitionKey and RowKey. A query that filters on any other property scans entities, so it is slow at scale. It has no secondary indexes and no multi-region writes; its only geo option is the storage account's redundancy. In return it is billed only for capacity and transactions, which makes it the cheapest choice for key-and-range access such as device ID plus a time-based row key.
| Option | Indexing | Distribution | When it fits |
|---|---|---|---|
| Cosmos DB for NoSQL | Every property automatically | Any number of regions, optional multi-region writes | Varying JSON, rich queries, latency guarantees, global apps |
| Cosmos DB for Table | Every property automatically | Any number of regions | Apps already using the Azure Tables SDK that need global reads or fast non-key filters |
| Azure Table storage | PartitionKey and RowKey only | Storage redundancy (one read-only secondary at most) | Key lookups and key ranges in one region at the lowest cost |
| JSON files in Blob Storage | None for content; blob index tags only for metadata | Storage redundancy | Documents stored and retrieved whole, not queried |
| JSON columns in a relational database | Indexes you build | The database's replication options | Data that is mostly relational with a few flexible attributes |
Choosing a Cosmos DB API
Cosmos DB exposes several APIs over the same engine. Choose the API from the application that already exists, because the API decides which SDK or driver connects:
- API for NoSQL is the native API and the default for new applications. Moving an app to it from another data model means changing its data access code.
- API for Table accepts apps written for Azure Table storage with the Azure Tables SDK. Usually only the connection string changes, and the app gains automatic indexing of all properties, global distribution and latency guarantees. It costs more than Table storage, so it is worth it only when those features are needed.
- API for Apache Cassandra implements the Cassandra wire protocol, so existing CQL drivers connect unchanged. There are no nodes to size, patch or add: capacity is request units per second (RU/s) set at keyspace or table level, and regions are added to the account. Azure Managed Instance for Apache Cassandra is the alternative when you need full Apache Cassandra compatibility and control over configuration; it automates deployment and patching, but you still choose node SKUs and node counts.
- API for MongoDB (request-unit based) gives MongoDB wire-protocol compatibility on Cosmos DB. Microsoft now directs vCore-based MongoDB workloads to Azure DocumentDB, the renamed Cosmos DB for MongoDB vCore, so check current guidance before recommending either for a MongoDB migration.
Cosmos DB capacity modes: serverless, autoscale and manual throughput
Choose serverless for intermittent, low-traffic workloads in one region, autoscale for variable or spiky traffic, and manual provisioned throughput for steady, predictable traffic. Every Cosmos DB operation costs request units (RUs), and the capacity mode decides how you pay for them.
| Mode | How you pay | Limits and fit |
|---|---|---|
| Serverless | Only the RUs your operations consume each hour; nothing is provisioned | Single region only. Best for dev/test and apps that are idle most of the time with short bursts |
| Autoscale provisioned | The highest RU/s the database or container reached in each hour | Scales automatically between 10% and 100% of a maximum you set, so a known peak is served without throttling and quiet hours cost less. Works with multiple regions |
| Manual provisioned | A fixed RU/s every hour, whether used or not | Cheapest for sustained, predictable load. Set too low, requests are throttled (HTTP 429); set to the peak, idle hours are wasted |
The deciding facts are usually two. First, serverless can't span regions: a workload that must read from a second region needs provisioned throughput, however bursty it is. Second, when traffic swings between a busy peak and long idle periods, autoscale with its maximum set to the known peak avoids throttling and costs less than a fixed peak setting; a fixed setting at the average throttles at peak. Reserved capacity discounts provisioned throughput in return for a one- or three-year commitment, but it still bills capacity every hour, so it doesn't help a workload that is mostly idle.
Designing the Cosmos DB partition key
A good partition key has many distinct values, spreads writes evenly over time, and matches the filter most queries use. Cosmos DB groups items with the same partition key value into a logical partition and spreads logical partitions across physical partitions. Provisioned throughput is divided between physical partitions, so if most requests target one key value, that partition is throttled with HTTP 429 even though the container as a whole has spare RU/s. That is a hot partition.
- Time-based keys are classic hot spots. A key such as the order date sends all of today's writes to one value; shrinking it to the hour only moves the hot spot into a smaller window.
- Low-cardinality keys don't scale. Status, region or category values are too few to spread load.
- Match the dominant query. If most reads fetch everything for one customer, a customer key makes those reads efficient single-partition queries. Queries without the partition key fan out across partitions and cost more RUs.
- Keep items that change together in one logical partition. Transactional batch operations and stored procedures are scoped to a single logical partition, so items that must be updated atomically (an order header and its lines, for example) must share a partition key value. Pick a key that does that and still has high cardinality: the key should group the items written together while still having many distinct values, and a key whose few values carry most of the traffic or data creates hot partitions.
Each logical partition has a fixed storage limit (20 GB). In multitenant designs keyed on tenant ID, a few large tenants can hit it while thousands of small ones are fine. Hierarchical partition keys (up to three levels, such as tenant ID then user ID) let one tenant's data span several physical partitions, while queries that supply the tenant ID are still routed only to the partitions holding that tenant. A synthetic key with a random suffix also spreads data, but queries for one tenant then have to fan out. Raising throughput never raises the storage limit. A container's partition key can't be changed after creation, so fixing a bad key means a new container and a data migration.
Cosmos DB consistency levels
Cosmos DB offers five consistency levels, from strongest to weakest: strong, bounded staleness, session, consistent prefix and eventual; stronger levels give fresher reads at the cost of latency, availability and RUs. The level is set on the account and can be relaxed per request.
| Level | Guarantee | Cost and limits |
|---|---|---|
| Strong | Linearizable: a read never returns a value older than the latest committed write, in any region | Writes are acknowledged only after the other regions commit, so write latency rises. Not available for accounts with multi-region writes. Reads use two replicas, so they cost about twice the RUs |
| Bounded staleness | Reads lag writes by at most K versions or T time, and updates are seen in order | Designed for one write region with several read regions; writes commit locally. In multi-region accounts the bound must be at least 100,000 writes or 300 seconds. Reads use two replicas |
| Session (default) | Within a client session: read your own writes, monotonic reads and writes, consistent prefix | Single-replica reads, so latency and RU cost are close to eventual. The SDK carries a session token per client session |
| Consistent prefix | Reads never see writes out of order, but there is no bound on lag | Low latency and cost |
| Eventual | Replicas converge eventually; reads can be out of order | Lowest latency and cost; no read-your-writes guarantee |
Read the requirement for its scope. "A user must see their own change immediately, others may lag" is session, and it keeps reads cheap. "No read may ever be stale, anywhere" is strong, which also forces a single write region. A guaranteed maximum lag, measured in time or in versions, with reads in order and a single write region, is bounded staleness. Session guarantees belong to one client session, so they don't give other clients any bound on how far behind they read.
Storing unstructured data: Blob Storage, Azure Files, Azure NetApp Files and disks
Use Blob Storage for objects accessed by REST, Azure Files for managed shares that applications mount over SMB or NFS, Azure NetApp Files when a shared file system needs sub-millisecond latency, and shared managed disks only for clustered applications that manage their own block-level access.
| Option | Access | Choose it when |
|---|---|---|
| Azure Blob Storage | REST and SDKs; Linux mounts with BlobFuse2 or NFS 3.0 | Objects at any scale (media, documents, backups, logs, lake files) with tiering and lifecycle rules |
| Azure Files | SMB (Windows, Linux, macOS) or NFS 4.1 (Linux), plus REST | Several VMs or on-premises clients share files through a mapped drive or mount, with no file server to patch |
| Azure NetApp Files | NFSv3, NFSv4.1 and SMB volumes in capacity pools | Sub-millisecond latency and very high throughput (HPC, SAP, simulation), with service levels such as Standard, Premium and Ultra (plus Flexible, which sets throughput separately from capacity) changed by moving a volume to another capacity pool, without remounting clients |
| Shared managed disks | A block device attached to several VMs | Clustered apps that use a cluster manager (Windows Server Failover Clustering, Pacemaker) to coordinate writes; without one, the file system is corrupted |
Azure Files tiers and protocols
Azure Files has SSD (premium) shares, in a FileStorage account, and HDD (standard) shares (pay-as-you-go in a general-purpose v2 account, or provisioned v2 in a FileStorage account). NFS shares are available only on SSD file shares; HDD shares are SMB-only. NFS shares support LRS and ZRS and must be reached through a private endpoint or service endpoint. SSD shares give low single-digit millisecond latency; when a workload needs sub-millisecond latency, look at Azure NetApp Files instead.
Mounting blob containers on Linux
Two ways let Linux machines mount blob containers as directories while the data stays in Blob Storage and other services keep using the REST API. BlobFuse2 is a FUSE driver installed on each node; it translates file operations into blob calls and has weaker POSIX semantics than a real file system. NFS 3.0 for Blob Storage requires an account created with a hierarchical namespace and NFS 3.0 enabled (it can't be turned on later), and accepts traffic only from allowed virtual networks. Azure File Sync and NFS 4.1 belong to Azure Files, and SFTP for Blob Storage is a transfer endpoint, not a mount.
Data Lake Storage and the hierarchical namespace
Enabling the hierarchical namespace (HNS) turns a storage account into Azure Data Lake Storage. Directories become real objects, so renaming or deleting a directory with millions of files is one atomic metadata operation, which suits Spark and other job-commit patterns; with a flat namespace, folders are just name prefixes and a rename touches every blob. HNS also adds POSIX-style ACLs on directories and files alongside Azure RBAC. It is a trade-off, because some Blob Storage features aren't supported on HNS accounts:
| Not supported with a hierarchical namespace | Still supported |
|---|---|
| Point-in-time restore for block blobs | Lifecycle management rules |
| Object replication between accounts | Container-level immutability (time-based retention, legal holds) |
| Version-level immutability | Blob soft delete and container soft delete |
Microsoft's feature support table for Blob Storage is the reference; check it for versioning and change feed too. When one workload needs a lake and another needs those features, the usual design is two accounts: an HNS account for analytics and a flat-namespace account for the archive.
Balancing performance and cost: account types and access tiers
Match the account type to the performance need first, then use access tiers to match each blob's storage cost to how often it is read.
Standard and premium accounts
- Standard general-purpose v2 is the default for blobs, files, queues and tables. It supports every access tier and every redundancy option.
- Premium block blob accounts store data on SSDs for consistently low latency and high transaction rates, which suits IoT telemetry, many small objects and interactive workloads. They cost more per GB but less per transaction. They don't support access tiers and offer LRS and ZRS only, so geo-redundancy needs a standard account.
- Premium file shares (FileStorage accounts) are the SSD option for Azure Files, required for NFS shares.
Blob access tiers
| Tier | Access | Minimum retention | Fit |
|---|---|---|---|
| Hot | Online, milliseconds | None | Frequently read or written data; highest storage cost, lowest access cost |
| Cool | Online, milliseconds | 30 days | Infrequently read data kept at least a month |
| Cold | Online, milliseconds | 90 days | Rarely read data that must still open immediately |
| Archive | Offline; rehydrate first, which can take up to 15 hours at standard priority | 180 days | Rarely read data where a wait of hours is acceptable; lowest storage cost |
Each step down lowers the storage price and raises the read and transaction price. Moving or deleting a blob before its minimum retention incurs an early deletion charge for the remaining days. Two rules decide many designs. Data that needs immediate (online) access rules out archive, because an archived blob can't be read until it is rehydrated to an online tier; cold is then the cheapest choice for rare reads. And archive is supported only in LRS, GRS and RA-GRS accounts, not in ZRS, GZRS or RA-GZRS. So a design that combines zone redundancy with archiving needs the archived data in a separate account whose redundancy supports archive.
Automating tiering: lifecycle management and smart tier
Use lifecycle management rules when you know the age or access pattern that should move or delete data, and smart tier when access is unpredictable and you want Azure to move objects between online tiers with no rules to maintain.
Lifecycle management
A lifecycle policy is a set of rules, each with a filter (blob type, name prefix, blob index tags) and actions with conditions. Azure evaluates the policy about once a day.
- Conditions are days since creation (
daysAfterCreationGreaterThan), since last modification (daysAfterModificationGreaterThan) or since last access (daysAfterLastAccessTimeGreaterThan). The last-access condition works only after last access time tracking is enabled on the account. - Actions tier blobs to cool, cold or archive, or delete them. With a last-access rule,
enableAutoTierToHotFromCoolmoves a blob back to hot when it is read again. - Separate action sets exist for base blobs, snapshots and previous versions. A version action can delete previous versions a set number of days after they were created, which controls the cost of blob versioning without touching current blobs.
Modification-based rules tier on writes, not reads, so they are the wrong tool when "unused" means "not read". Azure Storage Actions storage tasks can also apply tier changes across accounts, but they are still rules you define and maintain.
Smart tier
Smart tier is set as the account's default access tier. New data starts in hot; objects that aren't accessed move to cool and, after further inactivity, to cold, and an object moves back to hot as soon as it is accessed. There are no early deletion, tier transition or retrieval fees, only a small monitoring fee per object larger than 128 KiB. Smart tier doesn't use archive and requires a standard general-purpose v2 account configured for ZRS, GZRS or RA-GZRS; it isn't available for LRS, GRS or RA-GRS accounts. For an LRS account that needs read-based tiering, use lifecycle management with access tracking.
| Lifecycle management | Smart tier | |
|---|---|---|
| Who decides | Your rules and thresholds | Azure, from each object's access |
| Tiers | Hot, cool, cold, archive, delete | Hot, cool, cold (no archive) |
| Redundancy | Any | ZRS, GZRS, RA-GZRS only |
| Fees | Normal tier, transition and early deletion charges | Monitoring fee; no early deletion, transition or retrieval fees |
Durability: choosing storage redundancy
Pick redundancy from the failure the data must survive: LRS survives hardware failure in one datacenter, ZRS survives a zone failure, GRS and GZRS add an asynchronous copy in a secondary region, and the RA- variants let applications read that copy without a failover.
| Option | Primary region | Secondary region | Read secondary without failover |
|---|---|---|---|
| LRS | Three copies in one datacenter | None | No |
| ZRS | Synchronous copies across three availability zones | None | No |
| GRS | LRS | Asynchronous copy (LRS) in the paired region | No |
| RA-GRS | LRS | Asynchronous copy (LRS) | Yes |
| GZRS | ZRS | Asynchronous copy (LRS) | No |
| RA-GZRS | ZRS | Asynchronous copy (LRS) | Yes |
Map each requirement to one property. "No data loss if a zone fails" needs synchronous zone replication: ZRS or GZRS. "Keep reading if the primary region is down, without waiting for a failover" needs read access to the secondary: RA-GRS or RA-GZRS, which publish a read-only endpoint with a -secondary suffix. With GRS or GZRS the secondary copy exists but isn't readable until a failover. RA-GZRS is the only option that combines zone redundancy in the primary region with a readable secondary; without the zone requirement, RA-GRS gives the readable secondary at lower cost. Geo-replication is asynchronous, so recent writes can be lost in a regional disaster. Remember the account-type limits too: premium block blob and NFS file shares support only LRS and ZRS. Planning and running failovers is covered in the high availability topic of the business continuity domain.
Protection: recovery features, immutability and encryption
Protect blob data with layered, built-in features: soft delete and versioning to recover from mistakes, point-in-time restore to roll containers back, immutable storage to meet retention rules, and encryption keys you control where regulations demand it. Azure Resource Manager locks protect the storage account resource from being deleted or changed, but they don't stop anyone deleting containers or blobs through the data plane.
Recovering from deletes and overwrites
| Feature | Protects against | Notes |
|---|---|---|
| Container soft delete | A deleted container, with its blobs | Among the built-in account features, the only one that brings back a deleted container (Azure Backup vaulted backup can also restore containers); retention set in days |
| Blob soft delete | Deleted blobs (and overwritten blobs' earlier states) | Doesn't restore a deleted container |
| Blob versioning | Overwrites and deletes, by keeping every previous version | Previous versions are billed until deleted; expire them with a lifecycle version action |
| Point-in-time restore | Corruption or bad writes across containers | Restores block blobs in containers or name ranges to a chosen moment. Requires blob soft delete, change feed and versioning; its retention must be at least one day shorter than soft delete's. Standard GPv2 only, not with HNS, and it doesn't restore deleted containers |
Backing up blobs and file shares with Azure Backup belongs to the backup and disaster recovery topic.
Immutable (WORM) storage
Immutable storage keeps data in a write once, read many state. A time-based retention policy starts unlocked, so it can be tested, shortened or deleted; once locked it can't be deleted and its interval can only be extended. The locked state is what has been assessed for regulations such as SEC Rule 17a-4(f), FINRA and CFTC rules. A legal hold keeps data immutable until the hold is cleared, for litigation or investigations whose end date isn't known. Scope matters:
- Container-level WORM applies one policy to every blob in the container, so it works when data can be grouped by retention period. It is supported with a hierarchical namespace.
- Version-level WORM lets policies be set at account, container or individual blob version level, so each blob can have its own retention date. It requires blob versioning (an amended blob becomes a new version while the protected earlier version is kept) and isn't supported on hierarchical namespace accounts.
Encryption at rest
Azure Storage always encrypts data at the service level with 256-bit AES. The design choice is who controls the key and whether a second layer is added:
| Option | What it gives | Design points |
|---|---|---|
| Microsoft-managed keys | The default; no key management | No customer control over rotation or revocation |
| Customer-managed keys | Your key in Azure Key Vault or Managed HSM, which you rotate and revoke | The vault must have soft delete and purge protection. Configured when the account is created, it needs a user-assigned managed identity, because the system-assigned identity doesn't exist yet; on an existing account either identity type works |
| Customer-provided keys | A key the client sends with each Blob Storage request | Every reader and writer must hold and send the key; Azure doesn't store it |
| Encryption scopes | A key per container or blob, Microsoft-managed or customer-managed | Set a scope as a container's default when the container is created and block overrides, so every blob in it uses that key; revoking that key affects only that container's data. Suits per-tenant keys in a shared account |
| Infrastructure encryption | A second encryption layer with a different algorithm and key | At account level it can be enabled only when the account is created; an encryption scope can enable it for itself, but only for blobs written with that scope |
An account-wide requirement for double encryption on an existing account therefore means creating a new account with infrastructure encryption on and moving the data.
Tip. Expect multi-requirement design scenarios that ask what you should recommend: which store fits a data shape and query pattern, which Cosmos DB API keeps existing code, which capacity mode, partition key or consistency level meets traffic, atomicity and freshness requirements, and which file or object service fits a protocol and latency need. Cost questions combine access tiers, minimum retention, archive's redundancy limits, lifecycle rules and smart tier. Durability and protection questions map zone and region failures to redundancy options and ask for the right recovery, immutability or encryption feature, often with prerequisites to select and with the hierarchical namespace, premium account or existing-account limits ruling options out.
- Varying JSON queried on any property, in one or many regions, is Cosmos DB for NoSQL; key-only lookups in one region at the lowest cost are Azure Table storage.
- Pick the Cosmos DB API from the existing code: Tables SDK apps move to the API for Table, CQL apps to the API for Apache Cassandra (no nodes); Managed Instance for Apache Cassandra still means choosing nodes.
- Serverless Cosmos DB is single-region and pay-per-RU; autoscale scales between 10% and 100% of a set maximum and bills each hour's peak; manual throughput suits steady load.
- Throttling with spare RU/s is a hot partition: choose a high-cardinality key that spreads writes and matches queries, keep atomically updated items in one logical partition, and use hierarchical keys when tenants outgrow one logical partition.
- Session consistency gives read-your-own-writes cheaply; strong never returns stale data but rules out multi-region writes; bounded staleness caps lag by time or versions with one write region.
- Windows shares are Azure Files over SMB; NFS on Azure Files needs SSD (premium) shares; sub-millisecond shared NFS with adjustable service levels is Azure NetApp Files; Linux can mount blob containers with BlobFuse2 or NFS 3.0 on an HNS account.
- The hierarchical namespace gives atomic directory renames and POSIX ACLs but rules out point-in-time restore, object replication and version-level immutability.
- Cool, cold and archive have 30, 90 and 180-day minimums; archive is offline and needs an LRS, GRS or RA-GRS account; premium block blob accounts have no tiers and support only LRS and ZRS.
- Lifecycle rules tier or delete by creation, modification or last access (with tracking on) and can expire previous versions; smart tier automates hot, cool and cold with no early deletion fees but only on ZRS, GZRS or RA-GZRS accounts.
- Among built-in account features, only container soft delete brings back a deleted container; point-in-time restore needs soft delete, change feed and versioning; locked time-based retention meets SEC 17a-4(f); customer-managed keys need a purge-protected vault, and account-level infrastructure encryption is set only at creation.
Frequently asked questions
When should I use Azure Table storage instead of Azure Cosmos DB for Table?
Use Azure Table storage when the app reads entities only by PartitionKey and RowKey (or key ranges), runs in one region and must cost as little as possible, because it bills only for capacity and transactions. Use Azure Cosmos DB for Table when the same Azure Tables SDK app needs fast queries on other properties, which Cosmos DB indexes automatically, or low-latency reads and writes in several regions. Moving to Cosmos DB for Table usually needs only a connection string change.
Can Azure Cosmos DB serverless serve multiple regions?
No. A serverless Azure Cosmos DB account runs in a single region. It bills only for the request units consumed, which suits intermittent, mostly idle workloads in one region. A workload that must read or write in more than one region needs provisioned throughput, and autoscale is usually the cheapest provisioned option when traffic has a known peak and long quiet periods.
Why does Cosmos DB throttle requests when the container has unused RU/s?
Provisioned throughput is divided across physical partitions, so when most requests use the same partition key value, that one partition runs out of its share and returns HTTP 429 responses while the others sit idle. This is a hot partition. The fix is a partition key with many distinct values that spreads writes evenly and matches the main query filter, which means creating a new container and migrating the data, because a container's partition key can't be changed.
Which Cosmos DB consistency level gives read-your-own-writes?
Session consistency, the default level in Azure Cosmos DB, guarantees that within a client session a user reads their own writes, with monotonic reads and consistent ordering. Other users may see the change slightly later. It reads from a single replica, so its latency and request unit cost are close to eventual consistency, unlike strong and bounded staleness, which read from two replicas.
Can I use the archive tier in a zone-redundant storage account?
No. The Azure Blob Storage archive tier is supported only in accounts configured for LRS, GRS or RA-GRS, not ZRS, GZRS or RA-GZRS. If active data needs zone redundancy but older data should be archived, keep the aged data in a second account whose redundancy supports archive, or use the cold tier, which is online and works with any redundancy but costs more to store than archive.
What is the difference between Azure Blob Storage lifecycle management and smart tier?
Lifecycle management applies rules you write: it tiers blobs to cool, cold or archive, or deletes them, based on days since creation, modification or last access, and normal tier and early deletion charges apply. Smart tier is an account default access tier that moves each object between hot, cool and cold automatically based on its access, with no rules, no early deletion or retrieval fees and a small monitoring fee, but it never uses archive and requires a ZRS, GZRS or RA-GZRS account.
What does point-in-time restore for Azure blobs require?
Point-in-time restore for block blobs requires blob soft delete, change feed and blob versioning to be enabled, with the restore retention at least one day shorter than the soft delete retention. It works only in standard general-purpose v2 accounts without a hierarchical namespace, and it can't bring back a deleted container; container soft delete does that.
Which immutability setting meets SEC Rule 17a-4(f) for Azure Blob Storage?
A locked time-based retention policy. While a policy is unlocked it can be shortened or deleted, which is useful for testing; once locked, nobody, including subscription owners, can delete it or shorten its interval, only extend it, and blobs can't be deleted or overwritten until retention ends. The locked state is the one assessed for SEC 17a-4(f), FINRA and CFTC record-keeping rules.
Source
This lesson covers the "Design data storage solutions" domain of the official AZ-305 exam guide. Vendors revise their guides — check the source for the current version.
- Microsoft AZ-305 study guide — Microsoft Learn
Sign up free to mark lessons complete, bookmark topics and track your exam readiness.