System Design Kya Hai?

What system design means, why interviews test it, and how to use this site.

Beginner5 min read
Language
Theme
UsersrequestsLoad BalancerApp Server 1App Server 2App Server NCacheRedisDatabaseQueueEvery big system = clients + routing + stateless servers + data layers
Key idea at a glance

What system design actually is

System design is the skill of planning systems that stay fast, correct and alive as they grow from 100 users to 100 million. It is not about memorizing architectures. It is about making tradeoffs deliberately: every decision (SQL or NoSQL, sync or async, cache or no cache) buys you something and costs you something. Seniors are paid to know both sides of that exchange.

A useful mental model: a system is a pipe. Requests enter from users, flow through components (load balancer, app servers, caches, databases, queues), and responses flow back. Design is deciding what each component is, how big it needs to be, and what happens when it fails.

The journey of one request (with real numbers)

Ground every design in what a request actually costs. When you open instagram.com:

  1. DNS lookup: ~20-120 ms the first time, then cached.
  2. TLS handshake: 1-2 round trips (~50-100 ms cross-country), near zero with session resumption.
  3. Load balancer: under 1 ms of added latency; picks a healthy app server.
  4. App server: your code. A cache hit from RAM (Redis) is ~0.5-1 ms network + lookup. A database read is ~1-5 ms on an SSD. A spinning-disk seek is ~10 ms. Reading 1 MB sequentially from SSD is ~1 ms; from RAM, ~0.03 ms.
  5. Queue fan-out (async): emails, notifications, analytics happen after the response, so they add 0 ms to the user.

Memorize the shape of these numbers. "RAM is ~1000x faster than disk, in-datacenter calls are sub-millisecond, cross-continent round trips are ~150 ms" is enough to do every back-of-envelope estimate in an interview.

The interview framework (works for every question)

Interviewers grade process more than the final diagram. The standard flow:

  1. Clarify requirements (3-5 min): functional (what must it do?) and non-functional (how many users? read or write heavy? how available? latency budget?). Never start drawing before this.
  2. Back-of-envelope estimates (3 min): QPS, storage, bandwidth. Example: 100M daily users, 2 actions each, 86,400 seconds in a day: 200M / 86,400 is roughly 2,300 average QPS, 10x that at peak. 1 KB per action is ~200 GB/day of new data.
  3. API + data model (5 min): the 3-5 core endpoints and tables/collections.
  4. High-level design (10 min): clients, LB, app tier, storage, cache, queue. Boxes and arrows.
  5. Deep dive (15 min): the interviewer picks the hard part (feed generation, matching, locking). This is where the other 26 lessons on this site pay off.
  6. Scale + failure modes (5 min): "what breaks first at 10x? what happens when this box dies?"

Worked example: the same question, junior vs senior

Question: "Design a URL shortener." The junior answer jumps to code: "I'll hash the URL and store it in a map." The senior answer starts with scale: "How many new URLs per day, and how many redirects? Redirects are usually 100x creations, so this is read-heavy: I'll cache hot codes, pick a key generation strategy that avoids collisions on the write path, and decide between 301 and 302 based on whether analytics matter." Same system, completely different signal.

What goes wrong in production (failure modes to name)

  • SPOFs: one LB, one DB, one queue consumer group. Every single box dies eventually; ask "and if this dies?" for each.
  • Cascading failures: one slow service makes callers time out, retry, and amplify load until everything is down. Defenses: timeouts, circuit breakers, bounded queues, load shedding.
  • Thundering herds: cache expiry or a deploy sends all traffic to the database at once.
  • Hot spots: one celebrity user, one hot partition, one hot row gets all the traffic.

Common interview traps

  • Drawing boxes before clarifying requirements and scale.
  • Using buzzwords without numbers ("we'll just add Kafka") with no idea of the data rate.
  • Designing for 1 billion users when the question said 100k, or the reverse.
  • No failure story: everything works only on the happy path.

Interview Q&A

Q: How would you approach "design Twitter" in 45 minutes?
A: Spend the first 10 on requirements and estimates (DAU, tweets/day, read:write ratio), 5 on API and data model, 10 on the high-level diagram, 15 on the one hard piece (the feed: fan-out on write vs read), 5 on scale and failure modes. Saying this plan out loud in the first minute already separates you.

Q: What matters more, consistency or availability?
A: It depends on the feature, not the system: money balances need consistency, a like counter needs availability. Good designers answer per-feature, never globally.

Key takeaways

Interview pointer

When you get any design question, spend the first 2 minutes asking about requirements: how many users, how much data, read-heavy or write-heavy, what availability is needed. Starting to draw the architecture immediately is the most common mistake.