Pastebin
Share text snippets via short links — and survive the front page.
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 CDN — Serves the hottest pastes straight from the edge.
- Paste API — Looks up paste id → content and renders it.
- Hot-paste cache — Keeps popular pastes in memory so the store stays idle.
- Paste store — Source 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
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.
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