Design URL Link Shortner (like Bit.ly)
Overview– Bit.ly is a URL shortening service that converts long URLs into shorter, manageable links. Ie. www.mulongurl.com/is/annoying -> www.bit.ly/Gs23 Functional Requirements– Users can create a short url from a long url. Optionally support custom alias. Optionally support an expiration time. Users can redirected to the original url from the short url. Non-Functional Requirements— Low latency on redirects (~200ms) Scale to support 100M DAU and 1B urls Ensure uniqueness of short code High Availability, eventual consistency for url shortening. Core Entities— Original url Short url User API– POST /urls → shortUrl { originalUrl, alias?, expirationTime? } GET {shortUrl} → Redirect to originalUrl High-Level Design–