Skip to content

Settlement Lab v0.2.0

Latest

Choose a tag to compare

@NachoEstevo NachoEstevo released this 19 Nov 22:29

What happens to a payment when the primary dies after it has answered the client? Settlement Lab v0.2.0 starts a PostgreSQL 18.7 primary and a physical standby in an isolated Docker Compose project. Two independent Java workers submit real settlement commands. An external client records receipts, interrupts streaming, fences the primary and promotes the standby. It compares each acknowledged or unresolved command with the new primary before any case command is retried.

Replication Confirmed business commands present before retry, per trial First fresh settlement ACK, median [observed range]
Asynchronous 5 of 6 8.903 s [8.785–8.941]
Synchronous 5 of 5 7.765 s [7.622–8.086]

The table covers three trials per mode on one Windows Docker Desktop host. Time starts at the request to kill the old primary. A second connection checked the receipt for the new settlement. Promotion and route switching are controlled by the lab. In async mode the missing ACK belonged to a 7-unit settlement issued after the replication stream was cut. In sync mode the primary waited for the absent standby and never acknowledged that settlement. The independent client recorded two unresolved case commands in each trial; one was present after promotion and the other was absent. All replays produced one financial effect per command. The promoted primary operated alone.

Download settlement-lab-0.2.0.zip, extract it, and run the following from the extracted application directory with Java 21, Python 3 and Docker Compose available.

python failover/run.py --mode both --repetitions 3 --out my-evidence
python failover/verify.py my-evidence

The CSV and failover-v02-evidence.zip contain the six Windows trials behind the table. failover-evidence-windows.zip packages the same 51 files under a descriptive name. failover-evidence-linux-ci.zip contains six separate trials from Linux CI. Extract one evidence ZIP and pass its failover-evidence directory to the same verifier. SHA256SUMS covers all downloads. Measurements and environment · Linux failover run