Developer builds a URL shortener designed to handle 1.2 million requests per second

A developer decided to build a URL shortener from scratch to practice system design, turning a classic interview question into a working project published on GitHub. The service generates random seven-character base62 codes, stores mappings in DynamoDB, and creates new codes whenever a collision occurs. Redirects are served through a CloudFront CDN that caches them, with the design sized for around 1 billion redirects per day and spikes up to 1.2 million requests per second. The author explains choosing 302 over 301 redirects so that links can be taken down through cache invalidation, and recounts design changes such as replacing Redis with a Postgres sequence and moving from EC2 to ECS.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in