Skip to main content
Back to track
Backend Engineer

System design

8 classic design questions, each answered with the same framework: requirements, architecture, data model, API and deep dives. Try sketching your own design before reading the answer.

01

Design a URL shortener (like bit.ly)

MediumHashingKey generationCachingRead-heavy

Design a URL shortener like bit.ly or TinyURL: users submit a long URL and get a short link such as https://sho.rt/aZ3kQ9x; anyone opening the short link is redirected to the original URL.

A typical framing: "100 million new links per month, and reads outnumber writes 100 to 1. Redirects must be fast everywhere in the world. Links can have a custom alias and an expiry, and we want click analytics."

02

Design a notification system (push, email, SMS)

MediumMessage queueRetriesPushFan-out

Design a notification system that sends push notifications, emails and SMS on behalf of many internal services: order updates, security alerts, marketing campaigns and reminders.

A typical framing: "Any team should be able to send a notification with one API call. Users choose which notifications they get on which channel. We send about 50 million notifications a day, with campaign spikes to millions within minutes. Critical ones like password resets must arrive fast; nobody should get the same notification twice."

03

Design a web crawler

MediumURL frontierPolitenessDeduplicationDistributed workers

Design a web crawler that downloads billions of web pages, for example to build a search engine index or a dataset: start from seed URLs, fetch pages, extract links, and keep going.

A typical framing: "Crawl 1 billion pages a month, keep popular pages fresh, never overload any website, and don't waste effort on duplicates or crawler traps."

04

Design the backend of a news feed (like X or Instagram)

HardFan-outTimeline cacheRankingCelebrities

Design the backend of a news feed like X (Twitter) or Instagram: users follow other users, post content, and open a home timeline showing recent posts from the people they follow, newest or most relevant first.

A typical framing: "300 million daily active users, each opening their feed about 10 times a day. Users post a few times a day on average, but some accounts have 100 million followers. The feed should load in under 200 ms."

05

Design the backend of a chat system (like WhatsApp)

HardWebSocketsMessage orderingPresenceGroup chat

Design the backend of a chat system like WhatsApp or Messenger: one-on-one and group conversations, real-time delivery, delivery and read receipts, online presence, and message history across devices.

A typical framing: "500 million daily active users, each sending about 40 messages a day. Messages must arrive instantly when the recipient is online, and be waiting for them when they come back. Groups have up to 500 members. Users have a phone and a laptop."

06

Design a video streaming platform (like YouTube)

HardTranscodingCDNAdaptive bitrateObject storage

Design a video streaming platform like YouTube: creators upload videos, the platform processes them, and viewers around the world watch them smoothly on any device and network.

A typical framing: "Creators upload 500 hours of video every minute. Viewers watch a billion hours a day on phones, TVs and laptops, on everything from fiber to weak mobile networks. Playback should start fast and rarely buffer."

07

Design a file storage and sync service (like Dropbox)

HardChunkingSyncDeduplicationConflicts

Design a file storage and sync service like Dropbox or Google Drive: users keep a folder in sync across their laptop, phone and the web, share files with others, and recover old versions.

A typical framing: "50 million daily active users, each with a few thousand files. Files range from tiny text files to 10 GB videos. Edits on one device should show up on the others within seconds, work offline, and never silently lose someone's changes."

08

Design a ride-sharing service (like Uber)

HardGeospatial indexMatchingLocation updatesConsistency

Design a ride-sharing service like Uber or Lyft: riders request a ride, the system finds a nearby available driver, both see each other's live location, and the trip is priced and paid at the end.

A typical framing: "10 million rides a day across many cities. Drivers send their location every few seconds. A rider should be matched within seconds, a driver must never get two rides at once, and the system must handle rush hour and big events."