URL Shortener System Design

Diagram11 nodesEngineering · URL Service ArchitectureMade from one prompt
Read-only preview

The prompt

Design a URL shortener system architecture

Make your own version

About the framework

Review the parts of a short-link service

The URL shortener example shows a browser, load balancer, API service, Redis cache, Postgres URL map, ID generator, analytics service, CDN, and Kafka queue. Eight arrows connect these nine components. A separate metrics box lists 100 million daily redirects, p99 latency below 50 milliseconds, and 99.99% uptime as sample targets, not measured results.

The API connects to the cache and database. Other links run from the cache through ID generation to the CDN, and from the database through analytics to Kafka. That layout leaves the actual order of link creation, cache lookup, redirect delivery, and event publication unresolved.

Adapt the drawing by separating create-link and redirect requests. Define where IDs are allocated, how cache misses reach storage, and when click events are emitted. Use your traffic assumptions to review the targets rather than treating the diagram as evidence that they are achievable.

What's included

What you get

  • Nine components plus a separate box of sample performance targets
  • A create/redirect API connected to Redis and Postgres
  • Named ID generation, CDN, analytics, and Kafka components
  • Eight schematic links to refine into explicit request paths
Diagram

URL Shortener System Design

system designarchitectureURL shortenerdistributed systemsinterview prep

✦ Free preview · Sign in to use

Frequently asked questions

Common questions

Does the template demonstrate 100 million redirects per day?

No. That number is a label in the example metrics box. Capacity planning and load testing would be separate work based on a defined workload.

Is the ID generator placed in a complete creation flow?

The drawing connects the cache to the ID generator and then the CDN. It does not spell out how a create request allocates an ID and stores the URL mapping; ask for that path explicitly.

Does the diagram include link expiration or abuse handling?

Neither is shown. Add expiration, invalid-link responses, and the checks required by your service before using the diagram as an implementation reference.

URL Shortener System Design

Free to start. No credit card required.

Free preview · Sign in to use