Soru

Zorluk: KolayHigh-Performing Database Solutions

A smart home application collects frequent telemetry events from thousands of residential thermostats. The data must be recorded in an Amazon DynamoDB table.

Which partition key design should a solutions architect choose to distribute the write workload evenly across physical partitions?

  1. A unique thermostat identifier, which ensures a diverse and balanced distribution of write requests.Cevap
  2. B
    A timestamp representing the exact millisecond the event occurred, which allows query ordering.
  3. C
    The device status value, which categorizes events into active or inactive states.
  4. D
    A static region name representing the country of deployment, which groups all devices together.

Cevap

A unique thermostat identifier, which ensures a diverse and balanced distribution of write requests.
The correct answer is the option that proposes a unique thermostat identifier. In Amazon DynamoDB, partition keys should have high cardinality (many distinct values) to distribute workloads evenly across all available physical partitions. This design ensures optimal write performance and prevents throttling under high write volumes.

Adım Adım Çözüm

1
Analyze the write workload characteristics of the application.
The application collects telemetry events from thousands of devices frequently, representing a high-write workload.
Understanding the scale and frequency of writes is necessary to select a database key design that scales horizontally.
2
Evaluate the partition key candidates based on their cardinality.
A unique thermostat identifier has high cardinality, whereas timestamps, statuses, and regions have sequential or low cardinality.
DynamoDB distributes data across partitions based on the hash of the partition key. High-cardinality keys ensure even distribution.
3
Select the key design that avoids write bottlenecks (hot partitions).
Choosing the unique thermostat identifier distributes requests across many partitions, preventing write throttling.
This aligns with AWS best practices for high-performing DynamoDB database designs.

Anahtar Kavram

Amazon DynamoDB Partition Key Design and Cardinality
Bu soruyu puanla