Skip to content

AZ-305 · Domain 2: Design data storage solutions · 22% of the exam

Task 2.2: Design data storage solutions for semi-structured and unstructured data

Azure Cosmos DB APIs, partitioning, throughput and consistency; Blob Storage, Data Lake Storage, Azure Files and Azure NetApp Files; access tiers, lifecycle rules, immutability, versioning and encryption.

Study it

Sample questions

Try each one before opening the answer. Every option is explained, with the Microsoft documentation page that proves it.

Question 1 · choose 1

An Azure Cosmos DB for NoSQL container receives telemetry from 1.2 million devices, about 40,000 writes per second around the clock. Most reads fetch the latest readings of one device. Which partition key should you recommend?

  1. A/region
  2. B/readingDate
  3. C/deviceModel
  4. D/deviceId
Show the answer and why
  • A/region

    Incorrect

    A handful of regions gives few distinct values, so a few partitions would take most of the writes.

  • B/readingDate

    Incorrect

    Every write of a day lands in the same partition, creating a hot partition for the current date.

  • C/deviceModel

    Incorrect

    Only a few dozen models exist, so the key has low cardinality and popular models become hot partitions.

  • D/deviceId

    Correct

    Device ID has very high cardinality, spreads writes evenly, and lets the common read target a single logical partition.

A good partition key has a wide range of values, spreads request units and storage evenly, and matches the most frequent query filter. Device ID meets all three; dates and low-cardinality attributes concentrate writes.

Question 2 · choose 1

A media company keeps 400 TB of finished project files. Each file is read perhaps once a quarter, kept at least a year, and when someone needs it they must open it immediately, not hours later. Which blob access tier gives the lowest storage cost?

  1. ACold
  2. BArchive
  3. CCool
  4. DHot
Show the answer and why
  • ACold

    Correct

    Cold is an online tier for data accessed rarely and kept at least 90 days, with lower storage cost than cool.

  • BArchive

    Incorrect

    Archive is offline; a blob must be rehydrated, which can take hours, before it can be read.

  • CCool

    Incorrect

    Cool is online too, but costs more to store than cold for data kept this long and read this rarely.

  • DHot

    Incorrect

    Hot has the highest storage cost and suits frequently accessed data.

Hot, cool and cold are online tiers; archive is offline and needs rehydration. Cold suits data that is rarely accessed but must be available immediately, and keeps a 90-day minimum retention.

Question 3 · choose 2

A document app writes to Blob Storage. Users sometimes overwrite files by mistake, and an operator once deleted a whole container. You must be able to restore earlier versions of overwritten blobs and recover deleted containers, and the app must keep writing normally. Which two features should you enable? (Choose TWO.)

  1. ABlob versioning
  2. BA legal hold on each container
  3. CContainer soft delete
  4. DGeo-zone-redundant storage for the account
  5. EA lifecycle rule that moves blobs to the cool tier after 30 days
Show the answer and why
  • ABlob versioning

    Correct

    Versioning keeps the previous version each time a blob is overwritten, so it can be restored.

  • BA legal hold on each container

    Incorrect

    A legal hold blocks overwrites and deletes entirely, which would stop the app from writing normally.

  • CContainer soft delete

    Correct

    Container soft delete keeps a deleted container and its blobs for the retention period so it can be restored.

  • DGeo-zone-redundant storage for the account

    Incorrect

    Replication copies overwrites and deletes to the other copies, so it doesn't bring back lost data.

  • EA lifecycle rule that moves blobs to the cool tier after 30 days

    Incorrect

    A tier change keeps only the current blob; it adds no recovery copies of overwritten blobs or deleted containers.

Microsoft's data protection guidance for blobs combines container soft delete, blob soft delete and blob versioning. Versioning restores overwritten blobs, and container soft delete recovers a deleted container within its retention period.

Question 4 · choose 1

A data platform will land 300 TB of files for Spark jobs. Engineers need POSIX-style access control lists on directories, and jobs rename or delete whole directories as one fast operation. Which storage should you recommend?

  1. AA standard general-purpose v2 account that keeps the default flat blob namespace
  2. BAn Azure Files share in the transaction optimized tier
  3. CA storage account with the hierarchical namespace enabled (Data Lake Storage)
  4. DAn Azure Cosmos DB for NoSQL container with analytical store
Show the answer and why
  • AA standard general-purpose v2 account that keeps the default flat blob namespace

    Incorrect

    In a flat namespace, a directory rename means copying and deleting every blob, and there are no directory ACLs.

  • BAn Azure Files share in the transaction optimized tier

    Incorrect

    Azure Files serves SMB and NFS shares, not the Data Lake APIs that Spark analytics jobs use.

  • CA storage account with the hierarchical namespace enabled (Data Lake Storage)

    Correct

    The hierarchical namespace provides real directories with ACLs and atomic directory rename and delete for analytics engines.

  • DAn Azure Cosmos DB for NoSQL container with analytical store

    Incorrect

    Cosmos DB stores JSON items, not 300 TB of files with directory ACLs.

Data Lake Storage is Blob Storage with a hierarchical namespace: files sit in directories, directory operations are atomic, and access control lists follow the POSIX model, which Hadoop and Spark workloads expect.

Question 5 · choose 1

A social app on Azure Cosmos DB runs in four regions. A user who posts a comment must see it immediately on refresh, but other users can see it a moment later. Reads must stay low-latency and cheap in every region. Which default consistency level should you recommend?

  1. AStrong
  2. BEventual
  3. CSession
  4. DConsistent prefix
Show the answer and why
  • AStrong

    Incorrect

    Strong gives every reader the latest write, at the cost of higher latency and quorum reads, more than this app needs.

  • BEventual

    Incorrect

    Eventual doesn't guarantee that users see their own writes right away.

  • CSession

    Correct

    Session guarantees read-your-writes within a client session while keeping single-replica reads.

  • DConsistent prefix

    Incorrect

    Consistent prefix preserves order but doesn't guarantee read-your-writes.

Azure Cosmos DB offers five consistency levels. Session, the default, guarantees read-your-writes and write-follows-reads within a single client session, with read latency and throughput close to the weaker levels.

Question 6 · choose 1

A shopping-cart service stores carts in Azure Cosmos DB. Carts that haven't changed for 30 days must disappear automatically, without a scheduled job that queries and deletes them. What should you recommend?

  1. AA timer-triggered function that deletes old carts each night
  2. BA lifecycle management rule on the account
  3. CTime to live set on the container to 30 days
  4. DThe analytical store with a 30-day retention
Show the answer and why
  • AA timer-triggered function that deletes old carts each night

    Incorrect

    That's the scheduled delete job the requirement avoids.

  • BA lifecycle management rule on the account

    Incorrect

    That feature doesn't apply to Cosmos DB items.

  • CTime to live set on the container to 30 days

    Correct

    With TTL, Cosmos DB deletes items automatically after the period since their last modification, using leftover request units.

  • DThe analytical store with a 30-day retention

    Incorrect

    Analytical store keeps a columnar copy for analytics; it doesn't remove carts from the transactional store.

Time to live deletes items automatically after a set number of seconds since they were last modified. It can be set per container and overridden per item, and deletes run in the background with leftover request units.

Question 7 · choose 1

An engineering simulation cluster on Linux VMs needs a shared NFSv4.1 file system with sub-millisecond latency and very high throughput for tens of terabytes, and the team wants snapshots and the ability to change performance levels without migrating data. Which storage should you recommend?

  1. AAn HDD (standard) Azure file share over SMB
  2. BBlob Storage mounted with BlobFuse
  3. CAzure NetApp Files
  4. DManaged disks attached to one VM that exports them over NFS
Show the answer and why
  • AAn HDD (standard) Azure file share over SMB

    Incorrect

    HDD file shares don't deliver the latency or throughput of a high-performance NFS cluster.

  • BBlob Storage mounted with BlobFuse

    Incorrect

    BlobFuse presents object storage as files; it isn't a low-latency NFS file system.

  • CAzure NetApp Files

    Correct

    Azure NetApp Files offers NFS and SMB volumes with sub-millisecond latency, snapshots and service levels that can change dynamically.

  • DManaged disks attached to one VM that exports them over NFS

    Incorrect

    A self-built NFS server is a single point of failure and has to be managed by the team.

Azure NetApp Files is an enterprise file service for performance-heavy workloads such as HPC and SAP, with NFS and SMB, sub-millisecond latency, snapshots and service levels that can be changed without data movement.

Question 8 · choose 1

A ticketing service on Azure Cosmos DB idles at about 2,000 RU/s but jumps to 40,000 RU/s within seconds when sales open, at unpredictable times. It runs in two regions and must never be throttled during sales, while paying less during quiet hours. Which throughput option should you recommend?

  1. AStandard (manual) provisioned throughput of 40,000 RU/s
  2. BStandard (manual) throughput of 2,000 RU/s, raised by a script before sales
  3. CA serverless account
  4. DAutoscale provisioned throughput with a maximum of 40,000 RU/s
Show the answer and why
  • AStandard (manual) provisioned throughput of 40,000 RU/s

    Incorrect

    Manual throughput bills 40,000 RU/s around the clock, including the quiet hours.

  • BStandard (manual) throughput of 2,000 RU/s, raised by a script before sales

    Incorrect

    Sales start at unpredictable times, so a script would raise throughput too late.

  • CA serverless account

    Incorrect

    Serverless accounts run in a single region and cap throughput per partition, so they don't fit this two-region spike.

  • DAutoscale provisioned throughput with a maximum of 40,000 RU/s

    Correct

    Autoscale scales instantly between 10% and 100% of the maximum and suits variable or unpredictable traffic.

Autoscale throughput scales the RU/s between 10% of the configured maximum and the maximum based on usage, which fits variable or unpredictable workloads. Manual throughput stays fixed, and serverless is limited to one region.

Practise domain 2 →Practise all domains →