Available – Shopify, one of the largest e-commerce platforms, has released Toxiproxy 2.6, a proxy-server designed to simulate network failures and test applications for various anomalies. This server can be used for individual experiments as well as integrated with unit testing systems, continuous integration platforms, and development environments. The Toxiproxy code is written in GO and is freely available under the license.
The proxy-server is placed between the application being verified and the network service it interacts with, allowing it to simulate various abnormal network conditions. It can introduce delays when receiving a response or sending a request, change the throughput, simulate connection failures, disrupt the normal course of installation or closing of connections, drop established connections, or distort the contents of packages.
To manage the proxy server’s behavior from applications, client libraries are provided for various programming languages such as Ruby, Go, Python, C#/.Net, PHP, JavaScript/Node.js, Java, Haskell, Rust, and Elixir. These libraries allow developers to dynamically change network interaction conditions and immediately evaluate the outcomes. Additionally, a special utility called toxiproxy-cli is available for changing communication channel characteristics without modifying the code, making it useful for interactive experiments.
New features in the latest release include the ability to gracefully shutdown the HTTP server, support for the PATCH HTTP method, the ability to set HTTP headers such as User-Agent and Content-Type for the client (httpclient), and replacing individual Host and Port parameters with a single ADDR parameter.