SD
System Design Textbook INTERVIEW CHEATSHEET & TRADE-OFF MATRIX
CHEATSHEET

System Design Interview Master Cheatsheet

Rules of thumb, back-of-the-envelope estimation formulas, database selection matrices, and architectural trade-off comparisons.

1. Power of Two & Back-of-the-Envelope Conversions

1 Million (10⁶)
100 KB = 100 GB
1 MB = 1 TB
1 Billion (10⁹)
1 KB = 1 TB
100 KB = 100 TB
1 Day in Sec
86,400 ≈ 10⁵ sec
QPS to DAU Rule
1,000 QPS = ~86M daily ops

2. Database Storage Selection Matrix

Use Case Requirement Recommended Storage Engine Example Systems
Complex Relational Join + ACIDB+ Tree Relational RDBMSPostgreSQL, MySQL
Ultra-High Write Ingestion & Time-SeriesLSM-Tree Append LogCassandra, ScyllaDB, RocksDB
Sub-millisecond Read CachingIn-Memory Key-Value StoreRedis, Memcached
Unstructured JSON Document FlexibilityDocument StoreMongoDB, Couchbase
Highly Connected Social GraphsGraph DatabaseNeo4j, AWS Neptune
Vector Similarity Search / LLM EmbeddingsHNSW / IVF Index Vector DBpgvector, Pinecone, Milvus

3. Architectural Trade-off Matrix

Push vs Pull (Event Streaming)

Push (WebSockets / Server-Sent Events): Low latency, real-time, but risk of overwhelming slow consumers if backpressure is missing.

Pull (Kafka / Polling): Consumers control batch size & processing rate (natural backpressure), but introduces slight polling latency.

Cache Patterns: Cache-Aside vs Write-Through

Cache-Aside: App reads cache; on miss, reads DB and populates cache. Resilient to cache failure, but risk of dirty data.

Write-Through: App writes to cache, cache writes synchronously to DB. Ensures consistency, but increases write latency.