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 balancing

The flow in the shop

  1. Basket2 × mug at €24.95 each

    Convert cart into order

    running: The cart hands the items over to the order module. The price is locked in at this point.

    Module boundariesAPI contracts

  2. OrderB-1042 · created

    Create and save order

    running: The order is saved in the shared database and receives its identifier B-1042.

    Transaction boundariesModular monolith

  3. InventoryB-1042 · reservation R-77

    Reserve stock

    running: Inventory holds two mugs for B-1042 and returns reservation R-77.

    Transaction boundariesData ownership

  4. Payment → payment providerP-731 · €49.90 · pay-B-1042

    Authorise payment with the provider

    running: The payment module queries the provider with a fixed key and a time budget of 1 s.

    Timeout & DeadlineIdempotencyRetry

  5. OrderB-1042 · confirmed

    Confirm order

    running: With the payment confirmed, the order module sets the status to confirmed. The customer sees the acceptance.

    Transaction boundariesPartial failures

  6. Invoice (worker via broker)R-882 · open · B-1042

    Create invoice via the broker

    running: The confirmation is staged in the same transaction and passed via the broker to the invoice worker.

    Transactional OutboxDelivery guaranteesIdempotency

  7. Shipping → shipping carrierB-1042 · shipping notification

    Commission shipping and accept notification

    running: The shipping carrier receives the job. Its notification belongs to exactly one order and is checked.

    Trust BoundariesIdentity & Permissions

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.

Choose a situation
  • 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.

Starting point: the B-1042 flow works. Before the promotion, the team needs a load test with a realistic mix of reading, reserving and paying.

Check your understanding

  1. Read: which resource limits the shop during the surge, and which in the last case?
  2. Apply: the cart lives only in one instance’s memory. What must change before using round robin?
  3. 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.

The building blocks behind it

Principles · ConceptModule boundariesModule boundaries define which data and capabilities a module owns and which contracts others use to access them.Communication · ConceptAPI contractsAPI contracts define data, meaning and observable interface behavior as binding rules.Data · ConceptTransaction boundariesTransaction boundaries determine which related changes succeed or fail together.Styles & patterns · StyleModular monolithA modular monolith separates domains within a single application deployed as one unit.Data · ConceptData ownershipData ownership defines which building block is responsible for data and its domain rules.Operations · MechanismTimeout & DeadlineA timeout limits waiting time. Here you learn how the caller handles the resulting state.Communication · ConceptIdempotencyIdempotence keeps the business effect stable when the same command is repeated.Operations · MechanismRetryRetry repeats a failed operation within defined limits and conditions.Distribution · Architectural conditionPartial failuresHere you learn how to handle failed participants and uncertain outcomes in distributed workflows.Communication · PatternTransactional OutboxTransactional Outbox stores a domain change together with the intent to publish it.Distribution · ConceptDelivery guaranteesDelivery guarantees describe when messages are lost, redelivered or processed.Security · ConceptTrust BoundariesTrust Boundaries mark transitions between trust levels that require protection and validation.Security · ConceptIdentity & PermissionsAuthentication establishes identity; authorization checks whether an action is permitted.