ChaosRank (Public SDK)
Chaos engineering requires a hypothesis. ChaosRank tells you where to point it.
💬 Questions? Feedback? Join our GitHub Discussions to connect with the team.
ChaosRank analyzes your service dependency graph and incident history to rank which service to target next.
This is the Open Core SDK. It works by collecting your system data and sending it to the ChaosRank Engine for secure, high-performance scoring.
Open Core Architecture
ChaosRank is split into two components to protect core mathematical IP while allowing public development of adapters:
- Public SDK (This repo): CLI, trace parsing, and incident collection.
- Private Engine: Core scoring algorithms (Blast Radius, Fragility, Adaptive).
Choose Your Hosting Model:
- SaaS (Community): Point your SDK to a managed ChaosRank Engine URL.
- Self-Hosted (Enterprise): Run the engine Docker container in your own infrastructure.
Results
Evaluated on the DeathStarBench social-network topology (31 services) from the UIUC/FIRM dataset (OSDI 2020). ChaosRank's engine identifies high-risk services by combining structural importance (traces) and history (incidents).
| Metric | ChaosRank | Random | Improvement |
|---|---|---|---|
| Mean experiments to first weakness | 1.0 | 9.8 | 9.8x |
| Mean experiments to all weaknesses | 3.0 | 23.2 | 7.8x |
ChaosRank found all 3 weaknesses in exactly 3 experiments across all 20 trials. Random selection needed 23.2 experiments on average.
How It Works
ChaosRank uses a Client-Server model. The SDK (this repo) acts as the "Body," collecting traces and incidents from your environment. These are summarized and sent to the ChaosRank Engine (The "Brain") for scoring.
traces.json ──► [ SDK Parser ] ──► [ EngineClient ] ──► [ Hosted Engine ]
incidents.csv ──► [ SDK Parser ] ──► [ EngineClient ] ──► [ Risk Ranking ]
The engine provides deterministic rankings based on:
- Blast Radius: Transitive impact of failure (Impact).
- Fragility: Load-normalized incident history (Likelihood).
- Adaptive Weights: Self-correcting risk factors based on experiment outcomes.
See docs/algorithm.md for a summary of the mathematical foundation.
Installation
ChaosRank is distributed via PyPI. We recommend installing in a virtual environment:
pip install chaosrank-cli
From Source
git clone https://github.com/Medinz01/chaosrank
cd chaosrank
pip install -e .
Configuration
ChaosRank works out-of-the-box with a shared public key for testing. Update your chaosrank.yaml:
engine:
url: "https://eud82a2ib7.execute-api.ap-south-1.amazonaws.com" # Managed SaaS Endpoint
api_key: "chaosrank-public-dev" # Shared Public Key (Rate Limited)
Or use environment variables:
export CHAOSRANK_API_KEY=chaosrank-public-dev
API Access Tiers
| Tier | Key | Limits | Support |
|---|---|---|---|
| Public | chaosrank-public-dev |
Shared, Heavy Rate Limits | Community (Discussions) |
| Pro | Private Key | High Throughput, Dedicated | Email/Direct |
Getting a Pro Key
For production-scale environments or high-frequency CI pipelines, please request a private key by starting a thread in our GitHub Discussions with the access-request label.
Usage
Basic ranking
chaosrank rank --traces ./traces.json --incidents ./incidents.csv
With async topology (Kafka, SQS, RabbitMQ)
# Step 1 — convert your async topology source
chaosrank convert --from kafka --input ./kafka-topics.json --output ./async-deps.yaml
# Step 2 — rank with async deps merged
chaosrank rank --traces ./traces.json --async-deps ./async-deps.yaml
Fetch incidents from alerting system
# From PagerDuty (no manual CSV needed)
chaosrank incidents --from pagerduty --token $PD_TOKEN --window 30d --output incidents.csv
chaosrank rank --traces ./traces.json --incidents incidents.csv
Repository Structure
chaosrank/
├── chaosrank/
│ ├── cli.py # Typer entrypoint: rank, graph, convert
│ ├── engine/ # Remote Engine Client (Communication layer)
│ ├── adapters/ # Async topology adapters (AsyncAPI, Kafka)
│ ├── incident_adapters/ # Alerting system adapters (PagerDuty, etc.)
│ ├── parser/ # Local Trace/Incident parsing & normalization
│ └── output/ # Table, JSON, Litmus renderers
├── tests/ # 244+ tests
├── docs/
│ ├── algorithm.md # Mathematical Summary
│ ├── architecture.md # Component map & Data flow
├── chaosrank.yaml # Default configuration
└── pyproject.toml
Contributing
See CONTRIBUTING.md for setup, testing, and PR guidelines.
Documentation
- docs/algorithm.md — mathematical summary
- docs/architecture.md — component map & data flow
Changelog
See CHANGELOG.md for version history.
License
Apache 2.0 — see LICENSE for full text.
Metadata
Release files for chaosrank-cli 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| chaosrank_cli-1.0.2.tar.gz | 263.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chaosrank_cli-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 522.9 kB
Release files / chaosrank_cli-1.0.2.tar.gz
| Download URL | chaosrank_cli-1.0.2.tar.gz |
|---|---|
| Size | 263.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a54d577487cc34cd0441460a39921a2c35ae0eb7e58c78a96f7547fcb08cec06
|
|
BLAKE2b-256 checksum How to use checksums |
b2894f1273cf1bf7ff85c80b3a05a08e9bfbf3ec4a422f9828d3eb66e01b43d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / chaosrank_cli-1.0.2-py3-none-any.whl
| Download URL | chaosrank_cli-1.0.2-py3-none-any.whl |
|---|---|
| Size | 259.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8d22b8ce5faf17fb886fc71a79ef320a0fe19de4b63c4e9ee28c5ed53cd9660a
|
|
BLAKE2b-256 checksum How to use checksums |
b5986ff9e98196a59750478b8e222443515259871f0adfe73eb2bfd8ab907829
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|