▣datahall
← back to gallery
serverProprietary (AWS-managed)est. 2012Proprietary (managed service)

Amazon DynamoDB

Serverless key-value at any scale: partition-key routing, quorum replication, single-digit ms.

DynamoDB is AWS managed key-value and document storage. Tables are hashed across partitions by a partition key, optionally ordered by a sort key; every item is replicated three times across availability zones with quorum agreement. Access is operations, not queries: GetItem, PutItem, Query by key — with GSIs for alternate access paths.

Model
partition key + sort key items
Access
GetItem / Query / Scan ops
Replication
3 AZs, quorum writes
Scale
serverless, on-demand capacity

Partition-key routing

The partition key hashes to a physical storage partition; the sort key orders items inside it. Table design IS access design — the key schema determines what you can fetch in O(1).

GSIs for alternate paths

Global secondary indexes replicate the table under a different key schema, maintained asynchronously — extra access patterns at extra write cost.

Quorum consistency

Writes acknowledge at quorum; eventually consistent reads may see stale values, strongly consistent reads always read the quorum leader.

Streams and triggers

DynamoDB Streams publishes item-change events in order per key — feeding analytics, replicas in other tables, and event-driven architectures.

Access patterns are the schema

DynamoDB inverts relational design: you enumerate the queries first, then design tables so each query is a direct key lookup. The partition key spreads load across storage partitions — a hot partition key throttles, no matter the table size.

The single-table design pattern packs multiple entity types into one table using overlapping key schemas — powerful and famously easy to get wrong.

              GetItem:
  Table: orders
  Key: { customer_id: "c-42", order_ts: 1699999999 }
  → one item, O(1), single-digit ms
            

Capacity, throttling, and cost

Provisioned or on-demand capacity units meter reads and writes; exceeding partition throughput throws throttling errors rather than queuing. Cost scales with throughput and storage — predictable if your access patterns are uniform, expensive if they spike.

Diagrams

pipelineWrite path: request → router → partition → quorum replication → storageclick nodes for description
stage 1executionplaceholderstage 2storageplaceholdermode: write

[caption] The 2012 DynamoDB paper (Sivasubramanian) describes this design publicly.

A write routes by partition-key hash to one partition leader, replicates to two bystander replicas across AZs, and acknowledges at quorum into log-structured storage.

index-statsPartition and GSI shapeclick nodes for description

Base table partitions vs a global secondary index projection — the GSI duplicates chosen attributes under an alternate key.

L0
8 nodes
L1
8 nodes · ×120
L2
960 nodes
Cardinality
115.0k
distinct indexed values
Selectivity
30.0%
fraction of rows matching a predicate

[caption] Illustrative: 8 partitions, one GSI projecting an alternate access path. Hot partitions throttle independently of table size.

Base table partitions vs a global secondary index projection — the GSI duplicates chosen attributes under an alternate key.