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

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

You have an Azure Cosmos DB for NoSQL account configured for global distribution across four regions.
At connection time, the SQL SDK needs to identify the optimal endpoint for reading and writing.
Which two factors can influence the SDK? Each correct answer presents a complete solution.
Note: Each correct selection is worth one point.

  1. the consistency level in RequestOptions
  2. regional latency
  3. the default consistency level
  4. the PreferredLocations configuration
  5. a region being available

Answer(s): D,E

Explanation:

Connecting to a preferred region using the API for NoSQL
The SDKs accept an optional parameter PreferredLocations that is an ordered list of Azure regions.
The SDK will automatically send all writes to the current write region. All reads will be sent to the first available region in the preferred locations list. If the request fails, the client will fail down the list to the next region.
The SDK will only attempt to read from the regions specified in preferred locations. So, for example, if the Azure Cosmos DB account is available in four regions, but the client only specifies two read(non-write) regions within the PreferredLocations, then no reads will be served out of the read region that is not specified in PreferredLocations. If the read regions specified in the PreferredLocations list are not available, reads will be served out of write region.


Reference:

https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/tutorial-global-distribution



View Related Case Study

You are designing an Azure Cosmos DB for NoSQL solution to store data from IoT devices. Writes from the devices will be occur every second. Data will be retained indefinitely.
The following is a sample of the data.

You need to select a partition key that meets the following requirements for writes:
-Minimizes the partition skew
-Avoids capacity limits
-Avoids hot partitions
What should you do?

  1. Create a new synthetic key that contains deviceId and timestamp
  2. Use timestamp as the partition key
  3. Use deviceManufacturer as the partition key
  4. Use sensor1Value as the partition key

Answer(s): A

Explanation:

Correct:
* Create a new synthetic key that contains deviceId and a random number.
Use a partition key with a random suffix. Distribute the workload more evenly is to append a random number at the end of the partition key value.
When you distribute items in this way, you can perform parallel write operations across partitions.
* Create a new synthetic key that contains deviceId and timestamp.
Concatenate multiple properties of an item.
You can form a partition key by concatenating multiple property values into a single artificial partitionKey property. These keys are referred to as synthetic keys.
For example, consider the following example document:
{
"deviceId": "abc-123",
"date": 2018
}
For the previous document, one option is to set /deviceId or /date as the partition key. Use this option, if you want to partition your container based on either device ID or date. Another option is to concatenate these two values into a synthetic partitionKey property that's used as the partition key.
{
"deviceId": "abc-123",
"date": 2018,
"partitionKey": "abc-123-2018"
Incorrect:
* Create a new synthetic key that contains deviceId and deviceManufacturer.
All the devices could have the same manufacturer.
* Create a new synthetic key that contains deviceId and sensor1Value.
Senser1Value has only two values.
* Use deviceId as the partition key.
* Use deviceManufacturer as the partition key.
All the devices could have the same manufacturer.
* Use sensor1Value as the partition key
* Use timestamp as the partition key.
You will also not like to partition the data on “DateTime”, because this will create a hot partition. Imagine you have partitioned the data on time, then for a given minute, all the calls will hit one partition. If you need to retrieve the data for a customer, then it will be a fan-out query because data may be distributed on all the partitions.


Reference:

https://docs.microsoft.com/en-us/azure/cosmos-db/sql/synthetic-partition-keys https://docs.microsoft.com/en-us/azure/cosmos-db/concepts-limits



View Related Case Study

You plan to create an Azure Cosmos DB for NoSQL account that will have a single write region and three read regions.
You need to set the consistency level for the account. The solution must meet the following requirements:
-In the write region, writes must replicate synchronously across at least three replicas.
-In the read regions, reads must see writes in order for transactional batches.
-Throughput for reads and writes must be maximized.
Which consistency level should you select?

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

Answer(s): D



View Related Case Study

You have a database named db1 in an Azure Cosmos DB for NoSQL account.
You are designing an application that will use db1.
In db1, you are creating a new container named coll1 that will store online orders.
The following is a sample of a document that will be stored in coll1.

The application will have the following characteristics:
-New orders will be created frequently by different customers.
-Customers will often view their past order history.
You need to select the partition key value for coll1 to support the application. The solution must minimize costs.
To what should you set the partition key?

  1. orderId
  2. customerId
  3. orderDate
  4. id

Answer(s): B

Explanation:

If most of your workload's requests are queries and most of your queries have an equality filter on the same property, this property can be a good partition key choice. For example, if you frequently run a query that filters on UserID, then selecting UserID as the partition key would reduce the number of cross-partition queries.


Reference:

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



View Related Case Study

DRAG DROP (Drag and Drop is not supported)
You have an Azure Cosmos DB for NoSQL account.
You need to implement Always Encrypted for all the data stored in the account. The solution must minimize administrative effort.
At which level should you define the encryption policy and set the data encryption key? To answer, drag the appropriate levels to the correct requirements. Each level may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
Note: Each correct selection is worth one point.
Select and Place:

  1. See Explanation section for answer.

Answer(s): A

Explanation:




Define the encryption policy: Container
Defining the encryption policy at the container level allows you to specify encryption for all items within that container.
Set the data encryption key: Account
Setting the data encryption key at the account level allows you to manage the encryption keys centrally for the entire Cosmos DB account, simplifying key management.



Viewing page 9 of 61
Viewing questions 41 - 45 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!