Architecture
Reconciliation at 10,000 TPS: the failure modes nobody designs for
The arithmetic is trivial. What breaks is key stability, exception ownership and the inability to answer what was true on a given day.
· 7 min read
Every reconciliation system starts correct. It is built against a month of files by someone who understands the domain, and it matches almost everything.
Then volume arrives, and with it three failures that are structural rather than arithmetic.
Start with the exception arithmetic
Take a platform clearing three million transactions a day. A 99.9% match rate sounds like a system in good health. It produces three thousand unmatched items every day, and if each takes four minutes to resolve, that is a full-time team of roughly four people doing nothing else.
Push the match rate to 99.95% and the queue halves. That is the calculation that justifies the engineering, and it is almost never the one presented, because the headline number people report is the match rate rather than the queue it implies.
It also sets the real design constraint. At that volume an exception workflow is a production system with its own throughput requirements, not a spreadsheet with a rota attached.
Failure one: the key was never stable
UPI gives you a UTR. IMPS gives you an RRN. Cards give you an ARN. These are not interchangeable, they are not formatted consistently across providers, and at least one of your PSPs will change the field they populate without telling you.
The variation is mundane and relentless: leading zeros stripped by a spreadsheet export, a reference wrapped in a longer composite string, the same identifier arriving in a different column after a provider's release. None of it is intellectually hard and all of it silently reduces the match rate.
The system that survives normalises the key at ingest, versions the normalisation rules, and alerts when an unexpected format arrives rather than silently failing to match it. Give unrecognised formats a quarantine path rather than letting them fall through to the unmatched pile, because a quarantine queue is a bug report and the unmatched pile is noise.
Version the rules because you will need to re-run a past period under the rules as they stood. A normalisation change applied retroactively to history is itself a source of unexplained movement.
Failure two: exceptions have no owner
An unmatched item goes to a queue. The queue is a shared mailbox, or a tab. Nobody owns an individual item, so items age. Aged items get written off, and the write-off threshold becomes the de facto accuracy target.
Exceptions need ownership, aging and escalation as first-class concepts. Not because the process is complicated, but because without them the system has no feedback loop and quietly gets worse.
The metric that matters is time-to-resolution by exception category, not the headline match rate. A match rate tells you how much work arrived. Time-to-resolution tells you whether the work is being done, and the category breakdown tells you which upstream integration to go and fix.
Failure three: you cannot reconstruct the past
Six months later, an auditor asks what was true on the 14th. If your ledger is a mutable table, the honest answer is that you do not know — you know what is true now, and what the 14th became after three months of corrections.
Event sourcing is the standard answer and it is the right one. The entries are append-only, corrections are new compensating events rather than edits, and any date can be replayed exactly as it stood.
Two practical notes. Replay cost grows with history, so take periodic snapshots and treat them as a cache you can always rebuild rather than as the record. And decide your retention against the regulatory period you actually have to answer for, because storage is cheap and discovering a gap during an audit is not.
Two things that bite after the three above
Most reconciliation is two-way — your ledger against the PSP file. Money moves in three places, so the third leg is the bank statement, and a two-way reconciliation that balances can still be missing a settlement that never landed.
Then timing. Value date and posting date are different fields and different questions, and a transaction authorised at 23:59 can appear in the next day's file. A cutoff rule that is implicit in code rather than stated in configuration produces a recurring, unexplained edge-of-day discrepancy that everyone eventually learns to ignore.
What the rebuild actually looks like
The sequence is: normalise the key, make the ledger append-only, give exceptions an owner. Only then is it worth tuning the matching passes, because until the first three are done you are tuning against a moving target.
Keep the deterministic pass and the tolerance pass separate, and make the tolerance pass explain itself. A match made on a two-rupee rounding difference should record that it was, so the tolerance rules can be audited rather than trusted.
The parallel-close period is non-negotiable. Both systems close the same days until they agree, because agreement on live data is the only evidence worth having before a switch.