Back to problems
Pastebin System Design (Expiry, Abuse Controls & Scale)
Design a service like Pastebin where users can store and share text snippets via short URLs. The service should allow users to create, view, and optionally delete text pastes.
Constraints
Functional
Create paste (text, expiration, syntax, privacy), view by ID, expiration (10 min–never), optional syntax highlighting, public/private, delete own (if authenticated)
Non-functional
Low latency (< 100ms), millions of pastes, durability until expiration, high availability
Scale
10M pastes/day, 100M reads/day (10:1); ~100 GB/day storage, ~36 TB/year; peak ~100 writes/s, ~1K reads/s
Stages ahead
1Requirement Analysis
2API Design
3High-Level Design
4HLD Extensions
5Trade-offs