HomeAboutProjectsServicesCubieTecBlogContact
ENGINEERING

Why instant digital delivery is harder than it looks

An order that completes in two seconds needs a queue, a retry policy and a refund path. Here is the architecture that finally held under load.

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.

Written by Mr Mehedi Work with me →
KEEP READING

More posts

All posts →
AI

Putting an AI assistant into a product people pay for

Where the API key lives, what each request really costs, and how to stop the model answering questions it has no business answering.

Read post →
DESIGN

Dark interfaces people can actually read

Pure black is a trap. Contrast ratios, glass surfaces, and the three mistakes I made before this site looked right.

Read post →
PAYMENTS

Building escrow that survives real disputes

Holding money is the easy part. Deciding who gets it when two people disagree is where the design work is.

Read post →
© 2026 Mr Mehedi. All rights reserved.