Skip to content
Chaos Lab

Challenge 10 · intermediate · Online shop

Sold more than we had

At 10 seconds a flash sale opens: 1,000 units of one item, and half of all checkouts are for it. Each checkout reads the stock count, charges the card (about 150 ms), then writes the count back minus one.

From 10 to 70 seconds, sell no more units than exist, while at least 99% of checkouts and 99% of product reads succeed.

ready00:00 / 01:10Success · 10 s–p99 · 10 s–Breakeroff

Goal · measured 00:10–01:10

0 changes · par 1
  • Units sold beyond stock ≤ 1 unitsnot measured yet
  • Checkouts succeed ≥ 99.0%not measured yet
  • Product reads succeed ≥ 99.0%not measured yet

This is a simulation. Its numbers come from a model of a typical system, not from measuring real servers. The same link and seed always give the same run. How the Chaos Lab works.