backendgym backendgym · series Sign in with GitHubSign in
← Projects
Series · 4 builds

The URL shortener

One system, grown step by step: short links for a grocery shop's SMS campaigns, from the first redirect to a campaign that brings a million clicks. Each step starts from the repository you shipped in the one before.

Pantry's marketing team sends its offers by SMS, and every message carries a short link. This series builds the service behind those links and keeps building it, so a decision you make in one step is one you live with in the next.

The first step is the core: links that redirect, a count of every click, and a public address. The steps after it come from what happens to the product as the campaigns grow.

  1. 01 Short links, counted Warm-up · ~10h · A grocery shop's Thursday SMS carries a 212-character link that phones cut in half. Build the short links its marketing team sends instead, and count every click, from an empty repository to a public address. starts from an empty repository
  2. 02 Short links, at campaign speed Intermediate · ~12h · Christmas offers go out to 400,000 phones at noon, and the short link waits ten seconds and gives up. Make your step 1 service keep up at 500 openings a second without losing a click, and let the team take a wrong link down. builds on step 1
  3. 03 Short links, one per customer Intermediate · ~8h · Every customer gets their own short link with their own coupon: 400,000 links made in half an hour by three copies of your service at once. No code may belong to two customers, and none may be guessed from another. builds on step 2
  4. 04 Short links, for two million customers Advanced · ~12h · After the merger, two million customers open their own links at five hundred a second, over a year of 22 million links. Maya wants openings by the hour, and someone is trying codes all night. builds on step 3

Every step's spec can be read now. Start opens when the step before it ships.