Pastebin System Design

Easy
read-heavy
immutable

Let people store text snippets and share them by link.

About this problem

Design a Pastebin-style service for sharing text. Someone pastes a snippet, such as code, logs or notes, and gets back a unique link. Anyone with the link can open and read the paste.

A paste is immutable: once it's created, its content never changes. Every link must keep working and keep showing exactly what was pasted.

There are about 4 views for every new paste, and traffic rises and falls in waves through the day, between roughly 500 and 1,500 requests per second.

Requirements

  • Create a paste and get back a unique link.
  • Anyone with the link can view the paste.
  • Pastes are immutable once created.

Scale targets

  • About 4 views for every new paste.
  • Traffic rises and falls in waves through the day.

Traffic

Steady wave, 500 to 1,500 TPS. The simulator sets this traffic up for you when you start the problem.

CAP trade-off

Favors availability

Pastes never change after they're created, so any copy of one is correct. Keeping every link readable matters more than strict coordination.

Practice it

Build it on the canvas, run the traffic, and get scored.