Skip to main content
⚡ Printable 1-Page Interview Reference · 2026

System Design Cheat Sheet: Architecture & Latency Guide

The essential high-density system design cheat sheet. Master latency numbers, back-of-the-envelope capacity estimations, database selection matrices, and the 4-step interview template.

View 1-Pager Printable Layout →

1. Latency Numbers Every Programmer Should Know

Memorize orders of magnitude to justify architecture decisions (Memory vs Disk vs Network).

Operation Latency Context & Takeaway
L1 Cache Reference 0.5 ns Fastest CPU hardware cache
Branch Mispredict 5 ns CPU pipeline stall
L2 Cache Reference 7 ns 14x slower than L1
Mutex Lock / Unlock 25 ns Thread synchronization primitive
Main Memory (RAM) Access 100 ns 200x slower than L1
Compress 1 KB with Snappy 3,000 ns (3 µs) Lightweight CPU compression
Send 1 KB over 1 Gbps Network 10,000 ns (10 µs) Local network packet transit
SSD Random Read 150,000 ns (150 µs) Flash memory access
Round Trip within Same Datacenter 500,000 ns (0.5 ms) Internal VPC microservice call
HDD Disk Seek 10,000,000 ns (10 ms) Spinning mechanical arm movement
Packet Roundtrip CA to Netherlands 150,000,000 ns (150 ms) Transatlantic fiber speed of light

2. Back-of-the-Envelope Estimation Formulas

Mental shortcuts that demonstrate senior engineering instincts in under 2 minutes.

QPS from DAU Formula

QPS = (DAU * reqs_per_day) / 100,000

Use 100,000 instead of 86,400 for rapid mental math. Peak QPS = Average QPS * 2 (or 3).

Daily Storage Formula

Storage = Write_QPS * 86,400 * Size

If Write QPS = 1,000 and payload = 1 KB: 1,000 * 86,400 * 1 KB ≈ 86.4 GB/day ≈ 31.5 TB/year.

80/20 Cache Sizing Rule

RAM_Cache = 0.20 * Daily_Reads

20% of items generate 80% of reads. Keep that 20% in Redis cache cluster to achieve >95% hit rate.

Power of 2 Exact Bytes Approximate Value Symbol
2^10 1,024 1 Thousand (1 KB) Kilo
2^20 1,048,576 1 Million (1 MB) Mega
2^30 1,073,741,824 1 Billion (1 GB) Giga
2^40 1,099,511,627,776 1 Trillion (1 TB) Tera
2^50 1,125,899,906,842,624 1 Quadrillion (1 PB) Peta

3. Database & Storage Selection Cheat Sheet

Choose the right data store by query pattern and consistency requirements.

Relational (Postgres / MySQL) ACID

Best For: Transactional ledgers, user accounts, e-commerce checkouts, relational JOINs.

Scaling Strategy: Vertical scaling → Read Replicas → PgBouncer connection pooling → Citus/Vitess sharding.

Key-Value / Wide-Column (DynamoDB / Cassandra) High Write

Best For: Massive write throughput, shopping carts, session states, IoT time-series.

Scaling Strategy: Partition key distributes across hash rings. LSM-tree append-only disk storage.

In-Memory Cache (Redis / Memcached) < 1ms Read

Best For: Leaderboards (Sorted Sets), rate limiters, session stores, hot cache-aside.

Eviction Policies: allkeys-lru (Least Recently Used), volatile-lru, volatile-ttl.

Search Index (Elasticsearch / OpenSearch) Full-Text

Best For: E-commerce product search, autocomplete, fuzzy matching, log analysis.

Data Structure: Inverted index mapping word tokens to document IDs.

4. The 4-Step System Design Interview Framework

How to pace your 45-minute interview without running out of time.

Step 1: Scoping & Requirements (0–7 min) 7 mins

Agree on exactly 3 core functional user journeys. Agree on non-functional constraints: Availability (99.99%), Latency (p99 < 100ms), and Read:Write ratio.

Step 2: Back-of-the-Envelope Math (7–12 min) 5 mins

Calculate QPS (Average & Peak), Network Bandwidth (ingress/egress), Daily Storage, 5-Year Storage Capacity, and Cache RAM sizing (80/20 rule).

Step 3: High-Level Architecture (12–25 min) 13 mins

Draw macro components: Client → CDN → Load Balancer → API Gateway → Stateless Microservices → Primary/Replica DB → Redis Cache → Kafka Queue.

Step 4: Deep Dive & Bottlenecks (25–45 min) 20 mins

Pick the hardest technical component: DB sharding keys, cache invalidation race conditions, data consistency (eventual consistency), rate limiting, and failure modes (circuit breakers).

Frequently Asked Questions

What latency numbers should every engineer memorize for system design? ▼
The key latency order-of-magnitude metrics are: L1 cache read ~0.5–1 ns; RAM access ~100 ns; SSD random read ~100–150 µs; HDD random seek ~10 ms; intra-datacenter roundtrip ~0.5 ms; cross-country (US coast-to-coast) RTT ~50–150 ms.
How do you calculate QPS from Daily Active Users (DAU)? ▼
Formula: Average QPS = (DAU * Average Requests per User per Day) / 86,400. For quick mental math during interviews, divide by 100,000 instead of 86,400. Then multiply Average QPS by 2 to 3 to calculate Peak QPS.
What is the 80/20 rule for cache sizing in system design? ▼
The Pareto principle states that 20% of the data or daily requests generate 80% of total read traffic. In capacity estimations, size your in-memory cache (Redis/Memcached) to store that top 20% of hot daily read data in RAM.
When should you choose SQL vs NoSQL in system design? ▼
Choose SQL (PostgreSQL, MySQL) when you require ACID transactions, structured relational schemas, and complex JOINs (e.g. billing, banking, inventory). Choose NoSQL (DynamoDB, Cassandra) when you need horizontal sharding out of the box, massive write throughput, flexible schemas, and sub-10ms key-value lookups.
Buy me a coffee
Daily Practice
0/0