Free DP-420 Exam Braindumps
Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB Questions 36–40 (page: 27)

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

You have an Azure Cosmos DB database that contains a container named container1. The container1 container is configured with a maximum of 20,000 RU/s and currently contains 240 GB of data.
You need to estimate the costs of container1 based on the current usage.
How many RU/s will be charged?

  1. 240
  2. 4,000
  3. 20,000
  4. 24,000

Answer(s): C



View Related Case Study

You have an Azure Cosmos DB for NoSQL container named Container1.
You run SQL queries against Container1 by using the Azure Cosmos DB .NET SDK.
You need to identify the number of request units consumed by each query.
Which two items can you use? Each correct answer presents a complete solution.
Note: Each correct selection is worth one point.

  1. IDocumentQuery
  2. RequestOptions
  3. StoredProcedureResponse
  4. ResourceResponse

Answer(s): A,D

Explanation:

To identify the number of request units (RUs) consumed by each query using the Azure Cosmos DB .NET SDK (specifically v2 API / DocumentClient syntax implied by your choices), you should use IDocumentQuery and FeedResponse.
ResourceResponse: In the legacy Azure Cosmos DB .NET SDK (v2), query and item operations return a ResourceResponse<T> object. This object contains a RequestCharge property that explicitly yields the number of RUs consumed by the database operation.
IDocumentQuery: When you perform asynchronous pagination or streaming of SQL query results in the v2 .NET SDK, the IDocumentQuery<T> interface is implemented. This interface exposes properties and response fields that catch execution metrics—including total request charges—as you iterate through your data feed.


Reference:

https://learn.microsoft.com/sv-se/azure/cosmos-db/find-request-unit-charge



View Related Case Study

HOTSPOT (Drag and Drop is not supported)
You are designing an Azure Cosmos DB for NoSQL solution.
You plan to create a new container named Container1 that will store product data for automotive repair parts as shown in the following table.

The data will be stored in Container1 as shown in the following table.

You need to recommend a data partitioning solution for the database. The solution must spread the workload to minimize I/O contention.
Which column should you recommend for the physical partition key and the logical partition key? 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: Car Model
Physical partition key:
Provisioned throughput for a container divides evenly among physical partitions. A partition key design that doesn't distribute requests evenly might result in too many requests directed to a small subset of partitions that become "hot." Hot partitions cause inefficient use of provisioned throughput, which can result in rate limiting and higher costs.
For example, consider a container with the path /foodGroup specified as the partition key. The container could have any number of physical partitions, but in this example we assume it has three. A single physical partition could contain multiple partition keys. As an example, the largest physical partition could contain the top three most significant size logical partitions: Beef Products, Vegetable and Vegetable Products, and Soups, Sauces, and Gravies.
Box 2: Storage location
Logical partition key:
Logical Partition Key: Use a property with a high number of unique values, such as Storage Location (if unique enough) or a Synthetic Key (e.g., CarBrand-CarModel-PartName).
High Cardinality: A good key distributes data evenly across hundreds or thousands of distinct values to prevent "hot" partitions.
Query Alignment: Ensure the chosen key is used as a filter in your most frequent queries to avoid expensive cross-partition scans.
20 GB Limit: Each logical partition is restricted to 20 GB of data; if a single Car Brand or Model exceeds this, it must be subdivided.


Reference:

https://docs.azure.cn/en-us/cosmos-db/partitioning



View Related Case Study

HOTSPOT (Drag and Drop is not supported)
You plan to create a container named Container1 in an Azure Cosmos DB for NoSQL account. Container1 will store items that contain user sign-in session data from multiple organizations. Each user is assigned to a single organization.
Container1 will include the following properties:
-UserId
-SessionId
-SessionStart
-OrganizationID
The following are common queries served by Container1.
SELECT SessionID,SessionStart,UserID FROM c WHERE OrganizationId = 6 AND UserId = 50143
SELECT SessionID,SessionStart,UserID FROM c WHERE OrganizationId = 6
You need to recommend a partitioning scheme for Container1 that meets the following requirements:
-Maximizes performance
-Minimizes the cost of read queries
-Minimizes the possibility of reaching the partition size limits
Which type of partition key and which partition key properties should you include in the recommendation? 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: Hierarchical
Partition key type
The best partitioning scheme for the requirements is a Hierarchical Partition Key (also known as sub-partitioning).
Box 2: OrganizationId, UserId
Properties
You should use a Hierarchical Partition Key with the following properties, in this specific order:
OrganizationId
UserId
Why This Works
Maximizes Performance & Minimizes Cost
Query 2 (OrganizationId = 6): This becomes a targeted partition query. Cosmos DB will only search the physical partitions containing data for that specific organization. It avoids a "Cross-Partition Query," which is the most expensive and slowest type of read.
Query 1 (OrganizationId = 6 AND UserId = 50143): This becomes a point-read-like targeted query. By including both levels of the hierarchy in the filter, Cosmos DB routes the request directly to the specific sub-partition, resulting in the lowest possible RU (Request Unit) cost.
Minimizes Partition Size Limit Risks
Standard partition keys are limited to 20GB per logical partition.
If you used only OrganizationId, a massive organization could eventually exceed that 20GB limit (a "Hot Partition").
By adding UserId as the second level, you effectively distribute the data into smaller chunks within the organization's boundary. This allows the data to scale across multiple physical partitions while remaining logically grouped for performance.


Reference:

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



View Related Case Study

You have an Azure subscription.
You plan to implement an Azure Cosmos DB for NoSQL single-region write account named account1 that will replicate across two Azure regions.
You need to set the default consistency level for account1. The solution must meet the following requirements:
-Writes must be performed to a local majority in a single region.
-Reads must be performed from a local minority in a single region.
Which consistency level should you select?

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

Answer(s): D

Explanation:

Based on the Azure Cosmos DB architecture for a NoSQL single-region write account with two regions, the appropriate consistency level is Bounded Staleness.
Here is how this level maps to your specific requirements:
Writes to a Local Majority: For all consistency levels except Strong, Azure Cosmos DB performs writes to a local majority (three out of four replicas) within the primary write region before acknowledging the operation.
Reads from a Local Minority: In the Bounded Staleness and Strong consistency levels, reads are performed against a local minority (two replicas in a four-replica set) to compare log sequence numbers (LSN) and ensure consistency.
Single-Region Write vs. Strong Consistency: While Strong consistency also uses local minority reads, it requires a global majority for writes (acknowledgment from all regions), which contradicts your requirement for a "local majority" write.
Regional Behavior: Bounded Staleness is specifically recommended for single-region write accounts with multiple regions where "near strong" consistency is desired; it provides strong consistency guarantees for clients reading within the same region as the write.
Incorrect:
Other levels like Session, Consistent Prefix, and Eventual perform reads from only a single replica, which does not meet your "local minority" read requirement.


Reference:

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



Viewing page 27 of 61
Viewing questions 131 - 135 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!