Shipmind Labs

The Bug, Part 2: The Source

EpisodeThe Bug · Episode 2 · · 0:28

Five minutes after the first alarm the office is lit red and the number has reached $600,000.

The team does what a team does under pressure: it goes down the list. Server: no errors. Database: no errors. Payments: no errors. Each check comes back clean, and each clean result makes the situation worse, because the money keeps moving. The counter passes one million dollars while they are still ruling things out.

Then someone stops looking at the systems and looks at the night instead. They put the lost orders on the same chart as the visitors on the site, and the two lines rise and fall together. When traffic is quiet, every payment gets its order. When the sale peaks, orders start to disappear.

It only breaks when we're busy.

That one observation changes the question. They were asking which component is broken, and no component is. Under load, the confirmation of a payment can arrive before the order it belongs to has finished being saved. The payment is real, the order is real a moment later, and nothing connects the two.

It is not the system. It is the timing.

Part 2 of 3. The final part shows the fix.

Transcript

Narrator: Five minutes later. Six hundred thousand dollars.

Narrator: Server, fine. Database, fine. Payments, fine.

Narrator: One million dollars.

Narrator: It only breaks when we're busy.

Narrator: It's not the system. It's the timing.

Narrator: Final part. Tomorrow.

Was this useful?

Building something similar?

or email hello@shipmindlabs.com