Topic: system-design
-
File upload service walk-through: direct-to-storage tickets, asynchronous scanning and quotas
A design walk-through for uploads that bypass the application servers: a ticket that reserves quota and returns a signed upload URL, a completion step that verifies the stored object, a scan worker that promotes or deletes it, lifecycle rules for abandoned uploads, and a status model that explains every stored object.
-
Notification service walk-through: channels, preferences, delivery attempts and retries
A design walk-through for a multi-channel notification service: an ingest API with an idempotency key, a router that expands one notification into per-channel deliveries after checking preferences, per-channel queues and retry schedules, callback handling for invalid tokens, and what to defer.
-
Short-link services with sequential identifiers receive more enumeration requests than services with random identifiers
Hypothesis: a URL shortener whose keys are a counter encoded in base62 lets anyone walk every link, whereas random fixed-length keys make most guesses miss; the proposal is that sequential services see a higher share of requests for existing keys from clients that never received the link, and that the share of 404 responses does not distinguish the two.
-
URL shortener walk-through: key generation, redirect status and abuse controls
A design walk-through for a URL shortener: random base62 keys with collision retry, a redirect path that touches one cache and one store, 302 rather than 301 when targets must stay revocable and countable, creation-side abuse checks, and a list of what not to build first.
-
Job scheduler walk-through: leases, retries, idempotency keys and a queue table
A design walk-through for background jobs and recurring schedules on a database table: workers claim rows with FOR UPDATE SKIP LOCKED under a lease, failures reschedule with backoff up to a maximum, a unique idempotency key turns double enqueues into no-ops, and a message broker is deferred until queue age says otherwise.
-
Document search over a corpus walk-through: indexing pipeline, permissions and reindexing
A design walk-through for search over documents held in a system of record: a derived, rebuildable index fed by change events, ACL keys indexed as fields so filtering happens before ranking, versioned indexes switched by alias, a reconciler that finds drift, and a list of what to defer.
-
Leaderboard walk-through: score events, a derived sorted set and rebuildable rankings
A design walk-through for leaderboards: server-authoritative score events with an idempotency key as the truth, one sorted set per board period as a derived index answering top-N and single-member rank queries, tie rules encoded into the score, period boundaries routed by occurrence time, and rebuilds as a routine.
-
At what point do teams replace a PostgreSQL queue table with a message broker, and what triggered the move?
Open question: the PostgreSQL documentation sanctions SKIP LOCKED for multiple consumers on a queue-like table, and design walk-throughs recommend starting there; which triggers (queue age, lock contention, table bloat, fan-out needs, operational load) have actually caused a switch to a broker, at what volumes, and how many systems never switched?
-
Session store walk-through: opaque ids, two expiries, revocation and outage behaviour
A design walk-through for the server-side store behind a session cookie: rows keyed by a hash of the id, idle and absolute expiry as configuration, throttled last-seen writes, a user index for log-out-everywhere, fail-closed behaviour on store outage, and features to defer.
-
Feature-flag service walk-through: rulesets, local evaluation and stable percentage rollouts
A design walk-through for a flag service: flag definitions served as one versioned ruleset per environment, SDKs that cache and evaluate locally, an evaluation context for targeting, bucketing by a stable hash so users never flip during a rollout, pre-evaluated values for untrusted clients, and reporting that finds dead flags.
-
Configuration service walk-through: immutable versions, staged rollout and last-known-good
A design walk-through for distributing runtime configuration: immutable, validated versions; a rollout controller that moves cohorts chosen by a stable hash through stages with a hold time and a halt condition; clients that poll or watch, apply atomically and keep a last-known-good file; and what is deliberately left out.
-
Comment system walk-through: threads, moderation states and re-renderable content
A design walk-through for threaded comments with moderation: source text stored as truth and rendered through a patched sanitiser at read time, a materialised path with a depth cap, pending/visible/hidden/removed states that keep thread shape, a report and moderation-action audit, and features deliberately left for later.
Machine-readable: JSON