DropZero
OVERSELL-PROOF GLOBAL LIVE-DROPS · SYSTEM ARCHITECTURE
Aurora DSQL × Vercel
Track 3 · Million-scale
BUYERS
worldwide
browser · React
SWR live polling
HTTPS
▲ VERCEL · arn1 (Stockholm)
Next.js Client
React · Tailwind · SWR (~1.2s)
home · drop detail · seller · live tape
fetch JSON
API Route Handlers
Node runtime (server-only)
/drops · /reserve · /simulate
/checkout · /feed · /stats
Data layer — claim engine
reserve(): claim a random distinct unit
withRetry() on OCC 40001 (jittered)
idempotency-key dedupe
pg driver + @aws-sdk/dsql-signer
DsqlSigner → IAM auth token / connection
IAM · TLS
strong SQL
☁ AWS · eu-north-1 (Stockholm)
Amazon Aurora DSQL
serverless · PostgreSQL-compatible
replicated across 3 Availability Zones
strongly consistent · optimistic concurrency
scales to zero · no servers to manage
— system of record —
drops
name · total · price · status
drop_units — one row per unit
status: available | claimed (claimed once → 0 oversell)
orders
idempotency_key UNIQUE · region · qty
Auth: IAM (DsqlSigner mints a short-lived token per connection)
THE DESIGN — inventory is N discrete rows, not a hot counter. Each buyer atomically claims a
random distinct
row in one
strongly-consistent DSQL transaction →
provably 0 oversell
, and writes spread across the key range →
near-0 OCC contention
.
PLANNED · WELL-ARCHITECTED EXTENSIONS
DynamoDB feed fan-out (extreme write volume) · Stripe payments (test-mode wired) · CloudWatch DPU & conflict metrics · 2nd-region active-active