All problems

Pastebin

Share text snippets via short links — and survive the front page.

easy~12 min Pro Simulator · +80 ptsTheory +35 pts
The build

Keep paste reads instant and always-on while one snippet hits the front page and the store blips.

Sharing text snippets is a read-heavy business — a popular paste gets read thousands of times for every write. The read path must be served from the edge and an in-memory cache, because the moment a link aggregator features a paste, the store cannot be the thing every request touches.

Components in play

  • Edge CDNServes the hottest pastes straight from the edge.
  • Paste APILooks up paste id → content and renders it.
  • Hot-paste cacheKeeps popular pastes in memory so the store stays idle.
  • Paste storeSource of truth for paste id → content.

Graded on these SLOs

  • ≥ 99.00%Reads succeed
  • ≤ 100 msRead p99
  • ≥ 5.0k rpsSustain the reads
  • ≤ 85%Headroom
  • ≤ 6Lean footprint
Base 5,000 rps45s run 3 scripted failures

The brief

Design a service like Pastebin. Users paste a text snippet and get a short link; anyone with the link can read it. Reads dwarf writes — a popular paste is read thousands of times for every paste created — so the read path has to be cheap, cached, and indifferent to the store having a bad minute.

Functional

  • Create a paste and get back a short link
  • Read a paste by its link
  • Optional expiry (delete after N days / one view)

Non-functional

  • Read-heavy (~100:1) — reads must be low-latency
  • High availability on the read path — a dead link is a dead product
  • Pastes can be large (up to ~1 MB of text)

Warm-up: design decisions

Optional theory to prime the calls a senior engineer would make before you build.

Pro

Solving is a Pro feature

Unlock the on-canvas AI design coach, per-run design reviews, the chaos simulator and all 12 problems for $15/month.

  • AI design coach on your canvas — pins failure points & over-engineering
  • Honest AI design review on every run
  • All 12 problems + unlimited chaos simulator
  • Points, levels & leaderboard
Get started