Soru

Zorluk: ZorResolving DynamoDB Throttling and Key Distribution Issues

VoltMetric is a utility analytics platform that processes electricity usage metrics from millions of smart meters. The application writes high-frequency meter readings to an Amazon DynamoDB table configured with provisioned write throughput. The table uses `ZipCode` as the partition key and `Timestamp` as the sort key. During a heatwave, the application experiences a surge in writes from a highly populated urban zip code, leading to numerous `ProvisionedThroughputExceededException` errors in the ingest client logs. An analysis reveals that the total table write capacity is underutilized, but requests to this specific zip code are being throttled.

Which TWO actions should a developer take to resolve the write throttling and optimize the table's performance? (Select TWO.)

  1. Append a calculated hash or a random integer suffix to the ZipCode partition key before writing new items to the table.Cevap
  2. Configure the ingest client SDK to use exponential backoff and jitter for request retries.Cevap
  3. C
    Increase the visibility timeout of the Amazon SQS queue that buffers incoming readings to give the table more time to write.
  4. D
    Perform a parallel Scan operation across the table partitions to distribute the write throughput consumption.
  5. E
    Create a Global Secondary Index with ZipCode as the partition key to offload write operations from the main table.

Cevap

To resolve the write throttling, the developer should append a calculated hash or a random integer suffix to the ZipCode partition key and configure the application SDK client to implement exponential backoff with jitter.
The correct options are appending a random suffix to the partition key (write sharding/salting) and configuring the client SDK to use exponential backoff with jitter. Appending a suffix distributes the writes across multiple logical partitions, preventing a single hot partition key from exceeding the partition-level limit of 10001000 WCU. Implementing exponential backoff and jitter handles transient throttling by spreading retry attempts over time, reducing collision rates.

Adım Adım Çözüm

1
Analyze the ProvisionedThroughputExceededException errors and determine if the workload is unevenly distributed.
Identify that the total write capacity is underutilized, but certain partition keys (ZipCode values representing high-density areas) are throttled, pointing to a hot partition issue.
To confirm that the root cause is a key distribution issue (hot partition) rather than a table-wide capacity limitation.
2
Apply a write sharding strategy to partition keys by appending a calculated hash or random suffix.
The writes are distributed across multiple physical partitions, raising the throughput limit for that logical partition.
DynamoDB partitions have a hard limit of 10001000 Write Capacity Units (WCUs). Appending a suffix (e.g., from 11 to NN) splits the hot key into multiple distinct partition keys.
3
Configure the AWS SDK client with exponential backoff and jitter.
The client retries throttled requests with progressively longer delay intervals that contain randomized offsets.
To handle transient throttling gracefully and prevent retry storms, ensuring that retried requests do not collide and cause further throttling.

Anahtar Kavram

Resolving DynamoDB Hot Partitions and Implementing Retry Backoff
Bu soruyu puanla