Course contentsShow
← System Design
Lesson 1495 of 1,91937. Real-World System: URL ShortenerFree lesson

Non-Functional Requirements: Scale and Performance

Specify low latency redirects, high availability, and support for billions of URLs.

Non-Functional Requirements: Scale and Performance

What you'll learn: How to specify the critical performance and scale expectations for a high-traffic URL shortener that serves billions of URLs globally.

Beyond "What" to "How Well"

You've defined what your URL shortener does (create short URLs, redirect users, track analytics). Now you must specify how well it performs under real-world conditions. Non-functional requirements (NFRs) define the quality attributes—speed, capacity, availability—that make or break user experience.

For a URL shortener, three NFRs dominate:

1. Low Latency Redirects

Target: <50ms redirect response time

When someone clicks a shortened link, they expect instant redirection. Every millisecond of delay increases abandonment. This means your redirect service must:

  • Serve from memory (not disk)
  • Use CDN-like edge caching
  • Minimize database lookups
  • Optimize DNS resolution

2. High Availability

Target: 99.99% uptime (4 nines)

Short URLs appear everywhere—marketing campaigns, social media, printed materials. If your service is down, links break globally. This demands:

  • Multi-region deployment
  • No single point of failure
  • Automated failover
  • Geographic redundancy

Think of it like road signs—if they disappear, traffic chaos ensues immediately.

3. Massive Scale Support

Target: Billions of URLs, hundreds of thousands of redirects/second

You need to handle:

  • URL creation rate: ~1,000 writes/second
  • Redirect rate: ~100,000 reads/second (read-heavy, 100:1 ratio)
  • Storage: Billions of URL mappings (~1TB+ data)

This drives partitioning strategy, caching layers, and database selection (likely NoSQL for horizontal scaling).

Why These Numbers Matter

These NFRs directly inform your design decisions: partitioning strategy, replication topology, cache sizing, database choice, and infrastructure cost. They're measurable contracts, not wishful thinking.

Key Takeaway: Specify low latency (<50ms redirects), high availability (99.99%), and massive scale (billions of URLs, 100K+ RPS) as concrete targets that drive every architectural decision in your URL shortener design.