B/AWS

Saturday Night Queue

1970s dance-floor poster

The club has a protected edge, authenticated buyers, an authoritative sales region, asynchronous consumers and a regional recovery copy. A second region is not a second ticket counter.

1 · Prompt

Authored brief · fictional system

Design a fictional flash-sale ticketing platform with CloudFront/WAF, Cognito, JWT API, transactional reservation and outbox, stream-driven independent consumers, separate audit account and asynchronous read-only recovery replica. Show one authoritative writer region; do not claim globally consistent active-active inventory.Read full promptClose full prompt
Design a fictional flash-sale ticketing platform with CloudFront/WAF, Cognito, JWT API, transactional reservation and outbox, stream-driven independent consumers, separate audit account and asynchronous read-only recovery replica. Show one authoritative writer region; do not claim globally consistent active-active inventory.

2 · Diagram

Can a flash sale survive retries without selling the same capacity twice?

Whole diagram fitted. For larger labels, turn off “Fit whole diagram” and pan, or open the full-size SVG.

Saturday Night Queue: Protected ticket site, Edge WAF policy, Ticket buyer sign-in, JWT ticket API, Reserve capacity, Reservations and outbox, Streams to event bus, Committed purchases, Door-list projector, Ticket delivery queue, Failed ticket delivery, Read-only sales replica, Protected audit archive. Relationships and limits are explained below.
Download SVGOpen full drawing ↗Open native render ↗

Mermaid source

Download .mmd

Semantic content and gallery-only boundary/flow annotations stay in this file. The drawing treatment is applied after layout.

architecture-beta
%% Illustrative flash-sale design. Only the primary region accepts inventory-changing commands.
%% @boundary prod account
%% @boundary primary region
%% @boundary projections logical
%% @boundary recovery region
%% @boundary security account
%% @boundary auditRegion region
group prod(cloud)[Account: Ticket production]
group primary(cloud)[Region: Authoritative sales] in prod
group projections(cloud)[Logical: Async consumers] in primary
group recovery(cloud)[Region: Read-only recovery] in prod
group security(cloud)[Account: Security]
group auditRegion(cloud)[Region: Audit archive] in security
service edge(aws:cloudfront)[Protected ticket site] in prod
service waf(aws:waf)[Edge WAF policy] in prod
service auth(aws:cognito)[Ticket buyer sign-in] in primary
service api(aws:api-gateway)[JWT ticket API] in primary
service reserve(aws:lambda)[Reserve capacity] in primary
service sales(aws:dynamodb)[Reservations and outbox] in primary
service pipe(aws:eventbridge)[Streams to event bus] in primary
service bus(aws:eventbridge)[Committed purchases] in primary
service door(aws:lambda)[Door-list projector] in projections
service mail(aws:sqs)[Ticket delivery queue] in projections
service failed(aws:sqs)[Failed ticket delivery] in projections
service replica(aws:dynamodb)[Read-only sales replica] in recovery
service audit(aws:s3)[Protected audit archive] in auditRegion
%% @edge waf edge control | WAF web ACL is associated with the distribution; not an extra request proxy hop.
waf:R --> L:edge
%% @edge edge auth identity | Browser starts user-pool login; identity data is not cached as site content.
edge:R --> L:auth
%% @edge auth api identity | Browser presents scoped access token; authorizer verifies issuer and audience.
auth:R --> L:api
%% @edge api reserve request | Authenticated booking command; server validates event, buyer and purchase limits.
api:R --> L:reserve
%% @edge reserve sales request | Transactional conditional capacity update and outbox record; application expiry, not TTL deletion, releases holds.
reserve:R --> L:sales
%% @edge sales pipe event | DynamoDB Streams feed a configured EventBridge Pipe with duplicate-tolerant processing.
sales:T --> B:pipe
%% @edge pipe bus event | Filter committed purchases; do not independently dual-write from reservation code.
pipe:R --> L:bus
%% @edge bus door event | Door-list projection can lag and must deduplicate event versions.
bus:R --> L:door
%% @edge bus mail event | Independent delivery queue decouples email work from the reservation transaction.
bus:T --> B:mail
%% @edge mail failed event | Configured SQS redrive after failed consumer attempts; mail worker is omitted from this projection view.
mail:R --> L:failed
%% @edge sales replica replication | Asynchronous global-table replica is read-only by application policy; no active-active capacity allocation.
sales:B --> L:replica
%% @edge reserve audit control | Audit pipeline records sensitive booking actions in a separate account; transport and KMS policies require implementation.
reserve:T --> L:audit

Reproduce this collection from the Beautiflow repository:

bun scripts/build-boring-diagrams.ts

Measured evidence

Full evidence JSON
Native geometry
0 findings across 8 measured checks
Styled render integrity
0 element, plain-label, ID or reference findings
Authored annotations
6 boundaries · 12 relationship meanings
AWS configuration
Not validated

These checks do not establish visual quality, every decorative mark, browser glyph ink, edge-label boxes or deployed AWS correctness. Architecture has guarded transforms, not automatic polish.

Source SHA-256

3d0dc22e540c66daf688205e91b6f5076bdf8c1b123cabe57af292b0ea780d04
Read all 12 relationships

Line patterns distinguish requests, credentials, events, replication, configuration/control and recovery. Hover a styled connector for its meaning. Native layout preserves routes but does not include these gallery annotations.

Authored flow meanings, not deployed AWS configuration evidence
FromToKindMeaning
Edge WAF policyProtected ticket sitecontrolWAF web ACL is associated with the distribution; not an extra request proxy hop.
Protected ticket siteTicket buyer sign-inidentityBrowser starts user-pool login; identity data is not cached as site content.
Ticket buyer sign-inJWT ticket APIidentityBrowser presents scoped access token; authorizer verifies issuer and audience.
JWT ticket APIReserve capacityrequestAuthenticated booking command; server validates event, buyer and purchase limits.
Reserve capacityReservations and outboxrequestTransactional conditional capacity update and outbox record; application expiry, not TTL deletion, releases holds.
Reservations and outboxStreams to event buseventDynamoDB Streams feed a configured EventBridge Pipe with duplicate-tolerant processing.
Streams to event busCommitted purchaseseventFilter committed purchases; do not independently dual-write from reservation code.
Committed purchasesDoor-list projectoreventDoor-list projection can lag and must deduplicate event versions.
Committed purchasesTicket delivery queueeventIndependent delivery queue decouples email work from the reservation transaction.
Ticket delivery queueFailed ticket deliveryeventConfigured SQS redrive after failed consumer attempts; mail worker is omitted from this projection view.
Reservations and outboxRead-only sales replicareplicationAsynchronous global-table replica is read-only by application policy; no active-active capacity allocation.
Reserve capacityProtected audit archivecontrolAudit pipeline records sensitive booking actions in a separate account; transport and KMS policies require implementation.
Architecture assumptions & omissions
  • Reservation code must atomically enforce capacity, purchase idempotency and outbox insertion. Hold expiry is application logic; asynchronous DynamoDB TTL deletion is not a booking clock.
  • The Streams-to-bus element aggregates an EventBridge Pipe and its configured target. Consumers tolerate duplicate events, lag and version changes. The mail worker and connection details are omitted.
  • The illustrated global-table replica is read-only by application/IAM policy, not an inherently read-only DynamoDB service mode. Failover needs fencing of the old writer, reconciliation and an explicit sales-resumption decision.
  • CloudFront/WAF are global account resources; Cognito, SQS and DynamoDB are regional. Edge login arrows show browser identity progression. The audit arrow summarizes a separately configured pipeline, not Lambda writing directly across accounts without permission.