System-Design-Question

Design URL Shortener

Category: system_design Date: 2026-02-14

System Design Discussion: URL Shortener

1. Requirements (Functional + Non-functional)

Functional Requirements:

Non-functional Requirements:

2. High-Level Architecture

The high-level architecture for a URL shortener system consists of:

3. Database Design

We’ll use a relational database (e.g., PostgreSQL) to store URL data.

Column Name Data Type Description
id int unique ID for the URL
short_url varchar short URL generated by the system
original_url varchar original URL
expiration_date timestamp expiration date for the URL (optional)
creation_timestamp timestamp timestamp when the URL was created

4. Scaling Strategy

To scale the system, we can:

5. Bottlenecks

Potential bottlenecks include:

6. Trade-offs

Trade-offs include:

First Principle of System Design

The first principle of system design is to “Keep it Simple, Stupid!” (KISS). This principle emphasizes the importance of simplicity and elegance in system design. In the context of the URL shortener system, we can apply this principle by:

Learning Links

System Design Principles