Shorteners are easy, good shorteners aren't
Anyone can build a URL shortener in an afternoon: a hash table, a redirect handler, a form. The hard parts are the ones that aren't visible — fast redirects at any scale, accurate analytics that don't inflate numbers, and a dashboard that doesn't feel like SaaS purgatory.
I built LNQ.is at Yorker Inc. as a serverless SaaS, and it was my attempt at the full thing.
The redirect path
Resolving a short link is the most latency-sensitive thing the product does. Users don't consciously notice a fast redirect, but they do notice a slow one, and every extra hop adds up.
The path was deliberately short:
- Request hits the edge.
- A Redis lookup by the short slug returns the destination, hit count, and any cohort tags.
- The redirect fires.
- A fire-and-forget event goes to an analytics queue for later rollup.
The redirect never waits on anything except the Redis lookup, which is what keeps it quick.
Branded landing pages
The feature that turned LNQ from a shortener into a tool was the ability to build a lightweight landing page on any short slug — not just a redirect, but a real page with a headline, brand color, and a few CTAs. Drag-and-drop, no templates.
The builder used a block system: every block was a typed React component with a Zod schema. Serializing to JSON and hydrating on render meant the same editor code could also render the published page. Less code, fewer bugs.
What I learned
- Two products in one. Branded short links inside marketing workflows are a different market from the consumer "paste a long link" use case. I should have picked a lane earlier.
- Cache invalidation is the hard problem. When a user edits a destination, every edge cache needs to know. Short TTLs plus explicit invalidation on write worked, but required care at every mutation.
- Dashboards are products too. Half the users spent more time in the dashboard than creating links. Next time I'd start the design there.
Where it stands
LNQ is retired now. It ran for a good while, and the code and lessons fed directly into the work I do today.
