Free DP-420 Exam Braindumps
Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB Questions 46–50 (page: 11)

Updated On: 16-Nov-2026
View Related Case Study

Your company develops an application named App1 that uses the Azure Cosmos DB SDK and the Eventual consistency level.
App1 queries an Azure Cosmos DB for NoSQL account named account1.
You need to identify which consistency level to assign to App1 to meet the following requirements:
-Maximize the throughput of the queries generated by App1 without increasing the number of request units currently used by the queries.
-Provide the highest consistency guarantees.
Which consistency level should you identify?

  1. Strong
  2. Bounded Staleness
  3. Session
  4. Consistent Prefix

Answer(s): D

Explanation:

Consistency guarantees in practice
In practice, you may often get stronger consistency guarantees. Consistency guarantees for a read operation correspond to the freshness and ordering of the database state that you request. Read-consistency is tied to the ordering and propagation of the write/update operations.
If there are no write operations on the database, a read operation with eventual, session, or consistent prefix consistency levels is likely to yield the same results as a read operation with strong consistency level.

Note:
Eventual consistency
Like all consistency levels weaker than Strong, writes are replicated to a minimum of three replicas (in a four replica set) in the local region, with asynchronous replication to all other regions.
In Eventual consistency, the client issues read requests against any one of the four replicas in the specified region. This replica may be lagging and could return stale or no data.
Eventual consistency is the weakest form of consistency because a client may read the values that are older than the ones it read in the past. Eventual consistency is ideal where the application doesn't require any ordering guarantees. Examples include count of Retweets, Likes, or non-threaded comments.


Reference:

https://learn.microsoft.com/en-us/azure/cosmos-db/consistency-levels



View Related Case Study

You have an Azure Cosmos DB account that hosts a single container named Container1. Container1 contains items that include two properties named TenantId and UserId. Container1 has logical partitions based on the TenantId property.
You need to configure subpartitioning for Container1 based on the UserId property. The solution must maximize data availability.
What should you do first?

  1. Enable the analytical store for Container1.
  2. Create a composite index.
  3. Create a new container.
  4. Create a stored procedure.

Answer(s): C

Explanation:

To configure subpartitioning (hierarchical partition keys) for an existing Azure Cosmos DB container while maximizing data availability, you must create a new container and perform a live data migration.
Azure Cosmos DB does not currently support in-place updates to change a flat partition key to a hierarchical partition key structure on an existing container.


Reference:

https://learn.microsoft.com/en-us/azure/cosmos-db/hierarchical-partition-keys



View Related Case Study

You have a container in an Azure Cosmos DB for NoSQL account. The container stores telemetry data from IoT devices. The container uses telemetryId as the partition key and has a throughput of 1,000 request units per second (RU/s). Approximately 5,000 IoT devices submit data every five minutes by using the same telemetryId value.
You have an application that performs analytics on the data and frequently reads telemetry data for a single IoT device to perform trend analysis.
The following is a sample of a document in the container.

You need to reduce the amount of request units (RUs) consumed by the analytics application.
What should you do?

  1. Decrease the offerThroughput value for the container.
  2. Increase the offerThroughput value for the container.
  3. Move the data to a new container that uses a partition key of deviceId.
  4. Move the data to a new container that uses a partition key of temp.

Answer(s): C

Explanation:

The analytics application would frequently read from the same partition of Device ID is used as partition key.
Note: The partition key determines how Azure Cosmos DB routes data in partitions. The IoT Device ID is the usual partition key for IoT applications.


Reference:

https://docs.microsoft.com/en-us/azure/architecture/solution-ideas/articles/iot-using-cosmos-db



View Related Case Study

HOTSPOT (Drag and Drop is not supported)
You have a container in an Azure Cosmos DB for NoSQL account.
You need to use the Azure Cosmos DB SDK to replace a document by using optimistic concurrency.
What should you include in the code? To answer, select the appropriate options in the answer area.
Note: Each correct selection is worth one point.
Hot Area:

  1. See Explanation section for answer.

Answer(s): A

Explanation:



Box 1: ConsistencyLevel
The ItemRequestOptions Class ConsistencyLevel property gets or sets the consistency level required for the request in the Azure Cosmos DB service.
Azure Cosmos DB offers 5 different consistency levels. Strong, Bounded Staleness, Session, Consistent Prefix and Eventual - in order of strongest to weakest consistency.
Box 2: _etag
The ItemRequestOptions class helped us implement optimistic concurrency by specifying that we wanted the SDK to use the If-Match header to allow the server to decide whether a resource should be updated. The If-Match value is the ETag value to be checked against. If the ETag value matches the server ETag value, the resource is updated.


Reference:

https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.itemrequestoptions https://cosmosdb.github.io/labs/dotnet/labs/10-concurrency-control.html



View Related Case Study

You are developing a new app named App1 by using the .NET Aspire Azure Cosmos DB integration. App1 will add data to an Azure Cosmos DB database.
You need to validate the functionality of App1 by using a CI/CD workflow. The solution must minimize administrative effort.
What should you use?

  1. Azure Cosmos DB diagnostic logs
  2. Azure Cosmos DB Data Explorer
  3. the Azure Cosmos DB Emulator
  4. Azure Storage Emulator

Answer(s): C

Explanation:

To keep administrative effort low while validating your .NET Aspire app in a CI/CD workflow, you should use the Azure Cosmos DB Emulator.
When utilizing the .NET Aspire Azure Cosmos DB hosting integration, calling the built-in emulator features allows you to run your integration tests without provisioning actual cloud infrastructure or managing complex connection credentials.


Reference:

https://learn.microsoft.com/en-us/azure/cosmos-db/how-to-develop-emulator



Viewing page 11 of 61
Viewing questions 51 - 55 out of 296 questions


Post your Comments and Discuss Microsoft DP-420 exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!