System Design Atlas

Ticket sales with assigned seats

10 / 10Worked example

Final design

Which complete flow needs robust evidence before extending the design?

The complete flow leads from S-42 through H-17 and B-17 to T-17 or a confirmed refund. The initial design is product-neutral, with transactional allocation, a durable webhook inbox and an outbox for external compensation. The next implementation step is a vertical end-to-end path with explicit failure scenarios.

Starting point Start with the decisions about allocation, durable event ingestion and compensation.

Assumptions for the example case

Example design for one event with 1,000 numbered seats. Each order contains exactly one seat. Hold, sale, payment and ticket are separate entities. All figures and targets are illustrative assumptions, not provider metrics. Admission scanning, resale, dynamic pricing and multi-seat orders are outside scope. Sources checked on 8 September 2026. The order model covers successful payments, including delayed success; final unpaid cancellations need their own terminal state before implementation.

Overall architecture of ticket sales

Overall architecture · seat allocation, payment, ticket and compensation

Seat S-42Hold H-17Order B-17Ticket T-17
or confirmed repayment
Browser · Ticket interfaceSeat selection, checkout, order status
External payment servicePayment, repayment, status matching

Ticket platform · owned runtime

Ticket API · ProcessHolds, checkout and durable webhook ingestion
DecisionHold and order are bound on the server side; webhooks are only confirmed after a permanent inbox entry.Test caseCancellation before commit confirms neither hold nor message.Return to an earlier stepStep 4 · Interfaces
Relational data storeBinding, Hold, Order, Ticket, Inbox/Outbox
DecisionSeat allocation, states and follow-up commands are protected within explicit transaction boundaries.Test case100 competing holds produce at most one valid binding.Return to an earlier stepSteps 2 and 5 · Requirements and states
Worker · ProcessCheck inbox, clean holds, deliver outbox
DecisionA later payment success only leads to the ticket with a valid hold; otherwise, the compensation begins.Test casePayment after expiration does not generate a T-17 and exactly a repayment order.Return to an earlier stepStep 7 and 9 · Processing and operation
  • Browser → APIHTTPS: Hold, Checkout, own status; API → Browser: Result
  • Payment service → APISigned webhooks; API → payment service: 2xx after inbox commit
  • API → storeHold/checkout transaction or separate inbox ingestion; store → API: commit/result
  • Worker → storePoll inbox/outbox, validate allocation and write atomically; store → worker: data/commit
  • Worker → payment serviceIdempotent payment/refund commands and status reconciliation; service → worker: result or unknown outcome
  • Browser and payment service
  • API and Worker
  • Transactional storage

The final overview connects the path from S-42 to a ticket or confirmed refund with runtime components and outstanding evidence.

The complete view connects seat selection, ticket API, relational store, worker and payment service. Test markers on each component link findings back to the relevant design step.

Combined architectural decisions

Protect a scarce seat

Active binding per V-17/S-42 in a relational transaction

Only a maximum of one valid hold may bind S-42.

Trade-off
Conflicts and lock waiting time become visible.
Reassess
For load test results on hotspot or latency.
Processing of payments

Signed Webhook Inbox before 2xx and Worker after Commit

Retries, out-of-order delivery and crashes must not lose an event.

Trade-off
Order status can be temporary payment_pending.
Reassess
With increasing inbox age or delivery errors.
Compensate late payment success

compensation_pending and an idempotent refund outbox

Z-17 after expiry grants no seat entitlement, but still requires an evidenced resolution.

Trade-off
Customer service handles unresolved compensation.
Reassess
In case of volume or age-related backlog.

Test plan and review loops

ValidationExpected resultReturn to an earlier step
100 competing holds on S-42Not more than one heldStep 2 and 5: Check Invariant, Index and Transaction
Payment after expiry of H-17No T-17; B-17 compensation_pendingStep 5 and 7: Check state and sequence model
Duplicate and Crash after CommitNo second confirmation or refundStep 4, 6 and 7: Check the Inbox/Outbox boundary
Start window and 100 hold/sLatency, Conflict and Error Values VisibleSteps 3 and 8: Check load profile and measures
Restoration sampleopen inbox/outbox and matched ordersStep 9: specify operational plan and responsibilities

100 competing holds on S-42

Expected result
Not more than one held
Return to an earlier step
Step 2 and 5: Check Invariant, Index and Transaction

Payment after expiry of H-17

Expected result
No T-17; B-17 compensation_pending
Return to an earlier step
Step 5 and 7: Check state and sequence model

