High-Level Design
Design a service where a user submits a block of plain text — an error log, a configuration file, or a code snippet — and receives a short link (pb.example/a7x3kLm) that anyone can open to read that text later, optionally with an expiration time. Users can also propose a custom alias for their link if it is not already taken, and owners or moderators can delete a paste early.
In scope: creating a paste with an optional time-to-live (TTL) and optional custom alias, minting a short unique key, storing and serving the text body at high read volume, and expiring and reclaiming past-due pastes. Out of scope: user accounts and authentication, editing or versioning an existing paste, client-side syntax highlighting, and full-text search across pastes.
What a strong answer sounds like
State the decision, connect it to a requirement, and name the tradeoff. Keep the design focused on the workload in the prompt.
The AI interviewer asks about this part of Design Pastebin. The interviewer guides you through topics one by one.