The first version of CubieMart delivered products straight from the checkout handler. It worked in testing and fell over the first time two hundred orders arrived in a minute.
The problem is that delivery is not one action. It is: confirm payment, reserve the item, hand it to the buyer, release escrow, notify the seller. Any of those can fail on its own, and if you run them inline the buyer watches a spinner while you retry.
What fixed it was moving everything after payment into a queue. The checkout handler now does one thing — record that money arrived — and returns. A worker picks up the rest and can retry each step independently.
The part people skip is the refund path. If delivery fails three times, the money has to go back automatically. Building that before launch rather than after saved a great deal of manual work.
Median delivery is now 1.4 seconds and 98% of orders complete without a human touching them.