🌍 Azure Cosmos DB - AZ-204 Practice Questions

Develop solutions using Azure Cosmos DB including partitioning, consistency levels, change feed, and stored procedures.

15Questions Available
1Exam Domains

Practice Cosmos DB Questions Now

Start a timed practice session focusing on Azure Cosmos DB topics from the AZ-204 question bank.

Start AZ-204 Practice Quiz →

AZ-204 Cosmos DB Question Bank (15 Questions)

Browse all 15 practice questions covering Azure Cosmos DB for the AZ-204 certification exam. Answers are intentionally hidden on this page so you can self-test first before checking results in quiz mode.

  1. Question 1Develop for Azure storage

    A developer uses Azure Cosmos DB with the SQL API. Which SDK method executes a transactional batch of up to 100 operations on items within the same partition key?

    AExecuteStoredProcedureAsync()
    Bcontainer.CreateTransactionalBatch(partitionKey)
    Ccontainer.UpsertItemAsync() in a loop
    Dcontainer.ExecuteAsync()

    Answer hidden for practice.

    Use the interactive quiz to reveal the correct answer and explanation.

    Start AZ-204 Quiz
  2. Question 2Develop for Azure storage

    Which Cosmos DB consistency level provides the strongest consistency guarantee?

    AEventual
    BConsistent Prefix
    CSession
    DStrong

    Answer hidden for practice.

    Use the interactive quiz to reveal the correct answer and explanation.

    Start AZ-204 Quiz
  3. Question 3Develop for Azure storage

    What is the Azure Cosmos DB 'partition key' and why is it important for developer performance?

    AA security key for encrypting Cosmos DB data
    BA property value used to distribute data across physical partitions; choosing a high-cardinality partition key prevents hot partitions and enables queries to target specific partitions (partition routing)
    CAn API key for Cosmos DB REST access
    DThe primary key for document identity

    Answer hidden for practice.

    Use the interactive quiz to reveal the correct answer and explanation.

    Start AZ-204 Quiz
  4. Question 4Develop for Azure storage

    What Cosmos DB SDK method should a developer use to read an item when both the item ID and partition key value are known?

    Acontainer.QueryItemsAsync()
    Bcontainer.ReadItemAsync(id, partitionKey)
    Ccontainer.GetItemAsync(id)
    Dcontainer.FetchAsync(id)

    Answer hidden for practice.

    Use the interactive quiz to reveal the correct answer and explanation.

    Start AZ-204 Quiz
  5. Question 5Develop for Azure storage

    What is the Azure Cosmos DB 'change feed' feature used for in application development?

    AAuditing changes to Cosmos DB account configuration
    BA persistent, ordered log of all creates and updates (not deletes by default) to items in a container, enabling event-driven processing, real-time analytics, and data synchronization
    CMonitoring Cosmos DB performance metrics
    DFeeding data from external sources into Cosmos DB

    Answer hidden for practice.

    Use the interactive quiz to reveal the correct answer and explanation.

    Start AZ-204 Quiz
  6. Question 6Develop for Azure storage

    What is the Azure Cosmos DB 'Request Unit' (RU)?

    AA billing unit for compute resources
    BA normalized unit representing the compute resources (CPU, memory, IOPS) consumed by a single database operation; RU/s is provisioned throughput capacity
    CA measure of network bandwidth
    DA unit of storage capacity

    Answer hidden for practice.

    Use the interactive quiz to reveal the correct answer and explanation.

    Start AZ-204 Quiz
  7. Question 7Develop for Azure storage

    What is the maximum item size in Azure Cosmos DB (SQL API)?

    A100 KB
    B1 MB
    C2 MB
    D16 MB

    Answer hidden for practice.

    Use the interactive quiz to reveal the correct answer and explanation.

    Start AZ-204 Quiz
  8. Question 8Develop for Azure storage

    Which Cosmos DB consistency level provides the strongest guarantees and is equivalent to a linearizable system?

    ASession
    BBounded staleness
    CStrong
    DConsistent prefix

    Answer hidden for practice.

    Use the interactive quiz to reveal the correct answer and explanation.

    Start AZ-204 Quiz
  9. Question 9Develop for Azure storage

    A developer needs to read the latest value written by the same client session in Cosmos DB, but allow slightly stale reads from other sessions. Which consistency level should they use?

    AEventual
    BSession
    CConsistent prefix
    DBounded staleness

    Answer hidden for practice.

    Use the interactive quiz to reveal the correct answer and explanation.

    Start AZ-204 Quiz
  10. Question 10Develop for Azure storage

    A developer is implementing change feed processing for an Azure Cosmos DB container. Which SDK class should they use for a resilient, multi-consumer processor?

    ACosmosClient.GetContainer().GetChangeFeedIterator()
    BChangeFeedProcessor built with Container.GetChangeFeedProcessorBuilder()
    CCosmosClient.ReadFeedAsync()
    DEventHubConsumerClient

    Answer hidden for practice.

    Use the interactive quiz to reveal the correct answer and explanation.

    Start AZ-204 Quiz
  11. Question 11Develop for Azure storage

    An application stores JSON documents in Cosmos DB with a partition key of '/customerId'. A query filters by 'orderId' which is not the partition key. What is the performance implication?

    AThe query executes efficiently using the partition key index
    BThe query performs a cross-partition fan-out, increasing RU cost
    CThe query fails because non-partition-key queries are not supported
    DThe query uses the unique key policy automatically

    Answer hidden for practice.

    Use the interactive quiz to reveal the correct answer and explanation.

    Start AZ-204 Quiz
  12. Question 12Develop for Azure storage

    A developer needs to read Cosmos DB change feed from the very beginning of a container's history. What must be set when building the ChangeFeedProcessor?

    ASet StartTime to DateTime.MinValue
    BSet StartFromBeginning(true) in the ChangeFeedProcessorBuilder
    CCreate a new lease container
    DSet the consistency level to Strong

    Answer hidden for practice.

    Use the interactive quiz to reveal the correct answer and explanation.

    Start AZ-204 Quiz
  13. Question 13Develop for Azure storage

    A developer implements a Cosmos DB stored procedure that must process a batch of documents. The stored procedure calls continuation() to handle a large result set. What does this indicate?

    AThe stored procedure failed and must retry
    BThe batch was too large for a single transaction; the stored procedure signals the client to call it again with a continuation token
    CThe stored procedure is waiting for an external event
    DThe transaction was rolled back

    Answer hidden for practice.

    Use the interactive quiz to reveal the correct answer and explanation.

    Start AZ-204 Quiz
  14. Question 14Develop for Azure storage

    A developer needs to read the same Cosmos DB change feed from two different microservices independently. What must be created for each microservice?

    AA separate Cosmos DB container for each service
    BA separate lease container (or lease container prefix) for each ChangeFeedProcessor instance
    CA separate Cosmos DB account
    DA separate partition key value

    Answer hidden for practice.

    Use the interactive quiz to reveal the correct answer and explanation.

    Start AZ-204 Quiz
  15. Question 15Develop for Azure storage

    A developer implements Cosmos DB change feed processing. The processor crashes mid-batch. After restart, which documents are reprocessed?

    AOnly documents after the crash point
    BAll documents from the last committed checkpoint, potentially reprocessing some already-handled documents
    CNo documents — the processor resumes from exactly where it stopped
    DAll documents from the beginning

    Answer hidden for practice.

    Use the interactive quiz to reveal the correct answer and explanation.

    Start AZ-204 Quiz

