Design Pastebin
MediumSystem design · Content Storage
Design Pastebin: users (anonymous or signed in) paste text, get a short unguessable link, and optionally set an expiry, visibility (public, unlisted, private) or burn-after-reading. Readers open the link. Focus on key generation, where metadata and bodies live, expiry and deletion semantics, caching, and abuse handling. Out of scope: user-to-user collaboration and editing history.
Requirements
- Support anonymous and authenticated creation with per-address and per-account rate limits
- Use unguessable keys; keep metadata in a fast store and bodies in object storage (small ones inline)
- Enforce expiry at read time, delete from caches and the edge, and make burn-after-reading atomic
- Handle abuse: credential and malware scanning, takedowns, and serving raw content safely