Dynamodb medium
What is a major structural constraint of a Local Secondary Index (LSI) that makes GSIs more common in production architectures?
- A LSIs do not support strong consistency for read operations.
- B Immutability and Coupling: LSIs can ONLY be created at table creation and enforce a 10GB 'Item Collection' limit on any single partition key. GSIs can be added anytime and have no collection size limits.
- C LSIs require the data to be stored on encrypted EBS volumes only.
- D An LSI cannot index any attribute that is a string.
Answer: B. Immutability and Coupling: LSIs can ONLY be created at table creation and enforce a 10GB 'Item Collection' limit on any single partition key. GSIs can be added anytime and have no collection size limits.
LSIs are physically stored within the same partition as the base data to allow for 'Strongly Consistent' reads on the index. This tight coupling means they share the 10GB partition ceiling. GSIs are separate data structures that replicate data asynchronously, offering far more flexibility and scale.
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?