SDI Example - Design A URL Shortener

참고 링크

책 - 가상 면접 사례로 배우는 대규모 시스템 설계 기초

유튜브 - URL shortener system design, tinyurl system design, bitly system design

유튜브 - System Design : Design a service like TinyUrl

Example - Design A URL Shortener

Step 1

Questions & Answers

Summary

Estimation



Step 2

Blueprint - API Endpoints

  1. URL Shortening: create a new short URL
    • POST /api/v1/data/shorten
    • Request Body
      { 
       "long url": "longURLString"
      } 
      
    • Response: short URL
  2. URL Redirecting: redirect a short URL
    • GET /api/v1/shortUrl
    • Response: long URL for HTTP redirection

Blank diagram - Page 1 (6)

URL shortening



Step 3 - Design Deep Dive

Data Model -> save to DB

Blank diagram - Page 1 (9)

Hash functions

Blank diagram - Page 1 (7)


Blank diagram - Page 1 (10)

Hash + Collision Resolution vs Base 62 conversion

URL Redirection

Blank diagram - Page 1 (11)



Step 4

Wrap up - additional talking points