Preparing your design workspace

Loading the problem and your latest saved attempt…

Design a Real-Time Payment Count Dashboard

Design a trustworthy payment-count projection that evolves from one executive dashboard to high-rate updates and thousands of concurrent viewers.

Problem statement

Design an internal admin dashboard that displays the number of payments made. Begin with the source's initial case of one executive viewer, then explain how the design evolves as payment updates and dashboard users increase.

For this exercise, assume authorized operators can view completed-payment counts for the current hour, current day, and all time. Each payment produces a stable ID and monotonically versioned status events; only its latest completed status contributes once, while a later correction can remove it from the count.

At growth scale, the dashboard should reflect committed payment state within five seconds at p95 and may show its as-of time when recovery causes temporary staleness. Counts must eventually reconcile to the authoritative payment ledger.

Payment initiation, settlement, refunds, financial-ledger mutation, and per-customer analytics are outside scope; this system consumes payment status events and serves aggregate internal analytics.

What to build

  1. The analytics system can consume versioned payment-status events and make each payment's latest completed state affect the count exactly once.
  2. An authorized operator can read completed-payment counts for the current hour, current day, and all time together with an as-of time.
  3. An open dashboard can obtain newer count versions without regressing to an older snapshot or requiring a query against the payment ledger for every refresh.
  4. Operators can observe projection lag and reconcile or rebuild counts from the authoritative payment ledger after gaps, corruption, or extended outages.

At scale

  • Source fact: the initial dashboard has one executive viewer, and the design must evolve as both payment updates and the number of users increase.
  • Practice assumption: the initial system receives tens of payment-status updates per minute, while the growth design handles peaks of 100,000 events per second and 10,000 concurrent dashboard viewers.
  • Practice assumption: healthy dashboard reads complete within 250 ms at p95 and reflect committed payment state within 5 seconds at p95; responses expose an as-of time when the projection is stale.
  • Practice assumption: payment events may be duplicated, delayed, or delivered out of order, but each payment's latest version must contribute correctly and a rebuild must converge to the authoritative ledger.
  • Practice assumption: retain detailed projection inputs for 30 days and hourly and daily aggregates for seven years, so normal reads do not scan the payment ledger.