System Design Fundamentals

System Design Framework

4 min read

System design interviews test your ability to design large-scale systems. Unlike coding rounds, there's no single correct answer -- interviewers evaluate your thought process, trade-off analysis, and communication.

The 4-Step Framework

Use this structure for every system design interview:

Step 1: Clarify Requirements (5 minutes)

Ask questions to narrow scope. Split into:

Functional Requirements (what the system does):

  • What are the core features?
  • Who are the users?
  • What are the main use cases?

Non-Functional Requirements (how the system performs):

  • How many users? (scale)
  • What latency is acceptable?
  • Is consistency or availability more important?
  • What's the read-to-write ratio?

Example: "Design a URL shortener"

  • Functional: Create short URL, redirect to long URL, optional custom aliases
  • Non-functional: 100M URLs/month, <100ms redirect latency, 99.9% availability

Step 2: Back-of-Envelope Estimation (5 minutes)

Quick math to understand scale:

URL Shortener estimates:
- 100M new URLs/month = ~40 URLs/second (write)
- Read:Write ratio = 100:1 → 4,000 reads/second
- Storage: 100M × 500 bytes = 50 GB/month
- 5 years: 50 GB × 60 = 3 TB total
- Bandwidth: 4,000 × 500 bytes = 2 MB/s

Key Formulas:

  • QPS (Queries Per Second) = Total requests / Seconds in period
  • Storage = Records × Average record size
  • Bandwidth = QPS × Average response size

Step 3: High-Level Design (10-15 minutes)

Draw the main components and their interactions:

Client → Load Balancer → API Servers → Database
                              Cache (Redis)

For the URL shortener:

  1. API Layer: POST /shorten (create), GET /:code (redirect)
  2. ID Generation: Base62 encoding or hash-based
  3. Storage: Database for URL mappings
  4. Cache: Redis for hot URLs (most URLs follow power-law distribution)

Step 4: Deep Dive (15-20 minutes)

The interviewer picks areas to explore. Be ready to discuss:

  • Database choice and schema
  • Caching strategy
  • Handling edge cases
  • Scaling bottlenecks

CAP Theorem

In a distributed system, you can only guarantee two of three:

PropertyMeaningExample
ConsistencyEvery read returns the latest writeBanking transactions
AvailabilityEvery request gets a responseSocial media feeds
Partition ToleranceSystem works despite network failuresAny distributed system

In practice: Network partitions are unavoidable, so the real choice is between CP (consistent but may be unavailable) and AP (available but may serve stale data).

PACELC Theorem

An extension of CAP: even without partitions, there's a trade-off between Latency and Consistency.

SystemDuring PartitionNormal Operation
DynamoDBAP (available)EL (low latency)
PostgreSQLCP (consistent)EC (consistent)
CassandraAP (available)EL (tunable)

Next, let's cover the core building blocks that appear in every system design. :::

Quiz

Module 4 Quiz: System Design Fundamentals

Take Quiz
FREE WEEKLY NEWSLETTER

Stay on the Nerd Track

One email per week — courses, deep dives, tools, and AI experiments.

No spam. Unsubscribe anytime.