Guiding scenario · Order B-1042
Order B-1042 end to end
You follow order B-1042 through seven steps across the shop and to its partners, from cart to shipping. Turn on a fault and see which building block protects the flow.
Ten times more orders: scaling & load balancingThe flow in the shop
Basket2 × mug at €24.95 each
Convert cart into orderrunning: The cart hands the items over to the order module. The price is locked in at this point.
OrderB-1042 · created
Create and save orderrunning: The order is saved in the shared database and receives its identifier B-1042.
InventoryB-1042 · reservation R-77
Reserve stockrunning: Inventory holds two mugs for B-1042 and returns reservation R-77.
Payment → payment providerP-731 · €49.90 · pay-B-1042
Authorise payment with the providerrunning: The payment module queries the provider with a fixed key and a time budget of 1 s.
OrderB-1042 · confirmed
Confirm orderrunning: With the payment confirmed, the order module sets the status to confirmed. The customer sees the acceptance.
Invoice (worker via broker)R-882 · open · B-1042
Create invoice via the brokerrunning: The confirmation is staged in the same transaction and passed via the broker to the invoice worker.
Shipping → shipping carrierB-1042 · shipping notification
Commission shipping and accept notificationrunning: The shipping carrier receives the job. Its notification belongs to exactly one order and is checked.
Taking the shop further
Ten times more orders: scaling & load balancing
A promotion brings ten times as many checkout attempts to the example shop. B-1042 remains one order with the same rules. Compare how the shop distributes the extra load and where the next bottleneck appears.
These situations are teaching assumptions, not measurements or capacity guarantees. The shop remains a modular monolith with a shared database, an external payment provider and an invoice worker connected through the broker. Every additional shop instance runs the same application.
- runningCheckout attemptsThe shop processes its usual volume of checkout attempts.
- NoteEntry & load balancingThe entry point routes to one shop instance.
- runningShop instancesOne instance has enough spare CPU and memory.
- runningShared databaseOrders and reservations are stored in the shared database.
Check your understanding
- Read: which resource limits the shop during the surge, and which in the last case?
- Apply: the cart lives only in one instance’s memory. What must change before using round robin?
- Evaluate: which measurements and spare capacity do you need to handle an instance failure during the promotion?
Show guidance
Check your reasoning: the shop CPU is the first bottleneck, the database the last. Carts and sessions must be accessible to every responsible instance; session affinity alone does not solve instance failure. Check response time and error rate under peak load with one fewer instance, along with database and provider limits.