URL Shortener

Architecture Kata “URL Shortener”

Developer an internet service to shorten URLs like bit.ly, TinyURL or Google url shortener do.

Users will enter a URL and get a shortened version back. The shortened version of a URL will be the same even if the URL gets shortened several times.

When the shortened URL is used in a browser the original page will be displayed after the service retrieved the original URL and redirected the browser to it.

The service keeps stats on each shortened URL:

  • How often the original URL has been shortened
  • How often the shortened URL has been called

Anyone can view these stats. It will be displayed together with the shortened URL for each request.

Variation #1

Users can register with the system. Then shortened URLs are user specific.

Only users can view stats. This is to incentivize registration.