AZ-204 Research & Evidence-Based Practice 2 — Questions and Answers
Question 1: Which Azure Cosmos DB consistency level provides the strongest consistency guarantee, ensuring reads always return the most recently committed write?
- Eventual
- Consistent Prefix
- Session
- Strong (Correct answer)
Correct answer: Strong
Strong consistency guarantees linearizability, so every read reflects the latest committed write across all replicas.
Question 2: What is the purpose of a lease on an Azure Blob Storage blob?
- To encrypt blob data at rest
- To provide an exclusive lock for write and delete operations (Correct answer)
- To enable geo-replication for the blob
- To transition the blob to a cooler access tier
Correct answer: To provide an exclusive lock for write and delete operations
Acquiring a lease grants an exclusive lock on a blob, preventing other clients from writing or deleting it until the lease is released.
Question 3: Which Azure Blob Storage access tier has the highest per-GB storage cost but the lowest per-operation access cost?
- Archive
- Cool
- Cold
- Hot (Correct answer)
Correct answer: Hot
The Hot tier is optimized for frequently accessed data with higher storage costs offset by low per-read costs.
Question 4: In Azure Cosmos DB, what property determines how data is distributed across logical and physical partitions?
- The document _id field
- The partition key (Correct answer)
- The consistency level
- The provisioned throughput (RU/s)
Correct answer: The partition key
Cosmos DB hashes the partition key value to route each document to a specific logical partition for even data distribution.
Question 5: Which HTTP status code does Azure Blob Storage return when an If-Match ETag condition fails during a conditional request?
- 409 Conflict
- 412 Precondition Failed (Correct answer)
- 400 Bad Request
- 403 Forbidden
Correct answer: 412 Precondition Failed
412 Precondition Failed is returned when the blob's current ETag does not match the value specified in If-Match, indicating a concurrent modification.
Question 6: Which Azure Cosmos DB API is the best choice for migrating an existing MongoDB application with minimal code changes?
- SQL (Core) API
- Gremlin API
- API for MongoDB (Correct answer)
- Cassandra API
Correct answer: API for MongoDB
The Azure Cosmos DB for MongoDB API offers wire-protocol compatibility with MongoDB drivers, so existing applications work with minimal modification.
Question 7: What is the maximum size of a single item (document) stored in Azure Cosmos DB, regardless of API?
- 1 MB
- 2 MB (Correct answer)
- 4 MB
- 16 MB
Correct answer: 2 MB
Azure Cosmos DB enforces a 2 MB size limit per item across all supported APIs.
Which Azure Cosmos DB consistency level provides the strongest consistency guarantee, ensuring reads always return the most recently committed write?