{"id":13690800,"url":"https://github.com/shopify/toxiproxy","last_synced_at":"2025-09-09T21:23:23.606Z","repository":{"id":20388724,"uuid":"23664475","full_name":"Shopify/toxiproxy","owner":"Shopify","description":":alarm_clock: :fire: A TCP proxy to simulate network and system conditions for chaos and resiliency testing","archived":false,"fork":false,"pushed_at":"2025-05-12T13:01:06.000Z","size":3520,"stargazers_count":11244,"open_issues_count":89,"forks_count":464,"subscribers_count":572,"default_branch":"main","last_synced_at":"2025-05-12T14:25:56.259Z","etag":null,"topics":["chaos","down","go","is","omg","proxy","resiliency","tcp-proxy","testing"],"latest_commit_sha":null,"homepage":"https://github.com/shopify/toxiproxy","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Shopify.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-09-04T13:56:38.000Z","updated_at":"2025-05-12T13:01:08.000Z","dependencies_parsed_at":"2023-02-19T05:05:19.072Z","dependency_job_id":"c0c1d719-1676-4393-9c09-645349ed4ef8","html_url":"https://github.com/Shopify/toxiproxy","commit_stats":{"total_commits":532,"total_committers":79,"mean_commits":6.734177215189874,"dds":0.7274436090225564,"last_synced_commit":"7feb70f81aab944a0ebf844f5d29e5fb80bc2eb0"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shopify%2Ftoxiproxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shopify%2Ftoxiproxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shopify%2Ftoxiproxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shopify%2Ftoxiproxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shopify","download_url":"https://codeload.github.com/Shopify/toxiproxy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253774593,"owners_count":21962199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chaos","down","go","is","omg","proxy","resiliency","tcp-proxy","testing"],"created_at":"2024-08-02T17:00:31.787Z","updated_at":"2025-05-12T16:20:54.485Z","avatar_url":"https://github.com/Shopify.png","language":"Go","readme":"# Toxiproxy\n[![GitHub release](https://img.shields.io/github/release/Shopify/toxiproxy.svg)](https://github.com/Shopify/toxiproxy/releases/latest)\n[![Build Status](https://github.com/Shopify/toxiproxy/actions/workflows/test.yml/badge.svg)](https://github.com/Shopify/toxiproxy/actions/workflows/test.yml)\n\n![](http://i.imgur.com/sOaNw0o.png)\n\nToxiproxy is a framework for simulating network conditions. It's made\nspecifically to work in testing, CI and development environments, supporting\ndeterministic tampering with connections, but with support for randomized chaos\nand customization. **Toxiproxy is the tool you need to prove with tests that\nyour application doesn't have single points of failure.** We've been\nsuccessfully using it in all development and test environments at Shopify since\nOctober, 2014. See our [blog post][blog] on resiliency for more information.\n\nToxiproxy usage consists of two parts. A TCP proxy written in Go (what this\nrepository contains) and a client communicating with the proxy over HTTP. You\nconfigure your application to make all test connections go through Toxiproxy\nand can then manipulate their health via HTTP. See [Usage](#usage)\nbelow on how to set up your project.\n\nFor example, to add 1000ms of latency to the response of MySQL from the [Ruby\nclient](https://github.com/Shopify/toxiproxy-ruby):\n\n```ruby\nToxiproxy[:mysql_master].downstream(:latency, latency: 1000).apply do\n  Shop.first # this takes at least 1s\nend\n```\n\nTo take down all Redis instances:\n\n```ruby\nToxiproxy[/redis/].down do\n  Shop.first # this will throw an exception\nend\n```\n\nWhile the examples in this README are currently in Ruby, there's nothing\nstopping you from creating a client in any other language (see\n[Clients](#clients)).\n\n## Table of Contents\n\n- [Toxiproxy](#toxiproxy)\n  - [Table of Contents](#table-of-contents)\n  - [Why yet another chaotic TCP proxy?](#why-yet-another-chaotic-tcp-proxy)\n  - [Clients](#clients)\n  - [Example](#example)\n  - [Usage](#usage)\n    - [1. Installing Toxiproxy](#1-installing-toxiproxy)\n      - [Upgrading from Toxiproxy 1.x](#upgrading-from-toxiproxy-1x)\n    - [2. Populating Toxiproxy](#2-populating-toxiproxy)\n    - [3. Using Toxiproxy](#3-using-toxiproxy)\n    - [4. Logging](#4-logging)\n    - [Toxics](#toxics)\n      - [latency](#latency)\n      - [down](#down)\n      - [bandwidth](#bandwidth)\n      - [slow_close](#slow_close)\n      - [timeout](#timeout)\n      - [reset_peer](#reset_peer)\n      - [slicer](#slicer)\n      - [limit_data](#limit_data)\n    - [HTTP API](#http-api)\n      - [Proxy fields:](#proxy-fields)\n      - [Toxic fields:](#toxic-fields)\n      - [Endpoints](#endpoints)\n      - [Populating Proxies](#populating-proxies)\n    - [CLI Example](#cli-example)\n    - [Metrics](#metrics)\n    - [Frequently Asked Questions](#frequently-asked-questions)\n    - [Development](#development)\n    - [Release](#release)\n\n## Why yet another chaotic TCP proxy?\n\nThe existing ones we found didn't provide the kind of dynamic API we needed for\nintegration and unit testing. Linux tools like `nc` and so on are not\ncross-platform and require root, which makes them problematic in test,\ndevelopment and CI environments.\n\n## Clients\n\n* [toxiproxy-ruby](https://github.com/Shopify/toxiproxy-ruby)\n* [toxiproxy-go](https://github.com/Shopify/toxiproxy/tree/main/client)\n* [toxiproxy-python](https://github.com/douglas/toxiproxy-python)\n* [toxiproxy.net](https://github.com/mdevilliers/Toxiproxy.Net)\n* [toxiproxy-php-client](https://github.com/ihsw/toxiproxy-php-client)\n* [toxiproxy-node-client](https://github.com/ihsw/toxiproxy-node-client)\n* [toxiproxy-java](https://github.com/trekawek/toxiproxy-java)\n* [toxiproxy-haskell](https://github.com/jpittis/toxiproxy-haskell)\n* [toxiproxy-rust](https://github.com/itarato/toxiproxy_rust)\n* [toxiproxy-elixir](https://github.com/Jcambass/toxiproxy_ex)\n\n## Example\n\nLet's walk through an example with a Rails application. Note that Toxiproxy is\nin no way tied to Ruby, it's just been our first use case. You can see the full example at\n[sirupsen/toxiproxy-rails-example](https://github.com/sirupsen/toxiproxy-rails-example).\nTo get started right away, jump down to [Usage](#usage).\n\nFor our popular blog, for some reason we're storing the tags for our posts in\nRedis and the posts themselves in MySQL. We might have a `Post` class that\nincludes some methods to manipulate tags in a [Redis set](http://redis.io/commands#set):\n\n```ruby\nclass Post \u003c ActiveRecord::Base\n  # Return an Array of all the tags.\n  def tags\n    TagRedis.smembers(tag_key)\n  end\n\n  # Add a tag to the post.\n  def add_tag(tag)\n    TagRedis.sadd(tag_key, tag)\n  end\n\n  # Remove a tag from the post.\n  def remove_tag(tag)\n    TagRedis.srem(tag_key, tag)\n  end\n\n  # Return the key in Redis for the set of tags for the post.\n  def tag_key\n    \"post:tags:#{self.id}\"\n  end\nend\n```\n\nWe've decided that erroring while writing to the tag data store\n(adding/removing) is OK. However, if the tag data store is down, we should be\nable to see the post with no tags. We could simply rescue the\n`Redis::CannotConnectError` around the `SMEMBERS` Redis call in the `tags`\nmethod. Let's use Toxiproxy to test that.\n\nSince we've already installed Toxiproxy and it's running on our machine, we can\nskip to step 2. This is where we need to make sure Toxiproxy has a mapping for\nRedis tags. To `config/boot.rb` (before any connection is made) we add:\n\n```ruby\nrequire 'toxiproxy'\n\nToxiproxy.populate([\n  {\n    name: \"toxiproxy_test_redis_tags\",\n    listen: \"127.0.0.1:22222\",\n    upstream: \"127.0.0.1:6379\"\n  }\n])\n```\n\nThen in `config/environments/test.rb` we set the `TagRedis` to be a Redis client\nthat connects to Redis through Toxiproxy by adding this line:\n\n```ruby\nTagRedis = Redis.new(port: 22222)\n```\n\nAll calls in the test environment now go through Toxiproxy. That means we can\nadd a unit test where we simulate a failure:\n\n```ruby\ntest \"should return empty array when tag redis is down when listing tags\" do\n  @post.add_tag \"mammals\"\n\n  # Take down all Redises in Toxiproxy\n  Toxiproxy[/redis/].down do\n    assert_equal [], @post.tags\n  end\nend\n```\n\nThe test fails with `Redis::CannotConnectError`. Perfect! Toxiproxy took down\nthe Redis successfully for the duration of the closure. Let's fix the `tags`\nmethod to be resilient:\n\n```ruby\ndef tags\n  TagRedis.smembers(tag_key)\nrescue Redis::CannotConnectError\n  []\nend\n```\n\nThe tests pass! We now have a unit test that proves fetching the tags when Redis\nis down returns an empty array, instead of throwing an exception. For full\ncoverage you should also write an integration test that wraps fetching the\nentire blog post page when Redis is down.\n\nFull example application is at\n[sirupsen/toxiproxy-rails-example](https://github.com/sirupsen/toxiproxy-rails-example).\n\n## Usage\n\nConfiguring a project to use Toxiproxy consists of three steps:\n\n1. Installing Toxiproxy\n2. Populating Toxiproxy\n3. Using Toxiproxy\n\n### 1. Installing Toxiproxy\n\n**Linux**\n\nSee [`Releases`](https://github.com/Shopify/toxiproxy/releases) for the latest\nbinaries and system packages for your architecture.\n\n**Ubuntu**\n\n```bash\n$ wget -O toxiproxy-2.1.4.deb https://github.com/Shopify/toxiproxy/releases/download/v2.1.4/toxiproxy_2.1.4_amd64.deb\n$ sudo dpkg -i toxiproxy-2.1.4.deb\n$ sudo service toxiproxy start\n```\n\n**OS X**\n\nWith [Homebrew](https://brew.sh/):\n\n```bash\n$ brew tap shopify/shopify\n$ brew install toxiproxy\n```\n\nOr with [MacPorts](https://www.macports.org/):\n\n```bash\n$ port install toxiproxy\n```\n\n**Windows**\n\nToxiproxy for Windows is available for download at https://github.com/Shopify/toxiproxy/releases/download/v2.1.4/toxiproxy-server-windows-amd64.exe\n\n**Docker**\n\nToxiproxy is available on [Github container registry](https://github.com/Shopify/toxiproxy/pkgs/container/toxiproxy).\nOld versions `\u003c= 2.1.4` are available on on [Docker Hub](https://hub.docker.com/r/shopify/toxiproxy/).\n\n```bash\n$ docker pull ghcr.io/shopify/toxiproxy\n$ docker run --rm -it ghcr.io/shopify/toxiproxy\n```\n\nIf using Toxiproxy from the host rather than other containers, enable host networking with `--net=host`.\n\n```shell\n$ docker run --rm --entrypoint=\"/toxiproxy-cli\" -it ghcr.io/shopify/toxiproxy list\n```\n\n**Source**\n\nIf you have Go installed, you can build Toxiproxy from source using the make file:\n```bash\n$ make build\n$ ./toxiproxy-server\n```\n\n#### Upgrading from Toxiproxy 1.x\n\nIn Toxiproxy 2.0 several changes were made to the API that make it incompatible with version 1.x.\nIn order to use version 2.x of the Toxiproxy server, you will need to make sure your client\nlibrary supports the same version. You can check which version of Toxiproxy you are running by\nlooking at the `/version` endpoint.\n\nSee the documentation for your client library for specific library changes. Detailed changes\nfor the Toxiproxy server can been found in [CHANGELOG.md](./CHANGELOG.md).\n\n### 2. Populating Toxiproxy\n\nWhen your application boots, it needs to make sure that Toxiproxy knows which\nendpoints to proxy where. The main parameters are: name, address for Toxiproxy\nto **listen** on and the address of the upstream.\n\nSome client libraries have helpers for this task, which is essentially just\nmaking sure each proxy in a list is created. Example from the Ruby client:\n\n```ruby\n# Make sure `shopify_test_redis_master` and `shopify_test_mysql_master` are\n# present in Toxiproxy\nToxiproxy.populate([\n  {\n    name: \"shopify_test_redis_master\",\n    listen: \"127.0.0.1:22220\",\n    upstream: \"127.0.0.1:6379\"\n  },\n  {\n    name: \"shopify_test_mysql_master\",\n    listen: \"127.0.0.1:24220\",\n    upstream: \"127.0.0.1:3306\"\n  }\n])\n```\n\nThis code needs to run as early in boot as possible, before any code establishes\na connection through Toxiproxy. Please check your client library for\ndocumentation on the population helpers.\n\nAlternatively use the CLI to create proxies, e.g.:\n\n```bash\ntoxiproxy-cli create -l localhost:26379 -u localhost:6379 shopify_test_redis_master\n```\n\nWe recommend a naming such as the above: `\u003capp\u003e_\u003cenv\u003e_\u003cdata store\u003e_\u003cshard\u003e`.\nThis makes sure there are no clashes between applications using the same\nToxiproxy.\n\nFor large application we recommend storing the Toxiproxy configurations in a\nseparate configuration file. We use `config/toxiproxy.json`. This file can be\npassed to the server using the `-config` option, or loaded by the application\nto use with the `populate` function.\n\nAn example `config/toxiproxy.json`:\n\n```json\n[\n  {\n    \"name\": \"web_dev_frontend_1\",\n    \"listen\": \"[::]:18080\",\n    \"upstream\": \"webapp.domain:8080\",\n    \"enabled\": true\n  },\n  {\n    \"name\": \"web_dev_mysql_1\",\n    \"listen\": \"[::]:13306\",\n    \"upstream\": \"database.domain:3306\",\n    \"enabled\": true\n  }\n]\n```\n\nUse ports outside the ephemeral port range to avoid random port conflicts.\nIt's `32,768` to `61,000` on Linux by default, see\n`/proc/sys/net/ipv4/ip_local_port_range`.\n\n### 3. Using Toxiproxy\n\nTo use Toxiproxy, you now need to configure your application to connect through\nToxiproxy. Continuing with our example from step two, we can configure our Redis\nclient to connect through Toxiproxy:\n\n```ruby\n# old straight to redis\nredis = Redis.new(port: 6380)\n\n# new through toxiproxy\nredis = Redis.new(port: 22220)\n```\n\nNow you can tamper with it through the Toxiproxy API. In Ruby:\n\n```ruby\nredis = Redis.new(port: 22220)\n\nToxiproxy[:shopify_test_redis_master].downstream(:latency, latency: 1000).apply do\n  redis.get(\"test\") # will take 1s\nend\n```\n\nOr via the CLI:\n\n```bash\ntoxiproxy-cli toxic add -t latency -a latency=1000 shopify_test_redis_master\n```\n\nPlease consult your respective client library on usage.\n\n### 4. Logging\n\nThere are the following log levels: panic, fatal, error, warn or warning, info, debug and trace.\nThe level could be updated via environment variable `LOG_LEVEL`.\n\n### Toxics\n\nToxics manipulate the pipe between the client and upstream. They can be added\nand removed from proxies using the [HTTP api](#http-api). Each toxic has its own parameters\nto change how it affects the proxy links.\n\nFor documentation on implementing custom toxics, see [CREATING_TOXICS.md](./CREATING_TOXICS.md)\n\n#### latency\n\nAdd a delay to all data going through the proxy. The delay is equal to `latency` +/- `jitter`.\n\nAttributes:\n\n - `latency`: time in milliseconds\n - `jitter`: time in milliseconds\n\n#### down\n\nBringing a service down is not technically a toxic in the implementation of\nToxiproxy. This is done by `POST`ing to `/proxies/{proxy}` and setting the\n`enabled` field to `false`.\n\n#### bandwidth\n\nLimit a connection to a maximum number of kilobytes per second.\n\nAttributes:\n\n - `rate`: rate in KB/s\n\n#### slow_close\n\nDelay the TCP socket from closing until `delay` has elapsed.\n\nAttributes:\n\n - `delay`: time in milliseconds\n\n#### timeout\n\nStops all data from getting through, and closes the connection after `timeout`. If\n`timeout` is 0, the connection won't close, and data will be dropped until the\ntoxic is removed.\n\nAttributes:\n\n - `timeout`: time in milliseconds\n\n#### reset_peer\n\nSimulate TCP RESET (Connection reset by peer) on the connections by closing the stub Input\nimmediately or after a `timeout`.\n\nAttributes:\n\n - `timeout`: time in milliseconds\n\n#### slicer\n\nSlices TCP data up into small bits, optionally adding a delay between each\nsliced \"packet\".\n\nAttributes:\n\n - `average_size`: size in bytes of an average packet\n - `size_variation`: variation in bytes of an average packet (should be smaller than average_size)\n - `delay`: time in microseconds to delay each packet by\n\n#### limit_data\n\nCloses connection when transmitted data exceeded limit.\n\n - `bytes`: number of bytes it should transmit before connection is closed\n\n### HTTP API\n\nAll communication with the Toxiproxy daemon from the client happens through the\nHTTP interface, which is described here.\n\nToxiproxy listens for HTTP on port **8474**.\n\n#### Proxy fields:\n\n - `name`: proxy name (string)\n - `listen`: listen address (string)\n - `upstream`: proxy upstream address (string)\n - `enabled`: true/false (defaults to true on creation)\n\nTo change a proxy's name, it must be deleted and recreated.\n\nChanging the `listen` or `upstream` fields will restart the proxy and drop any active connections.\n\nIf `listen` is specified with a port of 0, toxiproxy will pick an ephemeral port. The `listen` field\nin the response will be updated with the actual port.\n\nIf you change `enabled` to `false`, it will take down the proxy. You can switch it\nback to `true` to reenable it.\n\n#### Toxic fields:\n\n - `name`: toxic name (string, defaults to `\u003ctype\u003e_\u003cstream\u003e`)\n - `type`: toxic type (string)\n - `stream`: link direction to affect (defaults to `downstream`)\n - `toxicity`: probability of the toxic being applied to a link (defaults to 1.0, 100%)\n - `attributes`: a map of toxic-specific attributes\n\nSee [Toxics](#toxics) for toxic-specific attributes.\n\nThe `stream` direction must be either `upstream` or `downstream`. `upstream` applies\nthe toxic on the `client -\u003e server` connection, while `downstream` applies the toxic\non the `server -\u003e client` connection. This can be used to modify requests and responses\nseparately.\n\n#### Endpoints\n\nAll endpoints are JSON.\n\n - **GET /proxies** - List existing proxies and their toxics\n - **POST /proxies** - Create a new proxy\n - **POST /populate** - Create or replace a list of proxies\n - **GET /proxies/{proxy}** - Show the proxy with all its active toxics\n - **POST /proxies/{proxy}** - Update a proxy's fields\n - **DELETE /proxies/{proxy}** - Delete an existing proxy\n - **GET /proxies/{proxy}/toxics** - List active toxics\n - **POST /proxies/{proxy}/toxics** - Create a new toxic\n - **GET /proxies/{proxy}/toxics/{toxic}** - Get an active toxic's fields\n - **POST /proxies/{proxy}/toxics/{toxic}** - Update an active toxic\n - **DELETE /proxies/{proxy}/toxics/{toxic}** - Remove an active toxic\n - **POST /reset** - Enable all proxies and remove all active toxics\n - **GET /version** - Returns the server version number\n - **GET /metrics** - Returns Prometheus-compatible metrics\n\n#### Populating Proxies\n\nProxies can be added and configured in bulk using the `/populate` endpoint. This is done by\npassing a json array of proxies to toxiproxy. If a proxy with the same name already exists,\nit will be compared to the new proxy and replaced if the `upstream` and `listen` address don't match.\n\nA `/populate` call can be included for example at application start to ensure all required proxies\nexist. It is safe to make this call several times, since proxies will be untouched as long as their\nfields are consistent with the new data.\n\n### CLI Example\n\n```bash\n$ toxiproxy-cli create -l localhost:26379 -u localhost:6379 redis\nCreated new proxy redis\n$ toxiproxy-cli list\nListen          Upstream        Name  Enabled Toxics\n======================================================================\n127.0.0.1:26379 localhost:6379  redis true    None\n\nHint: inspect toxics with `toxiproxy-client inspect \u003cproxyName\u003e`\n```\n\n```bash\n$ redis-cli -p 26379\n127.0.0.1:26379\u003e SET omg pandas\nOK\n127.0.0.1:26379\u003e GET omg\n\"pandas\"\n```\n\n```bash\n$ toxiproxy-cli toxic add -t latency -a latency=1000 redis\nAdded downstream latency toxic 'latency_downstream' on proxy 'redis'\n```\n\n```bash\n$ redis-cli -p 26379\n127.0.0.1:26379\u003e GET omg\n\"pandas\"\n(1.00s)\n127.0.0.1:26379\u003e DEL omg\n(integer) 1\n(1.00s)\n```\n\n```bash\n$ toxiproxy-cli toxic remove -n latency_downstream redis\nRemoved toxic 'latency_downstream' on proxy 'redis'\n```\n\n```bash\n$ redis-cli -p 26379\n127.0.0.1:26379\u003e GET omg\n(nil)\n```\n\n```bash\n$ toxiproxy-cli delete redis\nDeleted proxy redis\n```\n\n```bash\n$ redis-cli -p 26379\nCould not connect to Redis at 127.0.0.1:26379: Connection refused\n```\n\n### Metrics\n\nToxiproxy exposes Prometheus-compatible metrics via its HTTP API at /metrics.\nSee [METRICS.md](./METRICS.md) for full descriptions\n\n### Frequently Asked Questions\n\n**How fast is Toxiproxy?** The speed of Toxiproxy depends largely on your hardware,\nbut you can expect a latency of *\u003c 100µs* when no toxics are enabled. When running\nwith `GOMAXPROCS=4` on a Macbook Pro we achieved *~1000MB/s* throughput, and as high\nas *2400MB/s* on a higher end desktop. Basically, you can expect Toxiproxy to move\ndata around at least as fast the app you're testing.\n\n**Can Toxiproxy do randomized testing?** Many of the available toxics can be configured\nto have randomness, such as `jitter` in the `latency` toxic. There is also a\nglobal `toxicity` parameter that specifies the percentage of connections a toxic\nwill affect. This is most useful for things like the `timeout` toxic, which would\nallow X% of connections to timeout.\n\n**I am not seeing my Toxiproxy actions reflected for MySQL**. MySQL will prefer\nthe local Unix domain socket for some clients, no matter which port you pass it\nif the host is set to `localhost`. Configure your MySQL server to not create a\nsocket, and use `127.0.0.1` as the host. Remember to remove the old socket\nafter you restart the server.\n\n**Toxiproxy causes intermittent connection failures**. Use ports outside the\nephemeral port range to avoid random port conflicts. It's `32,768` to `61,000` on\nLinux by default, see `/proc/sys/net/ipv4/ip_local_port_range`.\n\n**Should I run a Toxiproxy for each application?** No, we recommend using the\nsame Toxiproxy for all applications. To distinguish between services we\nrecommend naming your proxies with the scheme: `\u003capp\u003e_\u003cenv\u003e_\u003cdata store\u003e_\u003cshard\u003e`.\nFor example, `shopify_test_redis_master` or `shopify_development_mysql_1`.\n\n### Development\n\n* `make`. Build a toxiproxy development binary for the current platform.\n* `make all`. Build Toxiproxy binaries and packages for all platforms. Requires\n  to have Go compiled with cross compilation enabled on Linux and Darwin (amd64)\n  as well as [`goreleaser`](https://goreleaser.com/) in your `$PATH` to\n  build binaries the Linux package.\n* `make test`. Run the Toxiproxy tests.\n\n### Release\n\nSee [RELEASE.md](./RELEASE.md)\n\n[blog]: https://shopify.engineering/building-and-testing-resilient-ruby-on-rails-applications\n","funding_links":[],"categories":["Software Packages","Testing","软件包","Reliability \u0026 Chaos Engineering","Go Tools","軟件包","Go 工具","Capabilities"],"sub_categories":["Other Software","Network-specific testing","其他软件库和软件包","其他軟件","其他软件","Resilience"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshopify%2Ftoxiproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshopify%2Ftoxiproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshopify%2Ftoxiproxy/lists"}