bottleneck You over-provision and waste Thousands of concurrent requests hit the same rows. Race conditions cause failed or duplicate orders. OVERSELLS Scale up for the spike. Pay for peak capacity 24/7. The drop lasts 30 seconds. WASTED SPEND
globally distributed SQL engine with strong consistency and optimistic concurrency control. 01 02 03 Serverless Strong Consistency Optimistic CC No instances. No capacity planning. Scales to zero between drops. No stale reads. No split-brain. Distributed by design. No row-level locks. Conflicts detected at commit time. Loser retries. No distributed locks. No cache coordination. No custom consensus logic.
order COMMIT RESULT START TXN stock = 1 >0✓ ORDER CREATED SUCCESS Order Placed BEGIN SELECT stock INSERT order COMMIT RETRY → SOLD OUT START TXN stock = 1 >0✓ ORDER CREATED concurrent Buyer B OCC ERROR No Oversell No distributed locks. No consensus protocol. Conflict detected at commit time ̶ deterministic, zero-oversell allocation.
oversells is possible. 100 buyers. 10 items. 0 oversells. Simulated stampede ̶ every commit verified. Serverless end-to-end No servers. No connection pools. No ops. Strong consistency under burst OCC + Aurora DSQL ̶ no locks, no stale reads. Live demo ̶ dropzero.dev 0 oversells ACT III ̶ DROPZERO Open during this talk. Try it yourself.
CHECK INSERT COMMIT Start transaction Read stock FOR UPDATE (OCC lock) stock > 0? If not → Abort Write order record OCC validates no conflict → commit BEGIN SELECT stock WHERE id = ? if stock == 0: ROLLBACK INSERT INTO orders ... COMMIT
jitter OCC Error Attempt 2 ~200ms + jitter OCC Error Attempt 3 OCC Error ~400ms + jitter Attempt 4 or Sold Out Base delay Jitter Max retries doubles each retry prevents retry storms then → sold out 100 ms ±50% 3 Success (if retry lands)
key POST /buy X-Idempotency-Key: abc123 DynamoDB Lookup idempotency key Key exists? YES Return Cached Same response as original NO Execute Txn Aurora DSQL transaction Store Key DynamoDB TTL: 24h Same key = same response. Network retries never double-charge Return 200 Order confirmed to client
Concurrent Buyers 10 Items in Stock Will it hold the line? All hitting buy simultaneously Exactly 10 ̶ no more Zero oversells ̶ or bust dropzero.dev ̶ live demo ?
expire every 15 min • Lambda reused connections without refreshing the token • Auth failures only appeared under concurrent load Fix: refresh token per execution context • Call generate-db-auth-token on every cold start • Never cache a DSQL connection across invocations RETRY STORM 100 buyers → ~90 retries → 3× load by Wave 3 Fix: exponential backoff + jitter Circuit breaker + max 3 retries, then honest sold-out Trade-off: more latency at cold starts and retries, for correctness under concurrency
Flash sales, ticket drops, product launches Global distribution needed Strong consistency across regions, no stale reads No ops team No instances, no patches, no capacity planning Serverless-first architecture Lambda + Vercel + DSQL ̶ zero servers end to end
Aggregations, full-table scans ̶ use Redshift or Athena Complex joins Deeply relational schemas with many multi-table joins Stored procedures or triggers Not supported ̶ move logic to the application layer Steady high-throughput OLTP Constant load ̶ provisioned instance costs less
1 0.8 0.6 0.4 0.2 0 T-60m T-45m T-30m T-15m T-5m T-1m DROP T+1 m T+5 m T+1 5m T+3 0m -0.2 Se rverle ss (DS QL) Provisioned (alway s-on) Pay only for what you use ̶ cost matches a bursty, contention-heavy workload. T+6 0m
one. You pay for usage, not capacity. Build idempotency keys in from the start. OCC is not magic Serverless DB changes your cost model Idempotency is nonnegotiable