Skip to content

Driving the Design Round, Backend and Frontend ​

Run a design round as a conversation you lead, not a quiz you answer — backend or frontend.

In this chapter: what the round measures · the RADIO framework · turning a vague prompt into requirements · how the frontend round is scored differently · the failure modes

💡 The Core Idea ​

A design round has no correct answer. The interviewer already knows how to build a URL shortener. They are watching how you take a one-line prompt, give it edges, propose something that works, and argue honestly about its cost.

A candidate who says "I would shard by user ID" and stops has given an answer. A candidate who adds "that makes per-user reads one hop and global search a scatter-gather (a query sent to every shard). But search is out of scope, so I take that trade" has shown judgement.

The round measures how you narrow an open problem. Every senior signal is a form of narrowing: scoping, estimation, trade-off language, knowing when to stop.

How It Works ​

RADIO is the running order. It is not the only framework. But it guards against the two most common failures: designing before you know the requirements, and running out of time before the interesting part.

StepStands forYou produceMinutes
RRequirementsFunctional list, non-functional targets, explicit scope cuts8–10
AArchitectureA box diagram and the request path through it10–12
DData modelEntities, keys, and the store behind each6–8
IInterfaceThree or four endpoints or events, not a full API4–6
OOptimisationsBottlenecks, caching, scaling, failure handling10–15

The flow through a round:

RADIO is a running order, not a one-way street — a bottleneck found in O often sends you back to A.

R — Requirements ​

Functional — what a user can do. Keep it to three or four verbs: "post a message, read a feed, follow a user." Name anything beyond that, and cut it out loud. For example: "search and direct messages are out of scope unless you want them."

Non-functional — the qualities that change the architecture. Four matter often enough to ask about every time:

QualityThe question to askWhy it changes the design
ScaleDaily active users, requests per secondDecides single box versus fleet
LatencyWhat is the p99 target for the hot path?Decides caching and data locality
ConsistencyCan a user see stale data for five seconds?Decides replication and store choice
AvailabilityWhat happens if this is down for ten minutes?Decides redundancy and failover

Scale is the number. Get one traffic figure early and work out the rest from it. See Back-of-Envelope Estimation.

⚠️ Never invent a requirement silently. Say "I am going to assume 10 million daily active users and a 100:1 read-to-write ratio — stop me if that is wrong." An assumption you announce is a design decision. An assumption you hide is a mistake waiting to be found.

A — Architecture ​

Draw boxes in the order a request travels: client → edge → application → data. Add a box only when a requirement demands it. Every box you cannot justify is a box the interviewer will ask you to justify.

Then trace one write and one read through the diagram out loud. These are the most valuable two minutes in the round. They find missing components faster than any amount of staring at the drawing.

D — Data model ​

For each entity, give the fields that matter, the primary key, the access pattern and the store. Four columns, not a full schema.

A feed service, in the form the round actually wants:

typescript
interface Post {
  postId: string;        // Snowflake ID — sortable by time, no central counter
  authorId: string;      // partition key: all of an author's posts land together
  body: string;
  createdAt: number;
}

// Access pattern drives the key. "Show me one author's posts, newest first"
// is a single partition scan if postId sorts by time within authorId.
type PostKey = { authorId: string; postId: string };

The key is the design. Say why you chose it and which query it makes expensive.

I — Interface ​

Three or four operations. Name them, give the parameters that matter, and say whether each is synchronous. You are showing that the boxes have a contract, not writing OpenAPI.

O — Optimisations ​

This is where the senior signal lives. Work in the same order every time:

  1. Name the bottleneck. Which component saturates first at the scale you estimated?
  2. Fix it with the cheapest thing that works. Usually a cache or an async queue, not a rewrite.
  3. Say what the fix costs. A cache buys latency and pays in staleness. A queue buys throughput and pays in eventual consistency and a new failure mode.
  4. Handle one failure. Pick the component whose loss hurts most and say what happens when it dies.

When to Use It ​

SituationDo thisWhy
Prompt is one line ("design Twitter")Spend the full 10 minutes on RThe scope is the actual problem
Prompt is already scoped and detailedCompress R to 4 minutes, spend it on OThe interviewer wants depth, not scoping
Interviewer keeps adding new asksAdd each to a visible "out of scope" listProtects the time budget out loud
You are 30 minutes in and still on data modelSkip I, go straight to OO carries the most signal
The prompt is a client applicationKeep RADIO, but open the frontend boxThe frontend round scores boundaries

The Frontend Round ​

A backend round is scored on capacity — shards, queues and replicas at ten million users. A frontend round is scored on boundaries. Where did you split the components? Where does each piece of state live? What does the browser download before the page is useful? What does the user see when the network fails?

Load numbers still matter, but they decide a rendering strategy, not a shard key. The common failure is a backend round with React nouns: one box labelled "frontend" that is never opened.

RADIO still holds. The steps change what they produce:

StepIn a frontend round, you produce
RThe four constraints below, plus an LCP or interaction target
AThe four layers of the client, and a rendering strategy per route
DWhere each piece of state lives — the most valuable ten minutes
IThe API shape the client needs, the auth boundary, retries
OPerformance budgets, loading, error and empty states, accessibility

The requirements that have architectural consequences:

typescript
interface DesignConstraints {
  scale: number;                       // 10K and 10M DAU are different designs
  discoverable: boolean;               // if true, content must be in the initial HTML
  realtime: "none" | "poll" | "push";  // decides the transport and the state model
  offline: boolean;                    // decides whether writes need a queue
}

The framework, the CSS approach and the component library are preferences. Saying so is itself a signal.

In the A step, open the frontend box into four layers. Delivery: CDN, rendering strategy, cache headers. App shell: routing, error and loading boundaries. Data layer: query cache, transport, retries. Component tree: boundaries and local state. Naming them early gives the deep dive a target.

Deciding Where State Lives ​

Every piece of state has a correct home. The wrong home is where the bugs come from.

The stateLives inWhy not somewhere else
A form field's valueComponent stateLifting it re-renders the tree on every keystroke
Theme, locale, feature flagsContextRead by many, written almost never
Session, cart, open modalsA client storeOutlives the screen that created it
Anything the server ownsA query cacheIt is a copy, and copies need invalidation, not reducers
Filters, tabs, paginationThe URLOtherwise the back button and a shared link both lie

The fourth row separates senior answers. Server data in a global store is a cache someone must invalidate by hand, forever. The fifth row is the cheapest point you can score: one decision fixes deep links, the back button and refresh.

Common Mistakes ​

❌ Starting with the solution. "So we would use Kafka and Cassandra and put Redis in front." This answers a question nobody asked. It locks you into choices made before you knew the scale. ✅ Start with the shape of the load: "Is this read-heavy? At 100:1 and 10k rps, I lean on caching and read replicas, and can probably avoid sharding."

❌ Boxes with no request path. Nine components and no traced request is a picture, not a design. ✅ Trace one write and one read, always.

❌ One rendering strategy for the whole app. The catalogue page and the dashboard have opposite needs. ✅ Choose per route — see Choosing a Rendering Strategy per Route, with SEO.

❌ No error, empty or loading states. Every data-fetching design has three more screens. ✅ Name them when you draw the fetch, and mention keyboard and focus handling once, unprompted.

🔑 Key Takeaways ​

  • The round measures how you narrow an open problem, not whether you recall an architecture.
  • RADIO keeps requirements before design and leaves time for optimisations, where most of the signal is.
  • Every assumption must be said out loud, because an announced assumption is a decision and a hidden one is an error.
  • A frontend round is scored on boundaries and state placement, and four constraints move its design: scale, discoverability, real-time and offline.
  • Finish every "it depends" with the number or condition that decides it, and state the cost of every choice.

Interview Questions ​

Q: You have 45 minutes and the prompt is "design Instagram". What are the first five minutes?

Restate the product in one sentence. Agree the functional scope out loud — upload a photo, view a feed, follow a user — and name what you cut, such as stories, search and direct messages. Then ask for or assume one scale number and one consistency requirement. Nothing gets drawn yet.

Q: The interviewer says "assume whatever you like" for the scale. What do you do?

Pick a number, state it, and derive from it rather than asking again. Ten million daily active users, a 100:1 read-to-write ratio and a 3× peak multiplier suit almost any consumer product. The point is that the number is visible, so both of you design against the same target.

Q: In a frontend round, where does state go, and how do you decide?

Ask who writes it and how long it outlives the screen. A form field is local, because lifting it costs a re-render per keystroke. A cart goes in a client store, because it survives navigation. Server-owned data goes in a query cache, because it is a copy whose real problem is invalidation. Filters and tabs go in the URL, so refresh and the back button keep working.

Q: When would you not follow RADIO in order?

When the prompt already carries the requirements, or opens with a constraint like "it has to work offline". Then the interesting work is in architecture and optimisations. Compress requirements, spend the time where the signal is, and say that you are doing it.

The whole book, free to read. Generated from the manuscript on every change.

Your progress

Tick each chapter in the sidebar once you have read and understood it. Your name and email keep the ticks on any device.

Your name and email are stored to save your progress. Nothing else is done with them.