YOUR BRIEF
What to work through
Work through pastebin as a spoken system design interview. Start by clarifying the scope, sketch a working design and explain the trade-offs behind your choices.
- Create a paste from a block of text and get back a unique link
- Anyone with the link can read the paste
- Optionally set an expiry, after which the paste is gone
- Remove a paste; pastes are never edited
BEFORE YOU START
Constraints to discuss
- Every link is unique: random keys of about 128 bits make a clash negligible
- A paste body has a size limit
- Reads far outnumber writes
- A removed or expired paste stops being served quickly
Need a starting point?
Watch for these common gaps as you prepare:
- The key generation service storing every key it has issued instead of the next free block
- Large paste bodies stored inline in the metadata database
- A cache or CDN TTL longer than the paste’s expiry
- Expiry left to a background job alone, so expired pastes are served until it runs
Why this question is in the collection
These sources connect the problem to company interview reports or preparation guides. They do not guarantee what a company will ask you.