BellJar: A new framework for testing system recoverability at scale
BellJar is Meta's framework for proving that infrastructure services can recover from a total outage. It builds ephemeral VM environments that are indistinguishable from production but have all network traffic blackholed by fault injection, loopback included. Operators then allowlist only the specific capabilities their recovery needs, such as DNS or a named storage cluster. Each test is written in a few lines of Python and combines the service, hardware, runbook steps, tooling, validation criteria and allowed dependencies into a Boolean recoverability check that can run in CI/CD. The tests also regenerate runbook documentation and expose hidden or circular dependencies. Combined across teams, they form a recovery graph that differs from the runtime graph seen in distributed tracing.
Related posts
- Lights Out, Systems On: Validating Instant Power Loss Readiness
Meta Engineering easyNoviceInstantaneous PowerLoss Storm is Meta's disaster-readiness exercise that cuts power to an entire data center region with zero notice, then validates that storage, compute and the Twine orchestrator can bootstrap autonomously. Two bootstrapping hazards had to be fixed. Circular dependencies among control-plane services are caught with Belljar tests in CI/CD and broken with a Twine recovery kit (Twrko). A "boomerang" problem, where power-related unavailability events shut down the orchestrator itself, was solved by having control-plane services ignore those shutdown signals. Meta defined data loss, facility damage and cross-region impact as unacceptable while tolerating transient errors and bounded staleness, then rolled out the tests incrementally: pre-production regions, then shadow regions, then small production regions, and finally large ones.
- A Descent Into the Vörtex
TigerBeetle mediumAdeptTigerBeetle has added Vortex, a non-deterministic, generative full-system test harness that complements its Deterministic Simulation Testing by exercising real production binaries and client libraries from the outside in. A supervisor coordinates a cluster of stock replicas, a workload that checks safety properties, and language-specific client drivers (Zig and Java so far). It injects network faults through a TCP proxy, kills or pauses processes, and runs liveness checks. In four months it found two bugs: incorrect request batching in tb_client and double connection termination. Planned work includes continuous runs, upgrade testing, network partitions and storage faults.
- How we use formal modeling, lightweight simulations, and chaos testing to design reliable distributed systems
Datadog Engineering hardMasterDatadog validated the design of Courier, a multi-tenant message queue built on multiple FoundationDB clusters after its March 2023 outage, by combining TLA+ formal modeling, lightweight simulations and chaos testing. Each tenant is sharded across 4 of 8 FoundationDB clusters so that no two tenants share the same set, and brokers health-check clusters and route around failures. The TLA+ spec models brokers, senders and receivers with weak fairness, and TLC checks properties such as at-least-once delivery across every reachable state. Simulations then cover what model checking cannot, such as latency, cost and scalability. Together these give design-level confidence that unit tests miss, at the cost of keeping models and simulations in sync with the design.
- Autonomous testing of services at scale
Meta Engineering mediumAdeptMeta built an integration testing framework for back-end services that reuses production containerization and routing to spin up ephemeral test environments, with per-service boundaries where requests go to local services, in-process Python mocks, in-memory replicas, production (read-only) or are blocked. An autonomous extension mirrors a service's Twine production spec, isolates it via application-level RPC filtering plus an LD_PRELOAD layer intercepting libc connect/sendto/sendmsg, and routes unknown RPCs to a universal mock, letting one-third of services run safely with no human setup. Thrift's reflective IDL lets it auto-generate fuzz harnesses and dependency mocks, and mutating sanitized recorded production requests helps fuzzing reach deep code paths past input validation.
- Protocol-Aware Deterministic Simulation Testing
TigerBeetle hardMasterTigerBeetle's deterministic simulator (the VOPR) has full visibility into each replica's consensus and storage state, so it can check invariants that black-box tools like Jepsen or Antithesis cannot see through user-facing APIs. For safety, it asserts that every committed WAL entry has matching checksums across replicas, that LSM manifest structure is consistent everywhere, and that replicas are byte-for-byte identical, which goes deeper than the cheaper production checks that crash a diverging backup. For liveness, it enforces per-replica invariants: a replica with an uncorrupted WAL must never need cluster coordination to recover, and missing blocks must be repaired from intact copies on other replicas whenever any copy still exists.