Live counter vs settlement report
Your task
A payments company shows merchants a 'today's volume' counter that must update within seconds, AND a finalized end-of-day settlement report that must be exactly correct to the cent (it triggers payouts). Transactions can be retried, reversed, or disputed hours later. ~30k txns/sec peak. Design how you serve the live counter and the authoritative report. Decide whether you run one pipeline or two, and how the two numbers reconcile so merchants don't see the live counter contradict the official report.
It covers
- Lambda vs kappa
- Windowing
- Reconciliation