The decision framework
Work through these dimensions in order during an interview:
Five selection dimensions
- Data shape — relational, document, time-series, graph, blob?
- Access pattern — primary key lookups, range scans, full-text search, aggregations?
- Scale — read/write QPS, storage growth, geographic distribution?
- Consistency — strong transactions or eventual OK?
- Operations — managed service vs self-hosted, team experience?
# Template you can sketch on a whiteboard
workload:
entities: [users, videos, view_events]
hot_query: "get feed for user_id, last 50 items"
read_write_ratio: 100:1
consistency: eventual_ok_for_feed
scale_5yr: 500M users, 10B videos
Database selection on AWS
DATABASERDS / AuroraACID · joins
DATABASEDynamoDBkey-value scale
ANALYTICSOpenSearchfull-text · autocomplete
DATABASEElastiCachesessions · rate limits
Mapping workloads to stores
| Workload | Recommended store | Why |
|---|---|---|
| User accounts, billing | Postgres / MySQL | ACID, joins, mature ecosystem |
| Session tokens, rate limits | Redis | Sub-ms latency, TTL native |
| Video files, images | S3 / GCS | Cheap durable blobs, CDN integration |
| Search autocomplete | Elasticsearch / OpenSearch | Inverted index, prefix queries |
| Billions of view events/day | Cassandra / Bigtable | Partitioned writes, TTL rows |
| Real-time analytics dashboard | ClickHouse / Druid | Columnar aggregations |
User accounts, billing
Recommended storePostgres / MySQLWhyACID, joins, mature ecosystemSession tokens, rate limits
Recommended storeRedisWhySub-ms latency, TTL nativeVideo files, images
Recommended storeS3 / GCSWhyCheap durable blobs, CDN integrationSearch autocomplete
Recommended storeElasticsearch / OpenSearchWhyInverted index, prefix queriesBillions of view events/day
Recommended storeCassandra / BigtableWhyPartitioned writes, TTL rowsReal-time analytics dashboard
Recommended storeClickHouse / DruidWhyColumnar aggregations
Managed vs self-hosted
| Aspect | Managed (RDS, DynamoDB, Atlas) | Self-hosted (Postgres on EC2, Cassandra cluster) |
|---|---|---|
| Ops burden | Backups, patches, failover automated | Your team owns everything |
| Cost at small scale | Higher per GB-hour | Cheaper if you have DBAs |
| Scaling | Click to resize or on-demand | Manual sharding, tuning |
| Interview default | Prefer unless specific reason not to | Only with strong justification |
Ops burden
Managed (RDS, DynamoDB, Atlas)Backups, patches, failover automatedSelf-hosted (Postgres on EC2, Cassandra cluster)Your team owns everythingCost at small scale
Managed (RDS, DynamoDB, Atlas)Higher per GB-hourSelf-hosted (Postgres on EC2, Cassandra cluster)Cheaper if you have DBAsScaling
Managed (RDS, DynamoDB, Atlas)Click to resize or on-demandSelf-hosted (Postgres on EC2, Cassandra cluster)Manual sharding, tuningInterview default
Managed (RDS, DynamoDB, Atlas)Prefer unless specific reason not toSelf-hosted (Postgres on EC2, Cassandra cluster)Only with strong justification
The rest of this guide is part of Pro
Free covers every fresher guide in full. Pro unlocks Senior, Staff and Architect guides across every track.
Still to come · 4 sections
- StreamHub selection walkthrough
- Questions to ask before committing
- Anti-patterns to avoid
- Evolution over time
Test yourself
Answer these before moving on — recall is what makes it stick.