The Bug, Part 1: The Error
It is four minutes past midnight on the biggest sale of the year, and a developer alone in the office is watching his phone fill up with messages from customers.
He checks the status page first, because that is what anyone would do. Web store, checkout, payments, orders, database: all operational. Every system says green.
Then a colleague turns her monitor towards him. Two counters sit next to each other on the screen. Payments received: 48,263. Orders created: 41,231. The third number is the one that matters. Seven thousand and thirty-two customers have been charged, and the store has no record of what they bought.
By the time the team lead is reading over his shoulder, the total charged without an order has passed $460,000, and it is climbing by about $520 every second.
This is the uncomfortable part of the story, and the reason it makes a good first episode: nothing has failed. No service is down, no alert has fired, no error is in the logs. The store is taking money exactly as designed. It is only when you put two healthy numbers side by side that the problem exists at all.
So where would you look first?
Part 1 of 3. The people and the store are fictional. The bug is a real class of failure.
Transcript
Narrator: Biggest sale of the year. Four minutes past midnight.
Narrator: Every system says green.
Narrator: Seven thousand customers paid. No order.
Narrator: Four hundred sixty thousand dollars. And it's growing.
Narrator: Part two. Tomorrow.