usoken
9/12/2018 - 6:28 PM

Design an URL shortening service

Determining Use Cases in scope:
1. Shortening
2. Redirection
3. Customization
4. High Avaliblity of the System
5. Analytics
6. Automatic Link Expiration
7. Link Removal
8. UI vs API

Constarins:
1. New Urls
2. New Request
3. Traffic

Abstract Design:
1. Application Service Layer
  *Shortening
  *Redirection
2. Data Storage Layer:  Hash Check -> Mapping / Generate new | User check if custom
  * Act like a big hash table: stores new mapping and retrieves a value given a key
  * hased_url = convert_to_base62( md5(original_url + random_salt)))::[:6]