Duplicate and Crash after Commit

Expected result
No second confirmation or refund
Return to an earlier step
Step 4, 6 and 7: Check the Inbox/Outbox boundary

Start window and 100 hold/s

Expected result
Latency, Conflict and Error Values Visible
Return to an earlier step
Steps 3 and 8: Check load profile and measures

Restoration sample

Expected result
open inbox/outbox and matched orders
Return to an earlier step
Step 9: specify operational plan and responsibilities

Determine before implementation

Business rules
Price, payment methods, hold renewal, cancellation, multi-seat ordering, identity and access rights are specified with the event operation. In particular, the limited success/compensation model still lacks the final order conclusion after a proven payment failure or unpaid cancellation.
Operations
SLOs, alert limits, retention, duty hours, RTO/RPO and escalation of customer service receive measurable agreements.
Technology
Concrete database, queue and cache products only follow from the environment, capabilities, compliance and the measured results of the end-to-end path.

Terms in this step

Vertical end-to-end path
A vertical end-to-end path implements a complete sequence, including data, interfaces, errors and evidence, rather than isolated layers of technology.

Try it yourself

Create four blocks for your case: scarce resource, external success, failure scenario and evidence. Add a decision, test and review loop to each block.

A hint for your attempt

A complete solution does not just name building blocks. It connects the transition, the expected effect and the test that would make a false assumption visible.

Compare with a possible solution
Scarce resource
A transactional hold protects V-17/S-42. Test: 100 parallel attempts produce at most one held result; failures return to the allocation rule or data access design.
External success
Signed event EV-17 for payment Z-17 is deduplicated and persisted in the inbox. Test: duplicates and a crash after commit create no second effect; failures return to the webhook and outbox boundaries.
Late payment
Despite successful Z-17, expired H-17 leads to compensation_pending and an idempotent refund. Test: no T-17; confirmed refunded; failures return to the state model.
Proof of operation
The launch window, open inbox and outbox, and recovery are observable. Load and restore tests provide clear measurements; findings return to the load or operations plan.

Apply to your project

What small but complete process would test the most critical assumption of your own system first?

The draft now collects the same ten questions for your own case.

Start your own design

Choose a small case from your project. The template collects the ten design tasks and leaves space for your sketches, decisions, and open assumptions. You can edit it in your text editor or note-taking app.

Download design template (.md)
Compare the ten tasks with the example case
  1. Purpose and boundary

    Which scarce domain resource does your system reserve only temporarily?

    In the example: Ticket sales protect S-42 as scarce inventory and treat payment success as a response requiring validation.

  2. Requirements

    What business invariant does your system need in addition to its latency or availability goals?

    In the example: The application can commit only one active allocation per V-17/S-42 and must compensate late payment successes without a second seat commitment.

  3. Scale estimates

    Which domain resource creates a single hotspot in your load profile?

    In the example: The design protects allocation transactionally and optimises reads only using measured load.

  4. Interfaces

    Which external event must your system persist before acknowledging it?

    In the example: The webhook acknowledges a durable message. The worker creates the domain status only after checking the hold, order and seat allocation.

  5. Data and states

    Which domain entities need their own states rather than one combined status?

    In the example: Successful payment alone is insufficient for T-17. The commit checks H-17; expiry opens a documented compensation path.

  6. Overall architecture

    Which domain changes must share a transaction, and which may cooperate asynchronously?

    In the example: A modular monolith with a relational transaction, inbox, outbox and worker protects the critical allocation while keeping the initial design within a small deployment structure.

  7. Critical flow

    What external effect can occur in your system after the local authorization expires?

    In the example: Payment can succeed without granting a seat entitlement. The current hold decides in the local commit; subsequent compensation remains traceable.

  8. Bottlenecks and trade-offs

    Which metric reveals a technical problem, and which shows a domain backlog?

    In the example: Additional infrastructure follows a measured bottleneck. The exclusivity rule for S-42 stays unchanged.

  9. Operations and security

    Which open external states need a named role and proof of completion in your company?

    In the example: Reconcile unknown payment states. In the illustrated payment-success branch, confirmed or refunded evidences completion. Unpaid cancellations need a separate order closure.

  10. Final design

    What small but complete process would test the most critical assumption of your own system first?

    In the example: S-42 is held once, Z-17 is durably accepted, and only a still-valid H-17 permits confirmation as T-17. A late payment is compensated and remains traceable.