Skip to content

ONE QUESTION. YOUR REASONING.

Design Pastebin

Design a paste service like Pastebin: people paste a block of text and get a link anyone can open to read it.

System designStorage, files and linksMid-level

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
Read: System design questions and who asks them

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.

KEEP GOING

Your next question

Storage, files and linksDesign BitlyInfrastructure and platformDesign a rate limiterInfrastructure and platformDesign an A/B testing platformInfrastructure and platformDesign an ad click aggregator
Browse the collection
01

Pick a question

Read the brief and choose what you want to work on.

02

Talk it through

Explain your thinking. Respond to follow-ups. Draw when a design needs it.

03

Find your next improvement

Use the feedback from your interview to decide what to practise next.