Infrastructure primitives
URL shortener - one write, a million reads
One write, millions of reads. The warm-up question.
What this board gets wrong on purpose
The tension
Uniqueness is bought with a single global counter: every write in the world waits on one INCR, that counter is the only node here with no replica, and base62 of a counter makes every link on the service enumerable by walking the range. Read scale is bought with the opposite mistake - the CDN caches the 301, so after the first visitor a deleted or re-pointed link keeps redirecting until the TTL expires, and the clicks that never reach the service are never counted.
The rest of this board
Available on Tier Slate
This page publishes the question. The answer — an 8-step narrated walkthrough — is the board itself, and it opens in Tierslate.
- 8walkthrough steps
More boards
The building blocks an interview asks you to build from scratch.