150 orders a second are placed. Each commits with an outbox row, and a relay publishes it to the order-events topic. Dispatch consumes that topic and asks the Maps API for travel times before it assigns a rider. Autoscaling on lag is already on.
At 10 seconds a match ends and orders triple. At 25 seconds the Maps API slows from 120 ms to 2.5 s a call, and dispatch has no timeout on it. From 40 to 90 seconds, dispatch may be at most 15 seconds behind, and it must not send a struggling Maps more than 150 calls a second.
Delivery platform · pausedSelect a component to inspect
SYSTEM BOUNDARYBROWSE AND STOCKLOCATION PIPELINEidempotency key · 2 s timeoutorder + outbox row · 1 txnreadsno timeout23k pushes/sUsers40k req/sCLIENTCustomers of a quick-commerce app: about 10 minutes from order to door.Riders300k onlineCLIENT300,000 riders online, each carrying about 1.5 orders at a time: room for 450,000 orders in flight. The ×3 surge needs 270,000.CDNhit 97%CACHES33.6k GET/sDATA STOREGateway40k req/sAPI GATEWAY · CUSTOMERSCustomer traffic only. Riders connect through their own location gateway.Catalog34k req/sCATALOG · SEARCHCatalog and search reads: 85% of the customer API traffic.Redis cachehit 92%CACHEAnswers 92% of catalog and search reads; the rest go to the catalog's own index.Orders150 orders/sSERVICECart, checkout and order status. Placing an order reserves stock, authorises payment, then commits the order and an outbox row in one transaction.Inventory150 holds/sSTOCK RESERVATIONHolds stock for an order at checkout, so two customers cannot buy the last unit.Paymentsauth 240 msTHIRD PARTYEvery attempt for one order carries the same idempotency key, so a retry after the 2 s timeout cannot charge twice.Orders DB600 txn/sDATA STOREThe order and its outbox row commit together, so an event exists exactly when the order does.CDC relay600 rows/sOUTBOX RELAYReads the database log (change data capture) and publishes each outbox row to order-events. Orders never writes to Kafka itself.order-events600 msg/sKAFKA TOPIC · 12 PARTITIONSPartitioned by zone. 4 events per order. The lag shown is the dispatch group's backlog of orders.Pickinglag 0STORE PICK LISTSDispatch4 pods · 229/sBATCH MATCH PER ZONE · ~2 S12 partitions → at most 12 consumers (classic consumer groups; Kafka 4.2 share groups lift this limit). Scaling out pauses consumption while partitions rebalance, so pre-scale before the dinner peak.Location GW300k streamsPERSISTENT STREAMSRiders hold one long-lived connection each and stream positions over it. Separate from the customer API gateway.rider-location75k msg/sKAFKA TOPICOne position per rider every 4 s. Most of the messages in Kafka, and none of the lag.Location75k msg/sLOCATION SERVICEThe only writer of the rider index.Redis geo75k writes/sRIDER INDEXlast-seen ZSET + sweeper evicts riders silent >30s; sharded by city. Written by the location service, read by dispatch.Tracking90k socketsWEBSOCKET PUSHPushes each rider's position, and order status, to the customers waiting on that rider: one socket per order in flight.Maps API120 msTHIRD PARTY
All components healthy.requestretrytrial call (half-open)failed
What changed
Turn on a fault or change a defence while the run plays. Its effect shows here: the 5 seconds before against 5 seconds after it settles.
Goal · measured 00:40–01:30
0 changes · par 2
Furthest behind on order-events ≤ 15 smeasuring from 00:40
Orders with a rider inside a minute ≥ 99.0%measuring from 00:40
Calls reaching Maps while it is slow ≤ 150 a secondmeasuring from 00:40
Dashboard
Requests per second
100/s
Press Start
00:0001:00
Answered–
Failed–
Latency
100 ms
Press Start
00:0001:00
p50–
p95–
p99–
order-events lag · orders waiting for a rider
500
Press Start
00:0001:00
Consumer lag–
Dispatch: orders placed and capacity
500/s
Press Start
00:0001:00
Placed–
Can assign–
S3 requests per second
20,000/s
Press Start
00:0001:00
From the CDN–
Images failing · %
100%
Press Start
00:0001:00
Failing–
Events and logs
Nothing yet. Faults, timeouts, retries, breaker changes, shedding, cache expiry and your own changes appear here, and as markers on the charts.
Slowest recent request
Press Start to see requests.
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.