Designing a Simple URL Shortening Service: A TinyURL Approach
Design a system for creating a URL shortening service similar to TinyURL. This service will generate concise aliases that redirect to the original, longer URLs. Notable examples of such services include bit.ly, ow.ly, and short.io.
Suggested time: 45 minutes
Loading the workspace...
About this problem
URL shortening is deceptively simple on the surface, accept a long URL, return a short one. But the engineering challenge hides in the operational numbers. URL shorteners are among the most read-heavy systems you will encounter. For every URL someone creates, that link gets clicked roughly 100 times. At scale, this means the system must store billions of entries, handle tens of thousands of redirects per second, and deliver near-instant response times for every single click.
Key challenges the editorial covers
Learn from other designs
Designing a Simple URL Shortening Service: A TinyURL Approach: editorial solution
Community solutions for Designing a Simple URL Shortening Service: A TinyURL Approach
Related problems
Design a Live Comment System (medium)
Design Youtube or Netflix (medium)
Design Facebook’s Newsfeed (hard)
Guides
Asked in these interview guides
Company guides that list this problem among their sample questions.