Mock Interviewer
Ask Coach
Tap a question to start, or type your own below.
Pastebin System Design
Visual Problem Diagram

Scenario
You paste a 2 MB log and drop the link in Slack, expecting every teammate to open the same text quickly. The painful failure is the page crawling once 10,000 people open it in five minutes, because each view reads the whole dump from one database.
Clarify this problem here, or open Pathway Coach if you want a prep plan first.
You paste text and receive a short link. Someone with the link opens it and reads the text. You can make the paste expire anywhere from 10 minutes to never. You can make it public or keep it private. You can delete it.
You need to explain how each paste gets a short link that does not collide with another. You need to explain where a short note is stored and where a multi-megabyte dump is stored. You need to explain how an expired paste actually disappears. You need to explain how a link that suddenly gets thousands of opens avoids hitting one database for every view. You need to explain how you cap how large a paste can be. You need to explain how you slow someone who floods new pastes. Building a full code editor can stay thin.
Constraints
Create a paste with text, a lifetime from 10 minutes to never, and public or private visibility. Open it by its link. Delete it when allowed. Remove it when it expires.
Most opens finish in under 100 milliseconds, so a shared link feels instant. The service stays up about 99.9 percent of the time. The text stays stored until it expires. A paste over the size cap is rejected.
About 10 million pastes are created a day, roughly 100 creates a second at the peak. The hot action is opening a link. About 100 million reads a day, roughly 1,000 reads a second at the peak. That is about 10 reads for every write, and the reads dominate. Storage grows about 100 GB a day.
Stages ahead
Not ready to design yet?
Try the free Coach trial — ask how to prep, what to practice first, or how InterviewCrafted works. Sign in when you want to start this problem.
Log in to start practicing
Preview the problem below. Sign in to start your timed session, save progress, and use the AI coach.
Want full access now? View Pro pricing