Free DP-420 Exam Braindumps
Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB Questions 21–25 (page: 24)

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

You have an Azure Cosmos DB for NoSQL account named account1 that has a single write region in the East US Azure region and read regions in the West Europe and Southeast Asia Azure regions. Service-managed failover is enabled, and the West Europe region is highest in the failover priority list.
You have an app named App1 that uses the Azure Cosmos DB .NET SDK.
You need to minimize how long it takes for App1 to resume writes after a regional outage. The solution must meet the following requirements:
● Ensure that read latency is optimized for the West Europe and Southeast Asia regions.
● Minimize code changes for App1.
What should you do?

  1. Set the SDK connection mode to gateway.
  2. Configure the SDK client to use the East US region only and increase request timeouts.
  3. For the SDK client, configure a preferred region list that prioritizes the East US region, followed by the West Europe region.
  4. For the SDK client, configure a preferred region list that prioritizes the West Europe region, followed by the Southeast Asia region.

Answer(s): D

Explanation:

To satisfy all constraints, you should enable multi-region writes on the Azure Cosmos DB account [assume this already done] and configure the ApplicationRegion property in the .NET SDK client initialization.
Resuming Writes Instantly: With multi-region writes enabled, every region becomes a valid write location. If the primary region experiences an outage, active-active capability prevents the database from performing a traditional database-level failover. This lowers write recovery time to zero since alternate regions can immediately ingest traffic.
*-> Optimized Read and Write Latency: Passing the ApplicationRegion property (e.g., Regions.WestEurope) to the SDK allows it to locate the nearest active geographic replica. This guarantees low-latency local reads and writes within West Europe and Southeast Asia.
*-> Minimal Code Changes: Instead of hardcoding complex prioritized lists via ApplicationPreferredRegions, setting the single ApplicationRegion string automatically creates an ordered fallback list behind the scenes based on geographic proximity.


Reference:

https://learn.microsoft.com/en-us/azure/cosmos-db/troubleshoot-dotnet-sdk-slow-request



View Related Case Study

You plan to deploy an Azure Cosmos DB for NoSQL account that will contain orders and the order lines of each order.
You need to recommend an account design that will maximize performance and minimize the cost of reading a single order and its order lines.
What should you recommend?

  1. Embed the order lines of each order in the same container.
  2. Store the orders in a separate container from the order lines.
  3. Store individual orders and order lines as separate items in the same container. Normalize the items to minimize their size.
  4. Store individual orders and individual order lines as separate items in the same container. Include a type attribute in each item.

Answer(s): A

Explanation:

To optimize for high performance and low cost when reading a single order and its order lines together, you should embed the order lines as an array within the order document.
Single Request: You fetch the order and all lines in one ReadItemAsync point read.
Lowest Latency: Point reads are the fastest operation in Cosmos DB.Lowest Cost: Reading a single document costs exactly 1 Request Unit (RU) for data under 1 KB.
No Joins: Cosmos DB does not support cross-document joins efficiently without burning RUs on queries.
Atomic Updates: You can update the order and its lines together safely in one operation.
How to Structure the Datajson{
"id": "order_1001",
"partitionKey": "customer_9942",
"orderDate": "2026-06-03T17:27:00Z",
"status": "Shipped",
"orderLines": [
{ "lineId": 1, "productId": "prod_abc", "quantity": 2, "price": 15.99 },
{ "lineId": 2, "productId": "prod_xyz", "quantity": 1, "price": 45.00 }
]
}


Reference:

https://devblogs.microsoft.com/cosmosdb/read-data-spring-azure-cosmos-db-v3/



View Related Case Study

You have an Azure Cosmos DB for NoSQL account named account1 that has a single read-write region and one additional read region. Account1 uses the strong default consistency level.
You have an application that uses the eventual consistency level when submitting requests to account1.
How will writes from the application be handled?

  1. Writes will use the eventual consistency level.
  2. Azure Cosmos DB will reject writes from the application.
  3. Writes will use the strong consistency level.
  4. The write order is not guaranteed during replication.

Answer(s): C

Explanation:

Overriding the default consistency level only applies to reads within the SDK client. An account configured for strong consistency by default will still write and replicate data synchronously to every region in the account.
When the SDK client instance or request overrides this with Session or weaker consistency, reads will be performed using a single replica.


Reference:

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



View Related Case Study

You plan to create an Azure Cosmos DB account that will use the NoSQL API.
You need to create a grouping strategy for items that will be stored in the account. The solution must ensure that write and read operations on the items can be performed within the same transaction.
What should you use to group the items?

  1. logical partitions
  2. physical partitions
  3. databases
  4. containers

Answer(s): A

Explanation:

Transactions (in stored procedures or triggers) are allowed only against items in a single logical partition.
A logical partition also defines the scope of database transactions. You can update items within a logical partition by using a transaction with snapshot isolation.
When new items are added to a container, the system transparently creates new logical partitions. You don't have to worry about deleting a logical partition when the underlying data is deleted.
Transactions (in stored procedures or triggers) are allowed only against items in a single logical partition.


Reference:

https://learn.microsoft.com/en-us/azure/cosmos-db/partitioning-overview



View Related Case Study

You have an Azure subscription. The subscription contains an Azure Cosmos DB for NoSQL account named account1 that hosts a container named Devices. Devices has a partition key named type.
You plan to execute the following query.
SELECT d.deviceName
FROM d
WHERE d.deviceId = 'ABC102'
AND d.type = 'car'
AND d.importanceId = 4
You are evaluating the resource utilization of the query.
How will the query be executed?

  1. as an in-partition query
  2. as a parallel cross-partition query
  3. as a cross-partition query

Answer(s): A

Explanation:

In Azure Cosmos DB, queries are optimized based on the partition key. Since the container Devices has a partition key named type, and the query includes the condition d.type = 'car', the query can be executed within a single partition (an in-partition query). This is because the type field is specified, which allows Cosmos DB to directly target the partition containing the documents with type = 'car'.
Given that the query is restricted to a specific partition (i.e., type = 'car'), Cosmos DB does not need to scan across all partitions. The query will be executed efficiently within the specified partition, even though it includes other conditions (like d.deviceId = 'ABC102' and d.importanceId = 4), because those are additional filters within the targeted partition.



Viewing page 24 of 61
Viewing questions 116 - 120 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!