bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths

Loading lesson path

Learn/System Design/Design a URL Shortener
System Design•Design a URL Shortener

Design a URL Shortener: High-Level Architecture

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

How to approach it

Sketch the request path from the client inward: client → edge/CDN → load balancer → stateless services → cache → database, with queues and workers off to the side for async work. Keep services stateless so they scale horizontally. Draw the happy path first; resilience and scale come after.

Components

ComponentRole
Clientbrowser / app
CDN / Edgecache hot redirects
Load BalancerL7 routing
Link Servicestateless create + redirect
Rediscode→url cache-aside
Key-Value DBdurable mapping, sharded by code
Queueclick events
Analytics Workerroll up counts

Request path

Client → CDN / Edge → Load Balancer → Link Service → Redis → Key-Value DB

Previous

Design a URL Shortener: API & Data Model

Next

Design a URL Shortener: Scaling