README.md in toxiproxy-0.1.3 vs README.md in toxiproxy-0.1.4
- old
+ new
@@ -15,12 +15,17 @@
For more information about Toxiproxy and the available toxics, see the [Toxiproxy
documentation](https://github.com/shopify/toxiproxy)
## Usage
-The Ruby client communicates with the Toxiproxy daemon via HTTP.
+The Ruby client communicates with the Toxiproxy daemon via HTTP. By default it
+connects to `http://127.0.0.1:8474`, but you can point to any host:
+```ruby
+Toxiproxy.host = 'http://toxiproxy.local:5665'
+```
+
For example, to simulate 1000ms latency on a database server you can use the
`latency` toxic with the `latency` argument (see the Toxiproxy project for a
list of all toxics):
```ruby
@@ -77,10 +82,10 @@
upstream: "localhost:3306",
},{
name: "mysql_read_only",
listen: "localhost:21213",
upstream: "localhost:3306",
-})
+}])
```
This will create the proxies passed, or replace the proxies if they already exist in Toxiproxy.
It's recommended to do this early as early in boot as possible, see the
[Toxiproxy README](https://github.com/shopify/toxiproxy#Usage). If you have many