
Mini Scalable Admission System
A Laravel 12 + Next.js proof of concept for the problem real admission systems actually have: not total data volume, but traffic bursts when results drop and everyone arrives in the same few minutes. It implements queued writes, row-level seat locking and read-through caching, then measures with k6 whether they help — keeping the naive version on a branch so the comparison has something honest to run against.
- Queued writes return 202 Accepted before the row exists — p99 latency down 65% below saturation
- SELECT ... FOR UPDATE seat allocation that cannot oversubscribe: 50 racing processes, 20 seats, 20 handed out
- Read-through Redis cache for result lookups, hitting Postgres only on a miss (X-Cache: HIT/MISS)
- k6 baseline-vs-queued comparison — and the published measurement where the queue loses
- 79 tests against real Postgres, not SQLite, because three of them passed for the wrong reason on SQLite
The API is on Render's free tier and sleeps after 15 minutes idle — the first request wakes it and can take ~25 seconds.





