Live data from Hacker News

Toxiproxy is a framework for simulating network conditions

github.com

11–20 of 31 posts

Re: Toxiproxy is a framework for simulating network conditions

#11

Anyone know of anything like this but at the TCP level? I would love to have a way of simulating network partitions and different message delays for distributed algorithms implemented in Elixir. In an ideal world I'd be able to hook the elixir send/receive primitives to intercept messages between processes even in a single node.

https://www.freebsd.org/cgi/man.cgi?dummynet

The dummynet system facility permits the control of traffic going through the various network interfaces, by applying bandwidth and queue size limitations, implementing different scheduling and queue management policies, and emulating delays and losses. ... The dummynet facility was initially implemented as a testing tool for TCP congestion control by Luigi Rizzo, as described on ACM Computer Communication Review, Jan.97 issue.

Re: Toxiproxy is a framework for simulating network conditions

#12
I wrote the initial version of Toxiproxy back in 2014, but Jacob Wirth took it way beyond during his internship at Shopify. It came out of a need for writing integration tests for resiliency work we did at Shopify back then. [1] We didn't want someone to suddenly re-introduce a hard dependency on e.g. Redis on Shopify's storefronts. The initial prototype was a shell script that used lsof(1) and gdb(1) to close the file descriptor of the various connections. But, besides being dodgy, we needed to also simulate latency and make sure it worked on everyone's MacOS laptop's (otherwise e.g. tc(1) would have been intriguing). I wrote a little bit more of the history of Toxiproxy on Twitter. [2] It's stable and has proxied everything in dev and CI at Shopify for over half a decade.

[1]: https://shopify.engineering/building-and-testing-resilient-r...

[2]: https://twitter.com/Sirupsen/status/1455622640727728137

Re: Toxiproxy is a framework for simulating network conditions

#17
I've used Toxiproxy to reproduce so many issues that I can't be thankful enough to authors for this awesome tool! I also found a docker based UI to adding toxics I just wish it ships out of box or as another binary/brew package. While cli is awesome for people who have mastered it for beginners it's one more thing to learn, having a UI just solves that.

Re: Toxiproxy is a framework for simulating network conditions

#19
post #18
post #13

We also use Toxiproxy at my company and it's awesome. Shameless plug: I wrote a Rust port of it a while ago, for fun: https://github.com/oguzbilgener/noxious

Awesome! How can I contribute?

Thank you for the offer! If you're looking for something small, I just created issue #1. Other than that, I'm open to new ideas and anything that would make it easier to use.

Re: Toxiproxy is a framework for simulating network conditions

#20

Anyone know of anything like this but at the TCP level? I would love to have a way of simulating network partitions and different message delays for distributed algorithms implemented in Elixir. In an ideal world I'd be able to hook the elixir send/receive primitives to intercept messages between processes even in a single node.

Isn't this already at a TCP level? HTTP is only used for management of the proxy?
Post reply on HN