nerdexam
Microsoft

DP-420 · Question #8

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. The following is a sample of the data. You need to select…

The correct answer is D. 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. Incorrect Answers: A: You will…

Design and implement data distribution

Question

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. 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?

Exhibit

DP-420 question #8 exhibit

Options

  • AUse timestamp as the partition key.
  • BCreate a new synthetic key that contains deviceId and sensor1Value.
  • CCreate a new synthetic key that contains deviceId and deviceManufacturer.
  • DCreate a new synthetic key that contains deviceId and a random number.

How the community answered

(21 responses)
  • A
    5% (1)
  • B
    10% (2)
  • C
    5% (1)
  • D
    81% (17)

Explanation

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. Incorrect Answers: A: 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. B: Senser1Value has only two values. C: All the devices could have the same manufacturer.

Topics

#Partition key#Hot partitions#Synthetic key#Data distribution

Community Discussion

No community discussion yet for this question.

Full DP-420 Practice