---
title: "Design: a URL shortener at scale"
description: "Scale a URL shortener with a shared cache: what to cache, how long a copy lives, a warm hit that still fails, and keeping creation and first read in step."
canonical_url: "https://fanout.sh/system/archive/url-shortener-at-scale"
md_url: "https://fanout.sh/system/archive/url-shortener-at-scale.md"
last_updated: "2026-11-11"
access: "pro-preview"
---

# Design: a URL shortener at scale

Scale a URL shortener with a shared cache: what to cache, how long a copy lives, a warm hit that still fails, and keeping creation and first read in step.

- Access: Fanout Pro (public preview)

## The core idea

A URL shortener can reuse the destination of a popular link instead of looking it up in the database for every request.

A shared cache makes that copy available to several application instances.

## In this lesson

- Preserve the product before adding components
- Share copies, keep one durable owner
- Cache the fields the handler needs
- Choose the copy's cost and lifetime
- Compare the work, request by request
- A warm hit can still fail
- Bound the work when the cache cannot help
- Make creation and the first read agree
- Keep the edge within the same agreement
- The next measurement

## Continue reading

Pro unlocks video lessons, visual walkthroughs, full notes, diagrams, case studies, and implementations across the System Design archive.

---
This representation contains public Fanout content only. Protected Pro lessons, account data, billing, checkout, and pricing are not included.

Browse the public content map: https://fanout.sh/sitemap.md
