Back to Case Studies

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–

  1. Users can create a short url from a long url.

    1. Optionally support custom alias.

    2. Optionally support an expiration time.

  2. Users can redirected to the original url from the short url.


Non-Functional Requirements—

  1. Low latency on redirects (~200ms)

  2. Scale to support 100M DAU and 1B urls

  3. Ensure uniqueness of short code

  4. High Availability, eventual consistency for url shortening.


Core Entities—

  1. Original url

  2. Short url

  3. User


API–

  1. POST /urls → shortUrl

{

originalUrl,

alias?,

expirationTime?

}


  1. GET {shortUrl} → Redirect to originalUrl



High-Level Design–




© 2026 Mehraj Hosen. All rights reserved.