Catalog My learning Blog
System Design Interview Prep: Framework and Questions · Phase 1 · Lesson 4 · 5 min read

High-Level Design and Trade-offs in Interviews

On this page
  1. How to approach high-level design: start simple, grow on evidence
  2. Before the boxes: the API and the core entities
  3. Worked example: designing Pastebin in three versions
  4. How to explain a trade-off in an interview
  5. Failure questions: what happens when a component dies
  6. Check yourself

How to approach high-level design: start simple, grow on evidence

The common mistake in this stage is drawing the "complete" architecture from memory: load balancers, three caches, Kafka, microservices, sharded databases. It looks impressive and invites the question you can't answer well: "Why do you need that?"

The stronger approach takes three moves:

  1. Draw the baseline. Client, load balancer, a stateless API tier, one database. For many requirements this is already a complete system.
  2. Trace real requests through it. One read, one write, end to end, including what happens if the write fails halfway.
  3. Grow on evidence. Name the bottleneck the baseline hits at your estimated scale, then add the one component that fixes it. Repeat.

Each addition then comes with its reason attached, which is exactly what the interviewer is scoring.

Before the boxes: the API and the core entities

Spend one minute before the diagram writing down the main API calls and the core entities. For the Pastebin below that's two calls, POST /pastes returning an id and a link, and GET /pastes/{id} returning the content, plus one entity: a paste with an id, content and creation time. It gives the interviewer something concrete to check against the requirements, and it makes your request traces precise: you're tracing a named call, not "the user does something".

Worked example: designing Pastebin in three versions

Requirements: users paste text and get a short link; anyone with the link can read it; reads far outnumber writes; reads should be fast; losing a paste is bad but not catastrophic.

Version 1: the baseline. A stateless API behind a load balancer, one relational database with a table of paste id, content and created time. Trace a write: the API generates an id, inserts the row, returns the link. Trace a read: look up by id, return the content. Complete and correct for modest traffic.

Version 2: reads outgrow the database. Your estimate says several thousand reads per second at peak, more than you'd want on one database. Pastes never change once created, so caching them is trivial: there's nothing to invalidate. Add an in-memory cache in front of the database for reads. One component, two reasons: the read number and the immutable data.

Version 3: users are global. Readers in Asia see slow page loads from a US-only service. Add a CDN in front of the read path and read replicas in other regions.

VersionTriggerAdded
1RequirementsLoad balancer, stateless API, one relational database
2Read QPS beyond one database's comfortCache in front of the database
3Global users, cross-region latencyCDN and regional read replicas
Begin with a stateless API, a load balancer and one relational database, and trace one read and one write. Add a cache only when the read estimate exceeds what one database handles comfortably, a CDN and regions when global latency shows up, and shards or queues when writes require them.
Begin with a stateless API, a load balancer and one relational database, and trace one read and one write. Add a cache only when the read estimate exceeds what one database handles comfortably, a CDN and regions when global latency shows up, and shards or queues when writes require them.

How to explain a trade-off in an interview

There's no code in an interview, but there is a phrasing pattern worth practicing until it's automatic:

Code
"I'll use <choice> because <requirement or number>.
 The cost is <downside>, which is acceptable here because <reason>.
 If <condition changes>, I'd switch to <alternative>."

For example: "I'll use a single PostgreSQL primary because writes are about 40 per second. The cost is a single write bottleneck, which is fine at this scale. If writes grow past a few thousand per second, I'd shard by user id."

The common trade-offs come up again and again: relational or NoSQL storage, strong or eventual consistency, synchronous calls or a queue, one service or several. The System Design Roadmap course covers each in depth: SQL vs NoSQL, consistency models, message queues and sharding. Here the skill is choosing quickly and saying why.

Failure questions: what happens when a component dies

Interviewers probe the design by breaking parts of it. Have an answer ready for the most important component, usually the data store, before they ask:

  • The database primary dies. A replica is promoted; writes fail for seconds; recent writes may be lost if replication is asynchronous.
  • The cache dies. Reads fall through to the database. Can it survive the full load, or do you need protection against a stampede?
  • One API server dies. The load balancer's health checks remove it. That's why the API tier is stateless.

Raising one of these yourself, before being asked, signals that you think about failure, not just the happy path.

Check yourself

Honestly, it isn't needed at that scale; one database handles it easily. Remove it and note it as the first addition if reads grow by a couple of orders of magnitude.

Walking one request through the simplest design proves the baseline actually works, and checking each step against your estimates shows exactly where it would break. Then every component you add, such as a cache or a queue, fixes a bottleneck you can point to, instead of decorating the diagram.

What you chose and why it fits the requirements; what it costs and why that cost is acceptable here; and what would make you change your mind, such as a different traffic level or consistency need. That last part shows the interviewer you understand the decision rather than reciting a pattern.

The API, meaning the main operations and their inputs and outputs, and the core entities with their key fields. They anchor the design, reveal the read and write paths, and give the interviewer a concrete thing to react to.

Say how the failure is detected, what users see during it, how the system recovers, and what data might be lost. For example: the cache node dies, requests fall through to the database at higher latency, and consistent hashing limits how many keys move.