#02EasyMedia Streaming & Storage

Design Pastebin

ASKED IN INTERVIEWS AT:AmazonVantaNutanix

EXECUTIVE SUMMARY & PROBLEM STATEMENT

Design a text and code-sharing pastebin service that stores large text payloads, generates unique access links, and automatically expires pastes.

SCALE ESTIMATION & TRAFFIC ENVELOPE

DAILY ACTIVE USERS / TPS10 Million writes/day, 100 Million reads/day
READ / WRITE TRAFFIC RATIO10:1
5-YEAR STORAGE CAPACITY~10 TB / month stored in S3/Blob storage with metadata in DB

FUNCTIONAL REQUIREMENTS

  • [1]Upload plain text/code snippet
  • [2]Generate unique read-only URL
  • [3]Optional expiration and burn-after-reading option

NON-FUNCTIONAL REQUIREMENTS

  • •Reliable object persistence
  • •Low-latency read path (<25ms)
  • •DDoS and spam protection

CORE ARCHITECTURAL COMPONENTS

API Ingestion Server
Amazon S3 / MinIO Object Storage
Cassandra/ScyllaDB metadata store
Lazy TTL Purge + S3 Lifecycle Rules

DATA SCHEMA & PERSISTENCE

Pastes: paste_id (PK), s3_bucket_key, author_id, size_bytes, expires_at, created_at

DISTRIBUTED TRADE-OFFS & FAILURE MODES

  • ⟡Storing text in DB blobs vs external object store (S3 preferred for payloads >10KB).