Dynamodb medium
If a table has a Global Secondary Index (GSI) with lower provisioned write capacity than the main table, what happens during a heavy write burst?
- A The GSI falls behind, but writes to the main table continue at full speed.
- B GSI Backpressure: DynamoDB will throttle writes to the main table to prevent the index from becoming inconsistent, effectively limiting the table's speed to that of the slowest GSI.
- C The GSI is automatically deleted to save resources.
- D AWS automatically doubles the GSI capacity for free during the burst.
Answer: B. GSI Backpressure: DynamoDB will throttle writes to the main table to prevent the index from becoming inconsistent, effectively limiting the table's speed to that of the slowest GSI.
A GSI update is a 'synchronous-ish' part of the write operation. To ensure index integrity, DynamoDB uses backpressure. If the GSI can't keep up with the write rate of the base table, the entire write operation is throttled. Strategic rule: GSI capacity should typically equal or exceed the base table's write capacity.
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?