← All components
Databases & search
Key-value / document DB
Horizontally scalable store for high-volume lookups by key.
When to use
- Sessions, carts, metadata, profiles
- Predictable single-digit-ms reads at any scale
Pitfalls
- Model around access patterns up front; ad-hoc queries are hard
Options by provider
The first option is what diagrams show for that provider.
Amazon Web Services
- Amazon DynamoDBManaged
Google Cloud
- FirestoreManaged
Microsoft Azure
- Azure Cosmos DBManaged
Open source / self-hosted
- MongoDBSelf-hosted
- CouchDBSelf-hosted
Related concepts
Used in
- Amazon
- Product catalogue — All product data
- Carts — One document per user
- URL shortener
- Link store — All short-key mappings
- Search autocomplete
- Trie shards — Serialised tries, sharded by prefix range
- Web crawler
- Content fingerprints — Detects duplicate content
- Pastebin
- Paste metadata — key → content location and expiry
- WebSockets at scale
- Pending events — Events for offline users