The challenge
The digital commerce platform bought digital products from several external suppliers. Each order's supplier purchases ran one after another, so one slow or failing supplier held up the whole order, and every order behind it.
As customer concurrency grew, supplier rate limits, slow responses and partial failures turned that sequential design into the main limit on throughput.
Constraints
- Suppliers impose their own request rates and purchase quantity limits; exceeding them causes rejections.
- Supplier responses are not always definitive at first; a purchase can be pending for some time.
- A customer must not be charged for an order that cannot be fulfilled.
- The change had to ship into a live platform without interrupting existing orders.
Options and trade-offs
Adding more workers to the existing sequential flow would have increased load on suppliers without isolating them: one slow supplier would still block others. Splitting work per supplier adds coordination, because the parent order now depends on several independent items finishing.
We accepted that extra coordination in exchange for isolation: each supplier gets its own queue and limits, and the parent order is completed from item events.
What I did and what the team did
I proposed the decoupled fulfillment architecture, worked with backend engineers on the technical design, and took part in reviewing and finalizing the implementation approach. The backend engineers implemented it; the delivery was a team effort.
The solution
Each customer order is split into supplier-specific items, and each item is processed through an independent background queue. Each supplier has its own checkout request rate, worker concurrency limit and purchase quantity limit, managed as configuration in AWS Systems Manager Parameter Store, so limits can change without a release.
Item completion events drive the status of the parent order. Once the required items are fulfilled, the order is finalized and the customer is charged.
Reliability considerations
- Repeated processing and status checks handle supplier responses that are not yet definitive.
- Per-supplier limits act as backpressure, keeping each supplier within its allowed rate.
- Charging after fulfillment avoids charging customers for orders that fail.
- Isolated queues stop one supplier's failure from blocking others.
Outcome
Enabled parallel fulfillment across customers and suppliers, gave finer control over supplier utilization, and removed sequential dependencies, improving order responsiveness and scalability. Measured before-and-after figures are not published.
The platform reported 99.99% availability during my time there. This is a platform-level figure and is not attributed to this change alone.
Lessons
- Isolate external dependencies by default: the slowest partner should not set the pace for everyone.
- Keep operational limits in configuration, so operations can react without a deployment.
- Treat uncertain external responses as a normal state with a retry path, not an error.