Design URL shortener: learn it by breaking it, in Tailspin

URL shortener. A link goes viral, and the redirect service has to keep up. Turn a long link into a short one. Send anyone who opens a short link on to the long one, within 100 ms. A short link never changes once it is made. Count the clicks, minutes late at most.

Its design on a normal day: p99 13ms, 0% of requests failing, 922/s answered.

What Tailspin shows: Two caches deciding how big the links store must be; Which part fills first when a link goes viral; Answering repeat clicks at the edge, and what it saves; Counting clicks from a log, so counting never slows a redirect; A flood of new links reaching the store the clicks need.

Following Design a URL shortener, Engineering Atlas.