An open API service indexing awesome lists of open source software.

https://github.com/josephwoodward/chaosproxy

A simple means of introducing chaos into your infrastructure for Windows, Mac and Linux.
https://github.com/josephwoodward/chaosproxy

chaos-engineering go golang

Last synced: 11 months ago
JSON representation

A simple means of introducing chaos into your infrastructure for Windows, Mac and Linux.

Awesome Lists containing this project

README

          

# Chaos Proxy

A controlled means of introducing chaos into your infrastructure for Windows, Mac and Linux.

Features:
- Target HTTP endpoints (including DynamoDB, S3, or HTTP based APIs) via hostname or path regular expression
- Ability to target only a proportion of requests (ie: 30% of requests will timeout)
- Force latency or simulate throttling on HTTP based APIs
- Specify response status code

## How to use it:

### Step 1: Create a config file

```yml
# config.yml

config:
enabled: true # optional
port: 8082

endpoints:

- host: (\S+)-consumer-iapi-(\S+)$ # required
url: \/consumer\/optinflow(\/?)$ # required
delay: 5000 # optional - default is 0
range: 50 # optional - default is 100
responseStatusCode: 504 # optional - default is 200

- host: (\S+)-public-iapi-(\S+)$
url: \/authorize\/providers\?tenant=(es|ie|it)$
delay: 5000
range: 30

- host: www.bbc.co.uk$
url: \/weather(\/?)$
delay: 5000
range: 100
responseStatusCode: 504

- host: ^dynamodb.(\S+)$
url: ^(\S+)$
delay: 5000
range: 100
```

### Step 2: Run it

```
$ chaos_proxy.exe -logtostderr=true
```

Note: Use `$ chaos_proxy.exe -h` to view all CLI options.

### Step 3: Proxy requests

**IIS:**

Add this to your web.config:

```



```

You may need to restart IIS `iisreset /stop` then `iisreset /start`

**Firefox:**

In Firefox go to `Options > Advanced > Network > Connection Settings`

## Compatibility:

- Mac
- Windows
- Linux

## Coming soon

- Ability to target requests based on HTTP request methods (GET, POST etc)
- HTTP endpoint allowing you to post behaviour changes to Chaos Proxy
- Dashboard allowing you to visualise traffic flowing through proxy and matching behaviours
- Set behaviour rules to activate/deactivate between certain dates and times
- Watch for config file changes
- Tests!