They break different layers
Toxiproxy and Jitterbox both exist to answer the same question: what does your code do when a dependency misbehaves? They answer it at different layers of the stack, and that decides almost everything else.
Toxiproxy is a TCP proxy. You point your app at it instead of at the real service, and it forwards the bytes. Through its HTTP API (port 8474) you attach "toxics" to a proxy: add latency, throttle bandwidth, drop packets, reset the connection, stop after a number of bytes. It doesn't know or care whether the bytes are MySQL, Redis or HTTP. Shopify has used it in its development and test environments since 2014.
Jitterbox is a fake HTTP API. You point your app at a URL like https://<projectKey>.jitterbox.dev, and it answers with the responses you set up. Failure scenarios then make those answers slow, flaky or broken on purpose, at the HTTP level: a 503, a 429 with Retry-After, invalid JSON, a cut-off body, or an LLM stream that stops halfway.
So the question isn't which tool is better. It's which layer your failure lives in.
What each one can break
| Failure | Jitterbox | Toxiproxy |
|---|---|---|
500, 503, any status code |
Yes | No |
429 with Retry-After |
Yes | No |
| Invalid, empty or cut-off JSON body | Yes | Partly: limit_data closes after N bytes |
| Fixed or random latency | Yes | Yes, with jitter, per direction |
| A hang that ends in a timeout | Yes | Yes (timeout toxic) |
| Connection reset | No | Yes (reset_peer) |
| Low bandwidth, packet loss, sliced packets | No | Yes |
| Service down | Yes, as an error response | Yes, by disabling the proxy |
| LLM faults: slow first token, stream cut, malformed chunk | Yes, in OpenAI and Anthropic formats | No |
| GraphQL errors and SOAP faults | Yes | No |
| Databases, caches, queues | No | Yes |
The pattern is clear from the table. Toxiproxy is the stronger tool for network conditions (bandwidth, packet loss, resets) and for anything that isn't HTTP. Jitterbox is the stronger tool for protocol-level failures, the kind where the server answers but the answer is bad. A TCP proxy can't turn a 200 into a 429, because it never parses the response.
Control and repeatability in tests
Both tools are built for tests, so both let you decide how often a failure happens.
In Toxiproxy, each toxic has a toxicity value: the probability it applies to a connection (1.0 by default). Some toxics carry their own randomness, like jitter on latency. You add and remove toxics around the code under test, for example with the Ruby client's apply block, or reset everything with POST /reset.
In Jitterbox, each rule in a scenario fires always, with a probability, or on a sequence such as "fail twice, then succeed". The sequence counter can be reset between test runs, X-Jitterbox-Seed makes random rolls repeatable, and X-Jitterbox-Fault forces a specific fault on a single request. Every decision shows up in the request log with the reason ("sequence step 2/3 = fire"), and the resilience report grades how your client reacted: did it retry, back off, respect Retry-After, keep its idempotency key, give up eventually.
That last part is the main difference in what you get back. Toxiproxy reports what it did to the connection (logs and Prometheus metrics); whether your client coped is up to your own assertions. Jitterbox records each attempt and checks retry behavior for you.
Running it
Toxiproxy runs where you run it. It ships as a binary for Linux, macOS and Windows, as system packages, and as a Docker image on GitHub Container Registry. In CI you start it as a service container or background process, create proxies (in bulk with POST /populate), and change your app's connection settings to go through them. Its API is unauthenticated by default, so the README recommends TOXIPROXY_AUTH_TOKEN if other machines can reach it.
Jitterbox is hosted, so there's nothing to start. You set your app's base URL for an API to the project's URL, usually through an environment variable. In CI, npx jitterbox run --scenario "<name>" -- npm test switches a scenario on, runs your tests with JITTERBOX_BASE_URL set, switches it off, and fails the build on a bad grade. There's also a GitHub Action. See Jitterbox in CI.
The trade-off is real. Hosted means test traffic goes over the internet to jitterbox.dev, and during the beta there are limits: 500 mock requests a day, 1 project, 10 endpoints and 2 scenarios. Toxiproxy has no such limits, and everything stays on your machine or runner.
When Toxiproxy is the better choice
- The dependency isn't HTTP. Databases, Redis, message brokers, anything that speaks its own protocol over TCP. Jitterbox can't help here.
- You want to test against the real dependency. Toxiproxy degrades your actual MySQL; Jitterbox replaces an API with a fake.
- The failure is the network itself: low bandwidth, packet loss, a peer that resets the connection, data sliced into tiny packets.
- Everything has to stay local or offline, with no external service in the test path.
- You want free, open source and battle-tested. Toxiproxy is MIT licensed, with client libraries in many languages, and Shopify has used it in its development and test environments for over a decade.
When Jitterbox is the better choice
- You're testing how your code handles HTTP responses:
429withRetry-After,503that clears up,400that must not be retried. - You call LLM APIs. Jitterbox speaks OpenAI and Anthropic formats, streaming included, and can stall the first token or cut a stream partway. See LLM failure testing.
- You don't have a sandbox for the real API, or it can't be made to fail on demand. Jitterbox gives you a fake one in minutes, from scratch, from an OpenAPI file or by recording the real API.
- You want the grading done for you, with a request log that shows each attempt and a CI check that fails on bad retry behavior.
Using both together
They don't compete for the same job, so plenty of setups use both. A typical split: Toxiproxy in front of the database and cache in your test environment, Jitterbox standing in for the third-party HTTP APIs, like payments or an LLM provider. One test run can then cover a slow database and a rate-limited payment API, each broken by the tool that understands it.
To try the HTTP side, see how Jitterbox works or create a free project and point one API client at it.