bugfree Icon
interview-course
interview-course
interview-course
interview-course
interview-course
interview-course
interview-course
interview-course

System Design Question

Design a URL Shortening Service like Bitly

bugfree Icon

Hello, I am bugfree Assistant. Feel free to ask me for any question related to this problem

Functional Requirements:

  • Given a long URL, generate a unique, shortened URL.
  • Given a shortened URL, redirect to the original long URL.
  • (Optional, if time permits) Allow users to specify a custom short URL alias.

Non-Functional Requirements:

  • High availability: The service should be available at all times, especially for redirection requests.
  • Low latency: Redirection from short URL to long URL should be fast (e.g., <10ms).
  • Scalability: The system should handle increasing numbers of requests and data growth over time.
  • Consistency: Once a short URL is created, it should reliably map to the same long URL.
  • Durability: Mappings should not be lost once created.
  • Security: Prevent abuse (e.g., rate limiting, spam detection).

System Design Diagrams

Zoom In and Out via trackpad or posture