DesignTheSystem/dev
EASY Read-Heavy & Caching Asked at Amazon, Google, Atlassian

Design Pastebin Text Sharing

Design a text-sharing service like Pastebin handling 15,000 read RPS and 1,500 write RPS. Store text payloads in Object Storage while querying metadata rapidly with low latency.

Category & DifficultyRead-Heavy & Caching · EASY
Traffic Profile15,000 RPS sustained, 19,500 RPS spike (90% reads / 10% writes)
Latency & Availability SLAp99 < 60 ms · 99.95% availability
Monthly Infra Budget$400/month
Commonly Asked AtAmazon, Google, Atlassian

Scale, traffic & SLA targets

To pass in the DesignTheSystem simulator, your architecture must hold all four targets simultaneously across a 60-second load run (spiking up to 19,500 RPS):

Peak traffic15,000 RPS90% reads / 10% writes
Latency (p99)< 60 ms99th percentile target
Availability99.95%Max error rate 0.05%
Monthly budget$400/moPriced per component

Functional & non-functional requirements

Functional scope

  • Serve Design Pastebin Text Sharing at the traffic below.

Non-functional goals

  • p99 latency under 60 ms at the spike.
  • At least 99.95% of requests answered.
  • Costs no more than $400 a month.

Core challenge: Text in storage, links in the database

A paste is written once and read many times. Keep the text in cheap storage, cache the popular ones, and keep only the small record in the database.

What breaks first?

Run the starting design first and look at what breaks. Metadata DB reaches 376% of its capacity at the spike, and Paste Service 325%. About 28% of requests fail. Open Full metrics to see which requests pile up there, and ask why that part gets so much traffic.

Key architectural trade-offs

  • Cached data can be slightly out of date. When the data changes, the cache entry must be updated or removed.

Starting architecture & how to practise

The simulator starts you with a baseline setup: Global Clients → Paste Service → Metadata DB. Run the baseline under 15,000 RPS to watch exactly which component saturates first, then add caching, queues, replicas, sharding or CDN until latency, availability and cost all turn green.

Common interview questions for Design Pastebin Text Sharing

What are the target SLA and scale numbers for Design Pastebin Text Sharing?

Design for 15,000 RPS sustained (spiking to 19,500 RPS) with a 90% read / 10% write mix, keeping p99 latency under 60 ms, availability at or above 99.95%, and infrastructure spend within $400/month.

What is the main architectural bottleneck in Design Pastebin Text Sharing?

A paste is written once and read many times. Keep the text in cheap storage, cache the popular ones, and keep only the small record in the database.

How can I verify my Design Pastebin Text Sharing architecture works under load?

Open the live simulator to wire up load balancers, caches, queues, replicas, or shards and run a 60-second traffic simulation that grades latency, error rate, and monthly cost automatically.

Recommended lessons before you build

Related Read-Heavy & Caching problems