Fintech / Payments ops
Ledgerline
40M transactions/day. 6hr close cut to 40 min.
Ledgerline reconciles payments for mid-market lenders. Their month-end close had grown into a six-hour nightly batch that failed often enough to need a person watching it, and the people watching it were the people who had built it.
We replaced the batch with an event-sourced ledger that reconciles continuously, and handed the team the runbook for it. This page is a placeholder write-up on a real template — the numbers below are illustrative until the engagement is cleared for publication.
What the batch actually cost
The six hours were not the problem. The problem was that a failure at 03:00 meant the close did not happen, and nobody knew until someone opened a dashboard at 08:00.
| Stage | Before | After |
|---|---|---|
| Nightly close | 4h 10m | 90s |
| Manual corrections | 31/mo | 0 |
| Overnight pages | 11/mo | 0 |
| Engineers who can run it | 1 | 3 |
Deploy frequency followed
Once the close stopped being an event, releases stopped being scheduled around it. Both series below are drawn on one Y scale, so the change is not flattered by the axis.
Deploys per week
1deploys
W6
View data
| Series | Label | Value |
|---|---|---|
| Before | W1 | 1 deploys |
| Before | W2 | 0 deploys |
| Before | W3 | 2 deploys |
| Before | W4 | 1 deploys |
| Before | W5 | 0 deploys |
| Before | W6 | 1 deploys |
| After | W1 | 4 deploys |
| After | W2 | 9 deploys |
| After | W3 | 11 deploys |
| After | W4 | 14 deploys |
| After | W5 | 12 deploys |
| After | W6 | 17 deploys |
The shape of the ledger
Every movement is an append-only event. Balances are a fold over that log, so a replay is a read rather than a repair.
-- Balance is a fold, never a stored mutable number.
SELECT account_id,
SUM(amount) FILTER (WHERE posted_at <= $1) AS balance
FROM ledger_events
WHERE account_id = $2
GROUP BY account_id;Handover
Three of their engineers ran the system in production before we left, each taking one on-call rotation with us on standby and not called.
They turned up with a written plan on day four and never revised the date. The handover was a repo our team could actually read.