Dynamodb easy
By default, a DynamoDB Read provides 'Eventual Consistency'. What is the primary architectural trade-off of this default behavior?
- A It guarantees that the latest write is always returned, but it costs 2x the RCU budget.
- B It offers the highest read throughput and lowest cost (0.5 RCU per 4KB), with the slight risk that the read might return stale data if a write just occurred.
- C It automatically encrypts the data during transit to the client.
- D It forces the query to use the Sort Key instead of the Partition Key.
Answer: B. It offers the highest read throughput and lowest cost (0.5 RCU per 4KB), with the slight risk that the read might return stale data if a write just occurred.
DynamoDB replicates data across 3 nodes. An eventually consistent read only queries 1 node, saving resources. A 'Strongly Consistent' read queries multiple nodes to ensure the latest version (quorum), which doubles the RCU cost for the same amount of data.
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?