Paste And Forget
Design a pastebin. A user pastes text, gets back a short unguessable URL, and anyone holding that URL can read the paste until it expires.
Requirements
Functional: create a paste of up to 10MB of arbitrary UTF-8 text; return a short URL that cannot be guessed or enumerated; pick a lifetime at creation (10 minutes, 1 day, 30 days, or never); optionally protect a paste with a password; syntax highlighting chosen at creation or detected at read time; the creator can delete a paste early.
Non-functional: reads dominate writes and a body never changes after creation; expired or deleted content must stop being readable within 60 seconds, including through any cache; p99 read latency under 150ms for bodies below 100KB; 99.95% read availability; anonymous creation, so abuse control is on you.
Scale
3M pastes created per day and 60M reads per day (20:1 read to write). Median body 8KB, p95 120KB, p99 400KB, hard cap 10MB. Peak traffic is roughly 3x average. About 20% of pastes are created with no expiry. A handful of pastes go viral and can take a large share of all reads within an hour.
Out of scope
Accounts, billing, paste editing or versioning, comments, full text search over paste bodies, and native mobile apps. Assume a single primary write region.
Sign in to answer questions and track your progress
Sign In