https://github.com/diegohce/chaos-proxy
Random error proxy for http requests.
https://github.com/diegohce/chaos-proxy
chaos-monkey chaos-proxy go golang http microservices proxy proxy-server testing
Last synced: 4 months ago
JSON representation
Random error proxy for http requests.
- Host: GitHub
- URL: https://github.com/diegohce/chaos-proxy
- Owner: diegohce
- License: gpl-3.0
- Created: 2019-06-07T20:43:09.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-21T22:48:33.000Z (about 6 years ago)
- Last Synced: 2025-01-29T22:25:02.011Z (6 months ago)
- Topics: chaos-monkey, chaos-proxy, go, golang, http, microservices, proxy, proxy-server, testing
- Language: Go
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# chaos-proxy
[](https://goreportcard.com/report/github.com/diegohce/chaos-proxy)
[](https://github.com/diegohce/chaos-proxy/releases/)
[](https://github.com/diegohce/chaos-proxy/releases/)
[](https://github.com/diegohce/chaos-proxy/blob/master/LICENSE)
[](https://github.com/diegohce/chaos-proxy/graphs/commit-activity)
[](http://hits.dwyl.io/diegohce/chaos-proxy)
[](https://github.com/diegohce/chaos-proxy/releases/)## What is it?
Chaos-proxy acts almost as a normal proxy. It causes at random, normal http request error scenarios. 500's errors, timeout delays and connections drop.## But why?
I use it to test microservices resilience. If it works fine with chaos-proxy in the middle, it will certainly work without it.## Bind address
Default bind address and port: `0.0.0.0:6667`. It can be changed setting `CHAOSPROXY_BINDADDR` environment variable.
## Config file
`chaos-proxy.json` can be placed into project directory or, preferably, in `/etc/chaos-proxy`
* max_timeout: Sets the top boundary for random milliseconds to timeout the request.
* default_host: Where every request that does not match one of `paths` will be routed to.
* paths: Where to route specific requests. If path ends with `/` it's interpreted as "begins with".```json
{
"max_timeout": 5000,
"default_host": {
"host": "http://localhost:6666"
},
"paths": {
"/badservice/status/400": {
"host": "http://localhost:6666"
},
"/badservice/status/403": {
"host": "http://localhost:6666"
},
"/badservice/status/404": {
"host": "http://localhost:6666"
},
"/data/2.5/": {
"host": "http://api.openweathermap.org:80"
}
}
}
```# Status
Chaos-proxy is still in a very early stage. The "random error" generator is pretty lousy and there's code that can be improved for sure. But, as is, it works as intended.