Chaos HTTP Proxy

Introduce failures into HTTP requests via a proxy server. This can uncover error handling bugs in HTTP clients. Andrew Gaul at Bounce Storage [email protected] originally wrote Chaos HTTP Proxy.

Features

Chaos HTTP Proxy can trigger many different failures:

Installation

Users can download releases from GitHub. One can also build the project by running mvn package which produces a binary at target/chaos-http-proxy. Chaos HTTP Proxy requires Java 7 to run.

Examples

Linux and Mac OS X users can run Chaos HTTP Proxy via the executable jar:

chmod +x chaos-http-proxy
chaos-http-proxy --properties chaos-http-proxy.conf

Windows users must explicitly invoke java:

java -jar chaos-http-proxy --properties chaos-http-proxy.conf

An example using curl:

curl --fail --proxy http://localhost:1080/ http://google.com/
curl: (22) The requested URL returned error: 500 Server Error

Configuring Failure Rates

The configuration file determines all possible results for an HTTP request. Entries take the form [response_type]=[n], where [n] is an integral value that determines the relative occurrence likelihood of each response type. For example, the following configuration gives a 1% chance of responses failing with a 500 Internal Error response:

com.bouncestorage.chaoshttpproxy.http_500=1
com.bouncestorage.chaoshttpproxy.success=99

Sample configuration

Chaos HTTP Proxy accepts configuration at invocation time via the --properties flag and at run-time via the /chaos/api endpoint:

curl --request POST --upload-file chaos-http-proxy.conf http://localhost:1080/chaos/api
curl http://localhost:1080/chaos/api
com.bouncestorage.chaoshttpproxy.success=100

Limitations

References

License

Copyright (C) 2015-2016 Bounce Storage

Licensed under the Apache License, Version 2.0