Skip to content

Instantly share code, notes, and snippets.

@sheac
Created August 23, 2018 21:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sheac/8c959413ab4aebeb356918ba86d35e69 to your computer and use it in GitHub Desktop.
Save sheac/8c959413ab4aebeb356918ba86d35e69 to your computer and use it in GitHub Desktop.

Let's design a URL-shortener service

Requirements:

  • Accepts a long URL string
  • Quickly returns a URL that is:
    • Short
    • Unique
  • Redirects from resulting shortened URLs to corresponding long URL input
  • Has "sane" expiration policy (for negotiable definition of "sane")

Extras:

  • Supports custom short URLs
  • Tracks usage statistics
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment