DynamoDB Core
Mastering Partitions, GSIs, and DAX for Extreme Scale
01. The Ingredients
Partition Key (PK)
The internal hash function input. It determines which physical partition stores your data, ensuring uniform distribution.
Sort Key (SK)
Enables rich query capabilities. Data with the same PK is stored together, physically sorted by the SK for range queries.
RCU & WCU
Read and Write Capacity Units. The throughput “fuel” that defines how much traffic your table can handle per second.
02. The Architecture Flow
Auto-Partitioning
DynamoDB automatically splits your data across partitions as your storage grows or throughput requirements increase. Each partition is roughly 10GB or 3,000 RCUs / 1,000 WCUs.
Global Secondary Indexes
Think of GSIs as a “shadow table” that stays synced. They allow you to query your data using a completely different attribute as the primary key.
DAX Caching
DynamoDB Accelerator (DAX) is a fully managed, in-memory cache that reduces read latency from milliseconds to microseconds without requiring code changes for logic.
Eventually Consistent
By default, reads are eventually consistent (cheaper). GSIs only support eventual consistency, while the main table supports optional Strong Consistency.