FRZ-13
Flash Sale Lab architecture
A flash sale lab under a real load test: almost 114 thousand buyers and bots fight over 6,000 items, sold out at second 42 without a single oversell, and the recording plays back second by second for non-engineers.
Thousands arrive
k6 sends buyers and bots at once, more than a thousand people a second, at a Go API limited to one CPU.
- k6 (load test)
- Go
Bots stop at the door
A per-client rate limit and signed tickets turn bots away before they touch the stock.
- Signed ticket
- Redis
The waiting room
A Redis queue calls 200 people a second to the till, so checkout never floods.
- Waiting room
- Redis
Stock can't go negative
Checking stock, reducing it and saving the order happen in one step, and a double click is still one order.
- Redis
Saved for good
A worker moves orders into PostgreSQL, and every second of the test is recorded for the replay page.
- Go
- PostgreSQL
- Next.js
Technology
- Features
- Waiting room
- No oversell
- Second-by-second replay
- Stack
- Go
- Redis
- PostgreSQL
- Next.js
- Infrastructure
- Docker
- k6 (load test)