Vanity Routing and SQLite Persistence Without Third-Party Cloud Bloat
Building high-performance HTTP 307 link shorteners with atomic counter increments, zero external KV storage, and Swiss minimalist brutalist interfaces.
The Illusion of Simple Redirection
A URL shortener is ostensibly the simplest service on the internet: given a key $k$, lookup destination $v$, increment an analytics counter $c$, and respond with an HTTP 301 or 307 status code.
Yet in modern enterprise architectures, this trivial task often pulls in Redis clusters, DynamoDB global tables, Lambda functions, and complex analytics pipelines.
When building go.tanzeem.xyz, we set out to prove that strict simplicity delivers superior resilience.
Atomic Lookups in Standard SQL
The biggest concurrency hazard in URL shorteners is counter race conditions: two concurrent visits reading the same counter value and writing back an incremented number, silently losing click telemetry.
By leveraging SQLite's transactional execution:
UPDATE links
SET clicks = clicks + 1
WHERE slug = ?
RETURNING destination;
This single statement accomplishes two tasks atomically:
- Atomically increments the click counter under an exclusive transaction.
- Returns the destination URL directly in the result set, avoiding a second query round-trip.
Swiss Brutalism as a Functional Choice
The user interface of go.tanzeem.xyz intentionally strips away decorative noise. Dark pitch-black backdrops, crisp hairline zinc borders, and monospaced typography mean the interface loads instantly, has zero layout shift, and communicates status with absolute clarity.
When every element on the screen exists for an explicit purpose, the design ceases to be decoration and becomes an instrument.