Match a job Paths Subjects Questions Quizzes Pricing
Overview Read Practice

Practice — Design a URL Shortener (bit.ly / TinyURL) (6 questions)

Pro content

Sign up free, then start a 14-day Pro trial — no card needed.

Intermediate Open Free

Estimating Traffic, Storage and Cache for a Shortener Permalink →

An interviewer gives you these assumptions for a URL shortener: 500 million new links per month, a 200:1 read/write ratio, links must be retained for 10 years, and each stored record averages 500 bytes.

  1. Compute average writes/s and reads/s, and a reasonable peak figure.
  2. Compute total storage after 10 years.
  3. Using the 80/20 rule, size a cache that holds the hottest 20% of URLs requested in one day. Is one Redis node enough?

Share this question

Intermediate Open Pro

Choosing a Key Generation Strategy

Unlock this question →
Intermediate Open Pro

301 vs 302 and the Analytics Path

Unlock this question →
Intermediate Open Pro

Custom Aliases, Expiry and Key Reuse

Unlock this question →
Advanced Open Pro

Scaling Reads and Fighting Abuse

Unlock this question →
Intermediate Open Free

How Many URLs Fit in Six Characters Permalink →

Your URL shortener uses codes drawn from [a-z A-Z 0-9] — 62 characters.

How many unique URLs can a 6-character code hold, and at 1,000 new URLs per second, how long until the keyspace runs out?

Show the arithmetic, and say whether you'd launch with 6 or 7 characters.

Share this question

We use cookies for product analytics to improve OmniAtlas. See our Privacy Policy.