Grokking Redis
0% completed
8.11 Design a URL Shortener at Scale
A URL shortener stores one mapping, from a short code such as aZ3kP9 to a long URL, and turns every visit to sho.rt/aZ3kP9 into a redirect. Creating a link is rare and simple. Redirects arrive constantly, must be fast, and are very unevenly spread: a handful of viral links receive most of the traffic, while scanners and bots request codes that do not exist.
The design is therefore built around the read path. Cache-aside serves the popular links, a Bloom filter rejects nonexistent codes cheaply, and click counters stay off the path that the redirect waits for.
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%