bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths
Learn/System Design/Design a URL Shortener
System Design•Design a URL Shortener

Design a URL Shortener: Requirements & Scope

Design a service that turns long URLs into short links, redirects on access, and reports click counts.

How to approach it

Turn the open-ended prompt into a concrete contract. Separate functional requirements (what the system does) from non-functional ones (latency, availability, consistency, scale), and state non-goals so you do not overbuild. Ask one or two clarifying questions that actually change the design — read/write ratio, scale, and consistency needs are usually the highest-leverage.

Functional requirements

  • Create a short code for a long URL
  • Redirect short code → original URL
  • Optional custom alias
  • Report click counts

Non-functional requirements

  • Redirect p99 < 50ms
  • 99.99% read availability
  • Reads ≫ writes
  • Links are effectively permanent

Out of scope

  • Editing the destination after creation
  • A full web-analytics suite

Tip

First clarifying question — What read:write ratio and link lifetime should we design for?

Chapter

Back to Design a URL Shortener

Next

Design a URL Shortener: Capacity Estimation

This chapter

Overview
7

Lessons

14m

Read time

1. Design a URL Shortener: Requirements & Scope2. Design a URL Shortener: Capacity Estimation3. Design a URL Shortener: API & Data Model4. Design a URL Shortener: High-Level Architecture5. Design a URL Shortener: Scaling6. Design a URL Shortener: Deep Dive7. Design a URL Shortener: Tradeoffs & Review

On this page

How to approach itFunctional requirementsNon-functional requirementsOut of scope