Dynamodb medium
When using `TransactWriteItems` to update multiple items atomically, what is the 'Capacity' cost penalty compared to individual `UpdateItem` calls?
- A There is no extra cost; transactions are natively supported in the kernel.
- B Double Consumption: Each item in the transaction is charged at 2x the standard RCU/WCU cost due to the internal two-phase commit overhead (Prepare and Commit).
- C Transactions are only allowed if you pay for the 'Enterprise Support' plan.
- D A fixed fee of $1.00 is charged for every transaction execution.
Answer: B. Double Consumption: Each item in the transaction is charged at 2x the standard RCU/WCU cost due to the internal two-phase commit overhead (Prepare and Commit).
Atomicity across multiple rows is expensive in a distributed system. DynamoDB must perform more work to ensure 'All or Nothing' writes. Because it coordinates across partitions and verifies state before committing, AWS charges double the WCU for every byte written in a transaction.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- DynamoDB has a strict 400KB limit on the size of a single item. What is the recommended design pattern if you need to store larger documents (e.g., 5MB PDFs)?
- What is the primary role of the 'Partition Key' in ensuring DynamoDB's infinite horizontal scalability?
- Why is the `Query` operation generally preferred over `Scan` for production workloads in DynamoDB?
- DynamoDB is a 'fully managed' serverless database. What is a primary operational benefit of this model for an engineering team?
- In 'Provisioned Capacity' mode, how is the performance budget of a DynamoDB table defined?
- When would an architect choose to implement DAX (DynamoDB Accelerator) in front of an existing DynamoDB table?