Design a Pastebin-like service where users submit text or code snippets and receive a short URL to share them. Pastes support optional expiration, language metadata, and read-only public access. The system must store content durably and serve read-heavy traffic efficiently.
Functional requirements
- Create a paste from raw text and return a unique shareable URL
- Retrieve paste content by id with correct content-type or language hint
- Optional TTL or one-time read so pastes expire or self-delete
- Authenticated users can list or delete their own pastes
Non-functional requirements
- Low latency for read-heavy traffic on popular pastes
- Durable storage with replication for snippet data
- Basic abuse protection (size limits, rate limits)