Dynamodb medium
An application uses a single constant value (e.g., `PartitionKey='ACTIVE_ORDERS'`) for all entries in a high-traffic table. What is the fundamental scalability failure of this design?
- A The table will exceed the 100GB storage limit for a single partition key.
- B Hot Partitioning: Since DynamoDB hashes the Partition Key to find a physical node, all traffic will hit the exact same server, limiting the table's total throughput to the capacity of a single machine (e.g., 1000 WCU or 3000 RCU).
- C DynamoDB will automatically change the Partition Key to a random string to protect the cluster.
- D The Sort Key will be disabled if the Partition Key is constant.
Answer: B. Hot Partitioning: Since DynamoDB hashes the Partition Key to find a physical node, all traffic will hit the exact same server, limiting the table's total throughput to the capacity of a single machine (e.g., 1000 WCU or 3000 RCU).
Scalability in DynamoDB is achieved by spreading data across many physical nodes. By using a 'Static' Partition Key, you effectively turn a distributed system into a single-node system. To fix this, you should incorporate high-cardinality attributes (like OrderID) into the Partition Key to ensure traffic is distributed evenly.
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?