AlgoViz

Design a URL shortener

medium 45 min

Turn a long URL into a short code and redirect anyone who opens it.

Mock interview

Answer against the clock, then score yourself.

0:00 of 45:00

Design a URL shortener like Bitly. You have 45 minutes. Start the clock, answer each step out loud, write the key points, then score yourself.

Step 1 of 7 · 5 min

Scope

Interviewer

Design a URL shortener. Where would you like to start?

Practise it on the whiteboardGuided steps, draw your design, and get AI feedback on the drawing and your answers.
Cheat sheet (open after you finish)

Interview cheat sheet

  • Scale: 100M links and 10B redirects a day, 100:1 reads.
  • Codes: base62, 7 characters, 3.5 trillion combinations, never reused.
  • IDs: ranges of 1M, scrambled, with a conditional write.
  • Caching: CDN 65%, Redis 30%, database 5%, about 24 ms on average.
  • Hot path never touches SQL; p99 under 100 ms.
  • Analytics: async through Kafka, 1 TB raw to 100 GB rolled up.