Key Cosmos DB Concepts for AZ-204

cosmos dbpartition keyconsistency levelchange feedstored procedurerequest unitsql apiglobal distribution

AZ-204 Cosmos DB Exam Tips

Azure Cosmos DB questions in AZ-204 are typically scenario-based. Focus on Azure application development, integration services, authentication, and runtime reliability. Priority concepts: cosmos db, partition key, consistency level, change feed, stored procedure, request unit.

What AZ-204 Expects

  • Anchor your answer in choose managed developer services that simplify secure integration and deployment.
  • Cosmos DB scenarios for AZ-204 are frequently mapped to Domain 2 (15-20%), so read the objective carefully before picking controls or architecture.
  • Expect multi-topic scenarios where Cosmos DB interacts with identity, networking, governance, or monitoring patterns rather than appearing as an isolated question.
  • When two options are both technically valid, prefer the choice that best aligns with the exam's operational scope (Associate) and vendor best practices.

High-Value Cosmos DB Concepts

  • Know the core Cosmos DB building blocks cold: cosmos db, partition key, consistency level, change feed.
  • Review the edge-case features and limits for stored procedure, request unit; these details are commonly used to differentiate answer choices.
  • Practice service-integration reasoning: how Cosmos DB pairs with Blob Storage, Azure Cache in real deployment patterns.
  • For AZ-204, explain why the chosen Cosmos DB design meets reliability, security, and cost expectations better than the alternatives.

Common AZ-204 Traps

  • Watch for using infrastructure-heavy answers for app-level requirements.
  • Questions in Develop for Azure Storage often include distractors that look correct for Cosmos DB but violate least-privilege, compliance, or availability requirements.
  • Avoid picking options purely by feature name; validate data path, failure handling, and governance impact before answering.
  • If the prompt hints at automation or repeatability, eliminate manual-only operational answers first.

Fast Review Checklist

  • Can you compare at least two Cosmos DB implementation paths and justify which one best fits the scenario?
  • Can you map the chosen answer back to Develop for Azure Storage (15-20%) outcomes for AZ-204?
  • Can you explain security and access boundaries for Cosmos DB without relying on default-open assumptions?
  • Can you describe how Cosmos DB integrates with Blob Storage and Azure Cache during failure, scaling, and monitoring events?

Exam Domains Covering Cosmos DB

Related Resources

More AZ-204 Study Resources