Skip to main content

Module soak

Module soak 

Source
Expand description

The sustained-load and failure contract, and the judge that grades a run against it.

A soak in this repository is three things kept apart on purpose:

  • a contract, a YAML file under bench/soak/ that declares every limit before the run: host, disk, seed, client settings, throughput targets, latency budgets, recovery deadlines and the fault plan;
  • an executor, the soak_contract suite of krabka-broker, which runs the contract’s load against an isolated three-broker cluster, injects its faults and records evidence;
  • this judge, which reads the two back and returns a verdict.

A disaster-recovery contract is executed by krabka-soak-drill, through drill, inside the qualification drill instead: it runs the same load through a capture and the loss of the source cluster, and reads back the cluster restored from the capture. recovery places every record on its side of the capture boundary and measures the recovery point and recovery time.

client is the half both executors share: the producers, the live consumers and the read-back. It does IO, and the judge never calls it.

The judge is pure: it does no IO and owns no clock, so every rule it applies is unit-tested here against evidence whose answer is known. The executor only measures. krabka-soak-check is the command-line front end, and its self-check proves the judge catches an injected missing record and an injected missed deadline.

The design document is crates/bench-driver/docs/soak-contract-design.md.

Modules§

client
The client side of a contract run: the paced producers, the live consumer groups, and the read-back after the load.
contract
The sustained-load contract: what a soak declares before it runs.
deadline
The deadline checker: every fault ran, was cleaned up, and was recovered from in time; every path stayed inside its budgets.
drill
The disaster-recovery drill’s side of a soak: the declared load run against the source cluster until it is lost, and the read-back of the cluster restored from the capture.
evidence
What a soak run records, in the form the verdict is computed from.
ledger
Sequence sets: the compact form every soak ledger keeps its records in.
lifecycle
The lifecycle contract: the release a cluster starts on, the transitions it goes through under load, and whether it may be rolled back to that release.
reconcile
The reconciler: what the producers were told against what the readers saw.
recovery
A disaster-recovery drill, judged: which records the capture had to hold, which it lost, and how long recovery took.
schedule
The fault schedule a contract expands to.
synthetic
Synthetic evidence: the run a contract describes, as if every record arrived and every recovery took half its deadline.
verdict
The verdict: a contract and a run’s evidence, judged.