Deterministic chaos testing for Kubernetes.
Inject faults. Verify SLAs. In CI. — same seed, same faults, same results.
██╗ ██╗███████╗██╗███████╗███████╗███╗ ██╗███████╗██╗███╗ ███╗
██║ ██║██╔════╝██║██╔════╝██╔════╝████╗ ██║██╔════╝██║████╗ ████║
███████║█████╗ ██║███████╗█████╗ ██╔██╗ ██║███████╗██║██╔████╔██║
██╔══██║██╔══╝ ██║╚════██║██╔══╝ ██║╚██╗██║╚════██║██║██║╚██╔╝██║
██║ ██║███████╗██║███████║███████╗██║ ╚████║███████║██║██║ ╚═╝ ██║
╚═╝ ╚═╝╚══════╝╚═╝╚══════╝╚══════╝╚═╝ ╚═══╝╚══════╝╚═╝╚═╝ ╚═╝
Deterministic Chaos Testing for Kubernetes
The Experiment
No Cluster Required
Deterministic simulation engine runs entirely in-memory. 20 seeds explored in 22ms. No Kubernetes needed.
Deterministic Replay
Same seed = same faults = same results. Every bug is perfectly reproducible.
Auto-Discovery
Scrapes K8s pods and health probes automatically. Zero CRDs, zero config.
Fault Injection
Pod crashes, network latency, partitions, DNS failures, stress. Real infrastructure failures, controlled.
SLA Property Checking
8 built-in properties: recovery time, availability, error budgets, cascade detection, DNS, steady-state. Exit code 1 on failure.
Explore, Bisect & Diff
Run 50 seeds in parallel. Binary search for the minimal failing seed. Diff two seeds side-by-side.
Init Presets
Battle-tested configs for microservices, stateful workloads, and CI. One command: heisensim init --preset microservice
CI-Native
GitHub Action, GitLab CI template, JUnit XML, JSON output. Drop into any pipeline.
Process Fault Injection
Attach to running processes via ptrace. Intercept connect(), socket(), bind() syscalls. Inject ECONNREFUSED, EMFILE, latency — no containers, no kernel modules.
Multi-Thread Tracing
Automatically traces Go goroutines, Tokio workers, JVM thread pools. Enumerates /proc/PID/task/ and handles PTRACE_O_TRACECLONE events.
Port Filtering
Target specific connections with --port 5432. Reads sockaddr from process memory via PTRACE_PEEKDATA. Fault only Postgres without breaking DNS.
A/B Baseline Diffing
Automatically captures pre-chaos metrics, then asserts degradation stays within bounds. --import-baseline enables golden baseline CI drift tracking across deploys.
Graceful Shutdown
Cooperative SIGINT handling, fault tracking with requeue-on-failure, kill_on_drop on all kubectl processes. Clean cleanup even under chaos.
The Hypothesis → The Proof
Define properties in TOML. heisensim evaluates them after every chaos test. Exit code 1 when they fail — CI-friendly.
[[properties]]
name = "fast-recovery"
type = "recovery_time"
max_seconds = 30
[[properties]]
name = "high-availability"
type = "availability"
min_percent = 99.0
╔═══════════════════════════════════════════════════════════════╗
║ PROPERTY RESULTS 4/5 PASS ║
╠═══════════════════════════════════════════════════════════════╣
║ ✅ PASS fast-recovery recovery < 30s (actual: 8.2s) ║
║ ❌ FAIL high-availability avail ≥ 99% (actual: 94.2%) ║
║ ✅ PASS bounded-errors max 5 consecutive (actual: 2) ║
║ ✅ PASS no-cascade no cascading failures ║
║ ✅ PASS low-latency p99 < 500ms (actual: 230ms) ║
╚═══════════════════════════════════════════════════════════════╝
Peer Review
| Feature | heisensim | Chaos Monkey | Litmus | Chaos Mesh | Gremlin |
|---|---|---|---|---|---|
| No Cluster Required | ✅ | ❌ | ❌ | ❌ | ❌ |
| SLA Property Checking | ✅ | ❌ | ❌ | ❌ | ❌ |
| Deterministic Replay | ✅ | ❌ | ❌ | ❌ | ❌ |
| Seed Bisection & Diff | ✅ | ❌ | ❌ | ❌ | ❌ |
| Auto-Discovery | ✅ | ❌ | ⚠️ | ⚠️ | ❌ |
| Zero-CRD CLI | ✅ | ❌ | ❌ | ❌ | ❌ |
| Fault↔Failure Correlation | ✅ | ❌ | ❌ | ❌ | ❌ |
| GitHub Action / GitLab CI | ✅ | ❌ | ❌ | ❌ | ⚠️ |
| JUnit / JSON Output | ✅ | ❌ | ❌ | ❌ | ⚠️ |
| OTel Metrics | ✅ | ❌ | ❌ | ❌ | ⚠️ |
| A/B Baseline Diffing | ✅ | ❌ | ❌ | ❌ | ❌ |
| Open Source | ✅ | ✅ | ✅ | ✅ | ❌ |
Lab Setup
Homebrew
brew install heisensim/tap/heisensim
Nix
nix run github:heisensim/heisensim
Cargo
cargo install heisensim
Docker
docker run ghcr.io/heisensim/heisensim:latest
GitHub Action
uses: heisensim/action@v1