LeetDesign
← All problems
Medium

Design a URL Shortener

Turn long URLs into short codes and serve the redirects. Reads outnumber writes 100:1 behind a viral hot set — the problem that makes you earn the edge cache and pay for permanent storage.

Design a service that turns long URLs into short codes and redirects anyone who follows them.

Redirects dominate creates roughly 100:1, and a handful of viral links carry most of the traffic. A short link, once shared, must never break — mappings are kept forever. Takedowns (abuse, expired campaigns) may propagate lazily.