</> MAANG.io
system design · 301

Advanced

Master system design interviews with scalable architecture patterns, distributed systems, and real-world design challenges.

0/480 solved 0% complete

Section 1: The Problem Everyone Thinks They've Solved - Problem Understanding & Clarifications

Executive Summary: This section covers the opening minutes of a Staff/Principal interview on the most-memorized prompt in system design: the URL shortener. We look at why interviewers still ask it, the two ways candidates fail it, and how to break the sentence into what, who, why and how. Then we run a short clarification exchange where every answer either removes something from the design or adds something to it. By the end you'll have a written list of assumptions and the insight that drives the rest of the module: a URL shortener is two systems under one name, a small write path and a very large read path.

The interviewer reads you one sentence:

"Design a URL shortening service like TinyURL: given a long URL, return a short link; anyone who opens the short link is redirected to the original."

You've seen this before. So has every other candidate this week. That's exactly why it's still asked. A memorized answer sounds fluent for about four minutes, then it hits its first follow-up — "why seven characters?", "why a 302?", "what happens when one link gets ten million clicks?" — and breaks, because it was recalled rather than worked out. The interviewer doesn't care whether you know the answer. They want to see whether you can derive it.

Candidates fail this prompt in two opposite ways:

Failure mode What it sounds like Why it loses points
The Recital "Hash the URL with MD5, take the first 7 characters, store it in a database, done." No numbers, no questions, no trade-offs. It's a blog post read aloud, and it can't survive a single why.
The Citadel "Kafka on the create path, a globally consistent database, a microservice per feature, a dedicated key-generation cluster..." It looks impressive, but nothing has been sized. The machinery came before anyone did the arithmetic, so none of it is justified.

Key Insight: Because the prompt is familiar, you can't impress anyone with what you know. The only thing left to judge is your process: which questions you ask, which numbers you derive, and which machinery you decide to leave out.

Decomposing the Sentence

Before asking anything, map the territory out loud. It takes thirty seconds, and it fixes the scope you and the interviewer are both working from.

  • What it does: The prompt has two verbs, shorten and redirect. A third verb is implied: manage (list or disable your links). Three operations, and two of them are central.
  • Who uses it: Two very different groups. Creators are authenticated: signed-in users and API customers, such as marketing tools minting links in bulk. Clickers are anonymous, unauthenticated, and far more numerous. Anyone on the internet can open a short link.
  • Why it exists: Sharing in tight spaces (SMS, printed flyers, social posts), tracking marketing campaigns, and QR codes. The QR-code case matters a lot: once a code is printed on a poster, the link has to keep working for years.
  • How it's used: Mostly someone taps a link in a browser and waits. A human is watching a blank tab, so redirect latency is something users actually feel.

The prompt "Design a URL shortener" decomposed into what (shorten, redirect, manage), who (few authenticated creators, millions of anonymous clickers), why (sharing, campaigns, QR codes, so printed links must work for years) and how (a human clicking in a browser, so latency is felt on every click)

Sign in to continue reading

The rest of this lesson is available with a free account. Signing in with Google or Microsoft is free.

Sign in to read the full lesson

Sign in to MAANG.io

Use your Google or Microsoft account — no password to remember.

Continue with Google Continue with Microsoft

Please accept the terms above to continue.