Design brief

Design a URL shortener for one million new links and 100 million redirects daily, with redirect peaks near 12,000 requests per second. Destinations are immutable after creation. Support generated and custom aliases, and define what clients observe when creation is retried. State your redirect latency and availability goals, retention assumption, and estimated storage growth.

Draw and explain

Use Excalidraw to draw creation and redirect paths. Label service boundaries, the owner of alias uniqueness, durable mapping data, and any cached copies. Mark acknowledgement points and distinguish a missing alias from an unavailable dependency. Sketch the request and response contracts, then trace a popular alias from a cold lookup to repeated reads. Show how traffic and ownership distribute as workers are added.

Stress the design

Two workers claim the same custom alias concurrently. One commits, but its response is lost. Explain the retry outcome without relying on a cache to establish ownership. Next, let a hot alias dominate redirects while the mapping store is unavailable. Mark what can still be served and when that permission ends.

Review your design

Check uniqueness enforcement, retry identity, cache freshness, and hot-key capacity. Compare alias generation choices and edge caching against their operational costs. Explain what would change for takedowns or editable destinations. Identify metrics that distinguish store failure, cache misses, claim conflicts, and concentrated traffic.

Capture assumptions, sizing, and the tradeoffs behind your diagram.

Review is your own assessment of the design.

Drag or use the arrow keys to resize. Home collapses the brief; End collapses the canvas. Enter or double-click resets the split.
Loading drawing…