# Kavach Enterprise

> Run Kavach across a production fleet. Collect every incident, scrub sensitive data, prove fixes against real traffic, isolate only the failing customer, and drain their backlog once the fix ships.

Open-source Kavach turns one failure into a file you can replay and a check for the fix. Kavach Enterprise runs that loop for a whole fleet, in production, with the controls an operations team needs.

When a stateful service hits a bug on a production event, Kavach Enterprise:

1. **Captures it** from every pod, even when the service is killed for running out of memory.
2. **Scrubs sensitive data** from the fixture, and proves the scrubbed copy still reproduces the crash before it leaves the cluster.
3. **Stops the damage**: it holds back the effects of the failing step and quarantines only the entity it was for (one account, one order, one tenant). Everything else keeps flowing.
4. **Proves the fix**: a candidate patch must pass the incident's variants, every past incident on file, and a replay of recent production traffic, before a pull request is opened.
5. **Drains the backlog**: once the fix is deployed, the quarantined entity's held events are replayed through it in their original order, exactly once.

Every decision is written to a tamper-evident audit trail in your own storage. Everything runs in your cluster and stores data only in your own bucket; Kavach Labs receives nothing. See [Data handling](https://www.thekavachlabs.com/docs/enterprise/data-handling).

```callout
note | Access
Kavach Enterprise is not open source. To try it, write to hello@thekavachlabs.com. It builds on the open-source CLI, recorder and SDKs, which stay Apache 2.0.
```

## What it adds

| Capability | What it does |
| --- | --- |
| **Shadow healer** | A sidecar that collects fixtures from the service's shared-memory recorder rings, scrubs them, verifies they still replay, uploads them to object storage, and runs proof for candidate fixes before opening a pull request. |
| **Live gateway** | Gates each step's effects inline over a local socket or authenticated HTTP. A failing step's outputs never reach Kafka, Postgres or downstream services; its entity is quarantined. |
| **Per-entity isolation** | Locks are per entity, so a slow or failing key never blocks healthy ones. |
| **Quarantine drain** | Replays an entity's held backlog through the fixed build, in strict first-in-first-out order, fenced so only one writer ever drains it. Preview with a dry run first. |
| **Autopilot** | Policy-gated rollout of a proven fix: checks variant coverage, blast radius, confidence and locked invariants, watches a canary, rolls back on regression, then drains. |
| **Pre-merge simulation** | Replays the trailing seven days of production traffic against a pull request in CI. |
| **Immunity vault** | Every past incident, kept and replayed against each new fix, so an old bug cannot come back. Invariants mined from history (conservation, non-negativity, monotonicity, idempotency) can be locked. |
| **Kubernetes operator** | `ProtectedService`, `HealingPolicy` and `QuarantineDrain` resources, with guardrails that refuse insecure deployments. |
| **Audit ledger** | A hash-chained, optionally signed record of every capture, proof, rollout and drain, with an offline verifier. |
| **Your storage** | AWS S3, Cloudflare R2, Azure Blob Storage and Google Cloud Storage, with no cloud SDKs in the image. |

## How a fix is proved

A candidate patch is accepted only when all of these hold:

- `kavach diff` returns `fixed` on the incident, with a minimum number of reproducing variants (25 by default in a `HealingPolicy`).
- No past incident in the vault fails again.
- **No silently dropped outputs.** A "fix" that stops a crash by no longer writing to a sink is rejected.
- The patch's behaviour differs from the old build only on the paths the incident reaches.
- Locked invariants hold.

Only then is a pull request opened, or, with Autopilot enabled, the fix rolled out under policy.

## Architecture

```text
 service ──(shared-memory ring / local socket / HTTPS)──▶ kavach-daemon
                                                            │
     1. scrub sensitive fields, verify the replay still fails
                                                            ▼
                                             S3 / R2 / Azure / GCS
     2. prove the patch (variants, vault, 7-day replay) ──▶ pull request or Autopilot
     3. fenced, FIFO drain of the quarantined entity ─────▶ Kafka / Postgres / RPC

 live gateway: step passes → effects released · step fails → entity quarantined
 operator: ProtectedService, HealingPolicy, QuarantineDrain → daemons and guardrails
 every action → hash-chained audit trail in your bucket
```

The daemon is a C++23 binary in a non-root container. Its decision core is a pure state machine with no I/O, checked on every build, and it is tested under deterministic simulation of node kills, network partitions, throttling and ambiguous storage writes, with sanitizers and fuzzing in CI.

## Support

Write to hello@thekavachlabs.com for help with an installation, an incident or a security review. Include the image tag or digest you run and, for a daemon problem, the output of `/readyz` and the container log.

Response times and any SLA are set in your Enterprise agreement; see [Pricing](https://www.thekavachlabs.com/pricing).

## Next

- [Install and upgrade](https://www.thekavachlabs.com/docs/enterprise/install): access, versions, the operator, upgrades and rollback.
- [Deploy](https://www.thekavachlabs.com/docs/enterprise/deployment): the sidecar, the operator's resources and the daemon's modes.
- [Storage](https://www.thekavachlabs.com/docs/enterprise/storage): buckets and credentials.
- [Operations](https://www.thekavachlabs.com/docs/enterprise/operations): probes, metrics, alerts, sizing, network, failure modes and troubleshooting.
- [Security](https://www.thekavachlabs.com/docs/enterprise/security): scrubbing, secrets, authentication, the audit trail and how the daemon is tested.
- [Data handling](https://www.thekavachlabs.com/docs/enterprise/data-handling): what leaves the cluster, where it is kept and for how long.

Source: https://www.thekavachlabs.com/docs/enterprise
