Skip to main content

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.

PyPI CI Python License

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:

  1. Public SDK (This repo): CLI, trace parsing, and incident collection.
  2. 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

Changelog

See CHANGELOG.md for version history.

License

Apache 2.0 — see LICENSE for full text.

Metadata

Release files for chaosrank-cli 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chaosrank-cli 1.0.3
File Size Uploaded
chaosrank_cli-1.0.3.tar.gz 263.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for chaosrank-cli 1.0.3
File Interpreter ABI Platform
chaosrank_cli-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 522.6 kB

Release files / chaosrank_cli-1.0.3.tar.gz

Download URL chaosrank_cli-1.0.3.tar.gz
Size 263.6 kB
Tags Source
SHA-256 checksum
How to use checksums
89d44d580ee1db7d5466dabf21f9c12ad55bde51824579ea5e1190f3ec9edf22
BLAKE2b-256 checksum
How to use checksums
a585870daa97b317fbcd3ad074ed72c77950e3ca5569bd93bfc86deb0a7dfe74
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.3-py3-none-any.whl

Download URL chaosrank_cli-1.0.3-py3-none-any.whl
Size 259.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7148c5b9d5e473cd8335b67ad307ede7a0b3fea9a85e51ca420fa4a5be6f78e1
BLAKE2b-256 checksum
How to use checksums
9ece3dd1c9261f5e993567ab278464110875d0989e82363917b47c41aed342b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page