Toxiproxy: Difference between revisions
From wikinotes
(→Usage) |
(→Usage) |
||
Line 37: | Line 37: | ||
] | ] | ||
') | ') | ||
</source> | |||
tools | |||
<source lang="bash"> | |||
# add latency to requests | |||
toxiproxy-cli toxic add -t latency -a latency=1000 shopify_test_redis_master | |||
</source> | </source> | ||
</blockquote><!-- Usage --> | </blockquote><!-- Usage --> |
Revision as of 21:41, 28 August 2023
A tool to help test your application for points of failure,
by simulating down/bad-network conditions.
Documentation
github https://github.com/shopify/toxiproxy
Usage
# declare on cli toxiproxy-cli create \ -l localhost:26379 \ `# proxy` -u localhost:6379 \ `# upstream` my_redis # load from json toxiproxy -config <(echo ' [ { "name": "web_dev_frontend_1", "listen": "[::]:18080", "upstream": "webapp.domain:8080", "enabled": true }, { "name": "web_dev_mysql_1", "listen": "[::]:13306", "upstream": "database.domain:3306", "enabled": true } ] ')tools
# add latency to requests toxiproxy-cli toxic add -t latency -a latency=1000 shopify_test_redis_master