Problem
Events get lost, handlers fail halfway, and external systems change independently. Over time, copies of data diverge silently and nobody notices until a customer or an audit does.
Also known as: reconciler, repair-job, audit-reconciliation
Periodically compare two sources of truth, detect drift, and repair or flag differences so that eventual consistency actually converges.
Events get lost, handlers fail halfway, and external systems change independently. Over time, copies of data diverge silently and nobody notices until a customer or an audit does.
A reconciliation job is the safety net under asynchronous designs. It does not trust that events arrived; it compares what each system holds, finds differences, and fixes or reports them. Payment platforms run these daily against bank and processor reports, and the same idea underlies anti-entropy repair in distributed databases.
Pick a stable comparison window, read both sides, and diff by key.
for each window (e.g. yesterday, closed):
A = read(source_of_truth, window)
B = read(replica_or_provider, window)
missing = keys(A) - keys(B)
extra = keys(B) - keys(A)
mismatch = keys in both where checksum differs
for k in missing: enqueue idempotent repair(k)
for k in mismatch: send to review queue with both versions
emit metrics: counts, oldest age
Use closed windows or snapshots so that in-flight writes do not look like drift. Compare checksums per batch first, and drill down only where they differ.
Medium: compute and read load
Medium: triage of exceptions
Medium: matching and repair design
Job compares moving data and reports false mismatches
Auto-repair overwrites the correct side
Failed runs go unnoticed so drift accumulates