Stagepass: flash-sale ticketing API that never double-sells by Chaitanya MhetreStagepass: flash-sale ticketing API that never double-sells by Chaitanya Mhetre

Stagepass: flash-sale ticketing API that never double-sells

Chaitanya Mhetre

Chaitanya Mhetre

The problem: when a popular show goes on sale, hundreds of buyers ask for the best available seats in the same second. The backend has to give each of them different seats without deadlocks or selling a seat twice, hold seats for a few minutes, release abandoned holds, and run checkout against slow external services without running out of threads.
What I built: a seat-booking API on Java 25 and Spring Boot 4.1 where the new platform features solve real problems. Seat holds use PostgreSQL row locking that skips already locked rows, so buyers never wait on each other. Checkout calls its payment and fraud partners in parallel with structured concurrency, and virtual threads keep the server responsive while those calls are slow.
How I tested it: a contention test sends 400 buyers after 100 seats and checks that exactly 50 holds of 2 seats succeed and no seat is held twice. The suite has 34 tests using real PostgreSQL and Redis in containers, covering every checkout path including payment failure, replay, expiry and partner outage.
Measured on a laptop with 400 users and a 100 ms downstream call: about 3,826 requests per second with virtual threads against about 1,958 with 200 platform threads, in single runs.
Important: the payment and fraud partners are simulated and no real money moves. This is a personal project. Code is on my GitHub: chaitanya-mhetre, repository modern-java-ticketing.
Like this project

Posted Oct 13, 2026

Seat-booking API on Java 25 and Spring Boot 4 that survives hundreds of buyers at once. Personal project.