Kafka data generator and load testing tool - generate fake messages, simulate producers and consumers, test broker failures, and run chaos engineering scenarios
157
stars
73
commits
Go
primary language
Aug 22, 2026
updated
Khaos is an open-source Kafka traffic generator, load-testing tool, and chaos engineering CLI for reproducing realistic Kafka workloads and failure scenarios (consumer lag, hot partitions, rebalances, and broker failures) on demand, instead of waiting for production to find them.
Documentation · Quick Start · Scenario Reference
Scenarios are plain YAML. No code, no client library, no instrumentation in the system under test.
go install github.com/aleksandarskrbic/khaos/cmd/khaos@latest
khaos list # see the bundled scenarios
khaos run traffic/high-throughput # auto-starts a local 3-broker Kafka cluster
khaos run manages its own local Kafka cluster via Docker Compose. To target a cluster you
already have, including managed clusters needing SASL/SSL, use khaos simulate instead. See the
Quick Start guide and
Installation for release binaries and Docker.
khaos run traffic/hot-partition # skewed key distribution overloads one partition
khaos run traffic/consumer-lag # producer rate outpaces slow consumers
khaos run chaos/broker-chaos # brokers stop and restart while traffic keeps flowing
khaos run chaos/rebalance-storm # a consumer group rebalances repeatedly
khaos validate checks a scenario file's structure without running it: the same command Khaos's
own CI runs against every bundled scenario. See the
Scenarios and
Guides sections of the docs for what
each one actually configures and why.
Full documentation, including the CLI reference, the scenario YAML schema, and guides for load testing, data generation, and each failure scenario, lives at getkhaos.dev/docs:
Khaos is a single Go binary. The scenario engine is independent of any user interface: it exposes
one read method, Snapshot(), and the terminal UI, the headless log loop, and the final summary
table all poll it. Nothing in the engine knows about terminals, so a headless run in CI behaves
identically to an interactive one, and a stalled UI can't stall a run.
Kafka access is franz-go, a pure-Go client, which is what makes
CGO_ENABLED=0, cross-compilation, go install, and a distroless/static image all work without
a C toolchain. See the Concepts page for the full picture.
Khaos was rewritten from Python to Go: a single static binary, no runtime dependencies, and a pure Go Kafka client that cross-compiles cleanly. See the release notes for details.
Issues and pull requests are welcome. See CONTRIBUTING.md. If Khaos is useful to you, a star helps others find it.
Apache 2.0. See LICENSE.
73 commits
Go
86.0%
MDX
8.2%
TypeScript
4.6%
Kafka data generator and load testing tool - generate fake messages, simulate producers and consumers, test broker failures, and run chaos engineering scenarios
157
stars
73
commits
Go
primary language
Aug 22, 2026
updated
Khaos is an open-source Kafka traffic generator, load-testing tool, and chaos engineering CLI for reproducing realistic Kafka workloads and failure scenarios (consumer lag, hot partitions, rebalances, and broker failures) on demand, instead of waiting for production to find them.
Documentation · Quick Start · Scenario Reference
Scenarios are plain YAML. No code, no client library, no instrumentation in the system under test.
go install github.com/aleksandarskrbic/khaos/cmd/khaos@latest
khaos list # see the bundled scenarios
khaos run traffic/high-throughput # auto-starts a local 3-broker Kafka cluster
khaos run manages its own local Kafka cluster via Docker Compose. To target a cluster you
already have, including managed clusters needing SASL/SSL, use khaos simulate instead. See the
Quick Start guide and
Installation for release binaries and Docker.
khaos run traffic/hot-partition # skewed key distribution overloads one partition
khaos run traffic/consumer-lag # producer rate outpaces slow consumers
khaos run chaos/broker-chaos # brokers stop and restart while traffic keeps flowing
khaos run chaos/rebalance-storm # a consumer group rebalances repeatedly
khaos validate checks a scenario file's structure without running it: the same command Khaos's
own CI runs against every bundled scenario. See the
Scenarios and
Guides sections of the docs for what
each one actually configures and why.
Full documentation, including the CLI reference, the scenario YAML schema, and guides for load testing, data generation, and each failure scenario, lives at getkhaos.dev/docs:
Khaos is a single Go binary. The scenario engine is independent of any user interface: it exposes
one read method, Snapshot(), and the terminal UI, the headless log loop, and the final summary
table all poll it. Nothing in the engine knows about terminals, so a headless run in CI behaves
identically to an interactive one, and a stalled UI can't stall a run.
Kafka access is franz-go, a pure-Go client, which is what makes
CGO_ENABLED=0, cross-compilation, go install, and a distroless/static image all work without
a C toolchain. See the Concepts page for the full picture.
Khaos was rewritten from Python to Go: a single static binary, no runtime dependencies, and a pure Go Kafka client that cross-compiles cleanly. See the release notes for details.
Issues and pull requests are welcome. See CONTRIBUTING.md. If Khaos is useful to you, a star helps others find it.
Apache 2.0. See LICENSE.
73 commits
Go
86.0%
MDX
8.2%
TypeScript
4.6%