SproutStackSproutStack home

What is System Design?

6 min readBeginner-friendlyFree to read

Read a little, play a little. No scary maths, and no rush.

Share:

From laptop to millions

Your side project runs on one laptop: app, database, everything. Then a million users arrive and the laptop melts. System design is the discipline of arranging many machines so the product survives — and every arrangement is a tradeoff, never a perfect answer. Interviews don't grade your final diagram; they grade how you reason about tradeoffs aloud.

The 5-step framework (memorize this)

  1. Clarify: how many users? Reads or writes heavier? How fast must it feel? Never skip this — designing the wrong system flawlessly still fails.
  2. Estimate: 1M requests/day ≈ 12 per second; 1B ≈ 12,000/sec. A few numbers size every later choice.
  3. API + flow: sketch the endpoints and draw boxes-and-arrows for one request's journey.
  4. Data: SQL or NoSQL? What gets cached? Any queues for slow work?
  5. Scale: load balancer, replicas, sharding, and "what breaks first?"

The framework on a real prompt

"Design a photo-sharing app." Here is a compressed walk through all five steps.

  1. Clarify. Ten million users; people view far more photos than they post; the feed should load in under a second; photos must never be lost. That last point is a durability requirement, and it shapes the storage choice.
  2. Estimate. If users post 1 million photos a day, that is about 12 uploads per second. At 2 MB each, storage grows by roughly 2 TB a day. If feeds are viewed 100 million times a day, that is about 1,200 reads per second. Reads dominate.
  3. API and flow. POST /photos uploads; GET /feed returns recent photos from followed accounts. An upload stores the file, records its metadata, and returns.
  4. Data. Photo files go to object storage, built for huge numbers of large files. Metadata (owner, caption, time) goes in a database. A CDN serves the images, and feeds are cached because they are read constantly.
  5. Scale. Stateless app servers behind a load balancer, database read replicas for the read-heavy load, and a look at what breaks first: probably feed generation for accounts that follow thousands of others.
imagesAPIuploadon missPhone appCDNserves imagesLoad balancerApp serversstatelessObject storagephoto filesDatabasemetadata, replicasCachefeeds
Files go to object storage behind a CDN, metadata to a database with replicas, and feeds to a cache, behind stateless app servers.

Two kinds of requirements

Functional requirements say what the system does: upload a photo, view a feed, follow a user. Non-functional requirements say how well it must do it: how fast, how available, how durable, how consistent. Beginners list the first kind and forget the second, yet the second kind decides almost every architecture choice. "Must load in under a second" and "must never lose a photo" lead to very different designs from "best effort."

Two sentences that carry interviews

  • "If it's read-heavy, I'll cache; if write-heavy, I'll shard." One line that proves you see the fundamental split.
  • "There's no single point of failure here because…" — a SPOF is any one box whose death kills the system. Your job is to hunt them (one database? one server?) and kill them first with replicas and load balancers.

No perfect design exists — only tradeoffs stated clearly. Say yours out loud.

Mistakes that sink design interviews

  • Naming technologies before understanding the problem. "I'd use Kafka" in the first minute signals pattern-matching, not thinking.
  • Designing for the wrong scale. A sharded, multi-region system for a thousand users is as much a mistake as one server for a billion.
  • Never stating a tradeoff. Every choice gives something up. Saying what is the clearest signal of experience.

Remember this

  • Framework first: clarify → estimate → API → data → scale.
  • Every choice costs something; name the cost and you sound senior.

Check your understanding

5 questions · first-try answers earn the most XP

1. Why does the framework insist you clarify requirements before estimating anything?
2. What is a single point of failure in a system diagram?
3. Why are interviewers grading your reasoning rather than your final diagram?
4. Which sentence most directly demonstrates the core tradeoff an interviewer is listening for?
5. What does the framework's final step, "what breaks first?", actually get you?

My notes

Saved in this browser. Highlight a line above and save it, or write it in your own words.

Nothing saved yet. Your highlights will live here.

References

Finished reading?

Ticking it here also ticks the chapter in the sidebar, the section count and your streak — it is all one number.

Related chapters

Spotted a mistake or want a topic covered? Report an issue

📬 An occasional email when new lessons land

New lessons and showdowns, no more than a few times a month. No spam, unsubscribe anytime. We store your email only to send the newsletter.