Skip to content
All interviews

URL shortener

Turn long URLs into 7-character codes and redirect at 100× the write rate. The interesting parts are code generation without collisions and a read path that the cache, not the database, carries.

Notes and ratings save in this browser. Completing self-assessment records your progress.

45:00

Requirements checklist

Clarifying questions
  • How many links are created per day, and what is the read-to-write ratio?
  • Do we need click analytics? (It decides 301 vs 302.)
  • Are custom aliases allowed, and can links be edited or deleted?
  • Do links expire by default?
  • Must codes be unguessable?

requirements

Suggested time: about 6 minutes. Also pins down 301 vs 302, enumerability, deletion semantics and durability horizon.