Soru

Zorluk: OrtaResolving DynamoDB Throttling and Key Distribution Issues

An IoT telemetry collection service named FleetVibe writes real-time status updates from delivery trucks to an Amazon DynamoDB table. The table is configured with provisioned write capacity and uses the FleetDivision attribute (e.g., 'US-East', 'EU-West') as the partition key. During peak hours, the application experiences write throttling and throws ProvisionedThroughputExceededException errors, even though the total consumed write capacity is well below the table's provisioned limit. Application logs reveal that the client application immediately fails and drops data upon receiving the throttling errors. Which TWO actions should the developer take to resolve the write throttling and prevent data loss? (Select TWO.)

  1. Update the application schema to append a random numerical suffix to the FleetDivision partition key before writing, and adjust the read logic to query across the suffixes.Cevap
  2. Configure the AWS SDK client in the application to use exponential backoff with jitter for automatic retries when throttling errors occur.Cevap
  3. C
    Increase the overall provisioned Write Capacity Units (WCUs) of the table to scale up the throughput limits.
  4. D
    Place an Amazon SQS queue in front of the table and set the SQS message visibility timeout to a low value like 2 seconds to force rapid retries.
  5. E
    Modify the client application to retrieve records using a sequential Scan operation with a FilterExpression on FleetDivision to bypass partition limits.

Cevap

The correct solutions are to append a random numerical suffix to the partition key to distribute write traffic, and to configure the AWS SDK client to use exponential backoff with jitter to handle retries.
The correct actions are to append a random numerical suffix (sharding) to the FleetDivision partition key and to configure the AWS SDK client to use exponential backoff with jitter. Appending a random suffix distributes write requests across multiple physical partitions, which mitigates hot partition issues caused by low-entropy keys. Updating the SDK client to use exponential backoff and jitter ensures that the application handles transient throttling errors gracefully by retrying them over increasing, randomized intervals, preventing immediate failures and data loss.

Adım Adım Çözüm

1
Identify the cause of throttling by comparing consumed throughput with provisioned throughput.
Throttling is localized to specific partition keys (hot partition issue) because overall consumed capacity is below the table limit.
Before applying fixes, the developer must determine if the bottleneck is a hot key design rather than overall table limit exhaustion.
2
Redesign the partition key schema to introduce entropy.
The application appends a random suffix to the FleetDivision partition key, distributing the write workload across multiple physical partitions.
Distributing the writes prevents any single partition from exceeding the 1,000 WCUs per second hard limit.
3
Enable robust retry logic in the AWS SDK client configuration.
The application retries transient failures using exponential backoff and jitter, preventing immediate client-side data loss.
Transient throttling can still occur during spikes; exponential backoff avoids overwhelming the database while ensuring all writes eventually succeed.

Anahtar Kavram

Resolving DynamoDB throttling issues requires distributing the workload evenly using partition key sharding (random suffixes) and handling client-side retries with exponential backoff and jitter.
Bu soruyu puanla