SpinTheMic
Pro

Explain it in 60 seconds

Generating short keys

System Design · Design: Social and Messaging · Beginner

What are the common ways to generate short keys for a URL shortener?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Counter + base62 encoding.
  • Hash of URL, take first chars (collision handling).
  • Random string with uniqueness check.
  • Pre-generated key pool.
  • 7 base62 chars ≈ 3.5 trillion keys.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics