Quotas and rate limits
Metering answers “120 of 1,000 calls this month”. A ledger earns its cost when the units are owned property: purchased, refundable, disputable.
Why Ledger
A ledger is not hard because the data model is complex. It is hard because ten separate failure modes each look solved in isolation until they interact. Here they are in business terms, with what Ledger does about each.
The ten problems
01
A ledger that stores money as approximate numbers loses fractions of a penny on every calculation. You find out during an audit, after millions of transactions, and you cannot fix it without replaying history.
What Ledger does
Every amount is a whole number of minor units. Nothing is ever rounded away.
02
If only the application checks that debits equal credits, one code path that forgets — or one person with database access — leaves you with books you cannot trust.
What Ledger does
The database refuses an unbalanced transaction at the moment of commit, whatever wrote it.
03
Ten requests read a £100 balance at the same instant, all approve a spend, and the account ends £900 overdrawn. Standard code gets this wrong; the usual fix collapses under traffic.
What Ledger does
Balances are locked in a fixed order before checking, and a database constraint is the final wall.
04
A client times out and retries. If the record of the first attempt and the money movement are two separate steps, a crash between them either pays twice or reports a payment that never happened.
What Ledger does
The movement and its receipt are written together. A retry replays the receipt or does the work; there is no third outcome.
05
A declined transaction that left half an entry behind creates money that does not exist.
What Ledger does
Checks run inside the same step as the write. A refusal leaves nothing behind.
06
A shared ledger serving many businesses is one missing filter away from showing one company’s money to another.
What Ledger does
Isolation is enforced inside the database, independently of the application, and fails closed.
07
Access controls can be revoked, bypassed or misconfigured. If the database allows an entry to be deleted, some day one will be.
What Ledger does
No edit or delete path exists on the journal. Corrections are new, visible entries.
08
A shared control account is part of every transaction. Lock it and throughput collapses; do not lock it and overdrafts return.
What Ledger does
High-traffic control accounts are totalled in the background by a rule that can never skip an entry.
09
A financial system cannot pause for maintenance, and a careless change to a live table stalls every transaction in flight.
What Ledger does
Every change ships as a versioned migration, never weakens a rule, and is re-verified by the full probe suite before it is accepted.
10
Even a correct ledger needs an independent check that the running totals equal the sum of the entries, and that the whole system nets to zero. Without it, corruption is found months late.
What Ledger does
A background reconciler keeps proving both, and raises an alarm — and stops postings — the moment they diverge.
Every answer above corresponds to a guarantee with a named check.
Where it does not fit
Naming them is part of being honest about what the product is.
Metering answers “120 of 1,000 calls this month”. A ledger earns its cost when the units are owned property: purchased, refundable, disputable.
Page views and sign-ups have no source account. Double-entry adds bookkeeping without adding a guarantee.
A hold reserves value for a while; it is not a state machine for an order. Keep the order’s progress where your workflow lives.
Build or buy
You could, and most teams that try get the first eight of the ten problems right and the last two wrong, usually years later. A ledger is a small amount of code protecting a large amount of money; the value is in the rules being enforced by the database and proven continuously, which is the part that is expensive to do once and pointless to do twice.
Because application code has many paths and many authors, and any one of them can skip a check. A rule the database enforces holds for every path, including a person with direct access, and cannot be forgotten in the next release.
It stays visible. You post a new transaction that reverses it, and both remain on the books. Nothing is ever edited or deleted, which is exactly what an auditor wants to see.
Yes, when the units are owned by the customer: bought, refundable, transferable or disputable. If you only need to know how much was consumed against a limit, a metering service is simpler and cheaper.
Tell us what you keep books of and we will set up a tenant, mint your first key and walk you through the tour.