code.davidloor.com

Open prompt · 30 min recommended

Design Pastebin

00:00

Target 30:00

Design Pastebin

You have 30 minutes. Sketch the system in this notes pane.

Scope

Functional requirements

Non-functional requirements

Out of scope

Suggested approach

  1. Clarify requirements — max paste size, expiry options, whether analytics (view counts) are needed, URL length preference
  2. High-level design — an API service that writes paste content to object storage and metadata to a DB, then returns a short URL; a read path that looks up metadata and serves content
  3. API + data modelPOST /pastes { content, language?, ttl? } → { url }; GET /pastes/:code → content; metadata table: (code PK, object_key, language, expires_at, created_at, size_bytes)
  4. Storage + caching — store text blobs in object storage (S3-equivalent); keep metadata in a relational or KV store; cache hot pastes in a CDN or read-through cache
  5. Bottlenecks + mitigations — unique code generation, large blob read latency, expiry cleanup

Reference talking points

Your notes

Saved locally · 0 chars