← Back to AlgoVision SD hub Override

Design a URL shortener (e.g. bit.ly)

Classic interview: encode billions of URLs, fast redirects, optional analytics — walk through requirements to storage to scaling.

~28 minDesign interview
Ready
Step 0 / 0
Interview script (outline)
  1. Clarify: custom aliases, expiry, analytics, private vs public links, edit/delete.
  2. Estimate: new URLs/day, redirect QPS, read:write ratio, storage per year.
  3. API: REST shape; 302 vs 301; idempotent create with optional idempotency key.
  4. Encoding: counter + base62 vs random + collision check; length vs namespace.
  5. Storage: PK, partitioning, replication for reads.
  6. Redirect path: edge → cache → DB; cache headers.
  7. Failure: cache miss storm, abuse, malware links.
← Search autocomplete Next: News feed →