Introduction to System Design

What system design is, the building blocks of large systems, functional vs non-functional requirements, and a repeatable framework for system design interviews.

Beginner 3 min readLesson 1 of 20

System design is deciding how the parts of a software system fit together so it meets its requirements: serving millions of users, staying up when machines fail, responding fast, and remaining affordable and maintainable. There's rarely one right answer. The skill is understanding the trade-offs and choosing deliberately.

The building blocks

Almost every large system is assembled from the same parts:

Clientsweb · mobileDNSCDNLoad balancerApp serversstatelessCacheRedisQueueKafka / SQSDatabaseprimary + replicasWorkersObject storageS3
BlockPurposeLesson
DNS, CDNRoute users; serve static and cacheable content near themCDN
Load balancerSpread traffic across servers; remove unhealthy onesLoad balancing
Stateless app serversBusiness logic; scale by adding moreScalability basics
CacheServe hot data from memoryCaching
DatabaseDurable source of truthDatabase scaling
Queue + workersAsync and background processing; absorb spikesMessage queues
Object storageFiles, images, video, backups—
ObservabilityMetrics, logs, traces, alertsObservability

Requirements: functional and non-functional

  • Functional — what the system does: "users can shorten a URL", "users see a feed of people they follow".
  • Non-functional — how well it does it. These drive the architecture:
QualityQuestionTypical target
ScaleHow many users, requests per second, how much data?10M daily users, 5k QPS
LatencyHow fast must it respond?p99 under 200 ms
AvailabilityHow much downtime is acceptable?99.9% (8.8 h/year) – 99.99% (53 min/year)
ConsistencyMust every read see the latest write?Strong for payments; eventual for likes
DurabilityCan we ever lose data?Never for orders; acceptable for view counts
Cost, security, complianceBudget, data residency, privacy—

A framework for system design interviews

  1. Clarify requirements (5 min). Ask about features, users, scale, read/write ratio, latency and consistency needs. Agree on what's in and out of scope.
  2. Estimate (5 min). Requests per second, storage, bandwidth (Back-of-the-envelope). Numbers tell you whether one database suffices or you need sharding.
  3. Define the API and data model (5 min). Key endpoints, main entities and how they're accessed.
  4. High-level design (10 min). Draw the boxes and arrows for the main flows (write path and read path) end to end.
  5. Deep dives (15 min). Pick the hardest parts — the bottlenecks, scaling the database, caching strategy, consistency, failure handling — and go deep with trade-offs.
  6. Wrap up (5 min). Bottlenecks, single points of failure, monitoring, and what you'd do next.

Core trade-offs you'll meet again and again

Trade-offExample
Consistency vs availabilityDuring a network partition, refuse writes or accept possibly conflicting ones (CAP)
Latency vs consistencyRead from a nearby replica (fast, maybe stale) or the leader (slow, fresh)
Latency vs throughputBatching improves throughput but delays individual items
Normalisation vs denormalisationFewer duplicates vs faster reads
SQL vs NoSQLRich queries and transactions vs simple scale-out
Push vs pullPrecompute feeds on write vs assemble them on read
Sync vs asyncSimple and immediate vs decoupled and resilient
Build vs buyControl vs time to market

Case studies in this track

Practise the framework end to end: URL shortener, chat system, news feed, video streaming, and distributed cache.

Key takeaways
  • System design composes standard blocks: DNS, CDN, load balancers, stateless servers, caches, databases, queues, object storage.
  • Non-functional requirements (scale, latency, availability, consistency) drive the architecture.
  • Interview framework: requirements → estimates → API/data → high-level design → deep dives → wrap-up.
  • Always state the trade-offs behind each choice.