A PoC simulation harness for probing edge-cache consistency failure boundaries under configurable fault injection.
Runs a closed-loop experiment:
- A mutation source publishes versioned writes, a chaos router delivers them to edge nodes with configurable packet loss, delay, reordering, and partitions.
- Client simulators roam across edges reading and writing data.
- A metrics collector tracks stale reads, read-your-writes violations, monotonic-read violations, inversion distance severity (version and temporal buckets), micro-inversions, and time-to-consistency latency.
- Results are persisted as a JSON artifact.
metrics_snapshot.monotonic_violations: count of monotonic-read regressions.metrics_snapshot.inversion_distance.version_buckets: logical rollback magnitude buckets (v1,v2_5,v6_20,v21_plus).metrics_snapshot.inversion_distance.temporal_buckets: physical rollback lag buckets (lt_5ms,ms5_20,ms21_100,gt_100ms).metrics_snapshot.inversion_distance.micro_inversions: violations where rollback is<5versions and<20ms.
cargo run --release -- run --scenario scenario.json --out report.json{
"seed": 42,
"duration_secs": 30,
"edge_count": 3,
"client_count": 16,
"mutation_rate_per_sec": 10.0,
"chaos": {
"delay_ms": 50,
"loss_rate": 0.05,
"reorder_rate": 0.1,
"partition_duration_ms": 500,
"burst_lag_ms": null,
"source_lag_policy": "ObserveAndContinue"
},
"steps": [
{ "at_secs": 10, "step": { "DropInvalidationsPercent": { "percent": 80.0 } } },
{ "at_secs": 20, "step": { "PartitionEdge": { "edge_id": 1, "duration_ms": 2000 } } }
]
}| Step | Effect |
|---|---|
IncreaseMutationRate |
Change write rate mid-run |
DropInvalidationsPercent |
Drop a percentage of invalidations delivered to edges |
PartitionEdge |
Isolate one edge for a fixed duration |
KillEdgeNode |
Permanently deactivate an edge |
| Variable | Default | Description |
|---|---|---|
EDGE_CONSISTENCY_SOURCE_FANOUT_CAPACITY |
1024 |
Broadcast channel capacity |
RUST_LOG |
— | Tracing filter (e.g. info, debug) |
cargo build --release
cargo testRequires Rust 1.75+.