It takes a long URL to a shorter, unique alias that redirects (the redirections may includes analytics) to the original URL. This alias is often a fixed-length string of characters.

Requirements

Endpoints

Create short URL

User request a short URL

  1. Generate short, fixed sized, unique URL
  2. Save the short and long URL mapping
  3. Return the short URL

Redirect short URL

User Get short URL

  1. Find the original URL from cache or database
  2. Log the analysis
  3. Return HTTP 302 redirect to original URL

Get analysis

  1. Look up aggregated analytics data from cache or database
  2. Return click count, time-based stats, or geographical breakdown