Re:Toxiproxy is a framework for simulating network conditions
by anonymousDan on Tuesday November 02, 2021 @02:42PM
(#29085653)
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.
[ Parent
| on HN ]
Re:Toxiproxy is a framework for simulating network conditions
by kevin_nisbet on Tuesday November 02, 2021 @02:58PM
(#29085875)
May or may not be what you're looking for, but you can do lots of this in linux by using tc.
https://man7.org/linux/man-pages/man8/tc.8.html
Requires care to use and understand, so may not be applicable, but allows introducing latency, jitter, packet loss, etc.
Re:Toxiproxy is a framework for simulating network conditions
by touisteur on Tuesday November 02, 2021 @03:44PM
(#29086481)
Precisely tc and netem. To give an idea how powerful and tuneable netem can be, we had a piece of network gear that lost messages if they were too close in time to each other (less than N microseconds). Probably some 'copy packet during interrupt' stuff. We couldn't change anything in the applications or the network gear. The solution was (on the sender side) to 1) classify with tc the specific packet sequence and 2) delay the second message in the sequence. It's a large command-line, it does the job perfectly. It's marvelous.
Re:Toxiproxy is a framework for simulating network conditions
by zamadatix on Tuesday November 02, 2021 @09:28PM
(#29090040)
+1 for tc. Used to run a network testing lab of about 12 racks of network gear and tc was my go-to for simulating network level performance impacts for both small and large test scenarios.
Re:Toxiproxy is a framework for simulating network conditions
by redprince on Tuesday November 02, 2021 @03:46PM
(#29086510)
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
by mixtur2021 on Tuesday November 02, 2021 @05:33PM
(#29087676)
Isn't this already at a TCP level? HTTP is only used for management of the proxy?
Re:Toxiproxy is a framework for simulating network conditions
by anonymousDan on Wednesday November 03, 2021 @03:58AM
(#29092100)
Ah, I see, my bad. If I understand correctly though it's mostly for hooking client/server architectures? I'm interested more in things like hooking comms between replicas of a replicated database or an implementation of paxos. Would it be useable for that? For example, can I take a list of processes running on different ports and set up a proxy per connection (assuming they are connected all-to-all)? Maybe I should just RTFM :)
Re:Toxiproxy is a framework for simulating network conditions
by Mavvie on Tuesday November 02, 2021 @11:48PM
(#29090927)
Yeah, all the other replies confuse me. Toxiproxy _is_ a TCP proxy. You can use it for Redis, MySQL, or anything else that runs on TCP.
Re:Toxiproxy is a framework for simulating network conditions
by koudelka on Tuesday November 02, 2021 @11:50PM
(#29090935)
You might be interested in Partisan's fault injector. I don't know if @cmeiklejohn is still working on it, but it's really cool nonetheless.
Re:Toxiproxy is a framework for simulating network conditions
by buzzier on Tuesday November 02, 2021 @03:12PM
(#29086051)
http://jagt.github.io/clumsy/ (windows)
Re:Toxiproxy is a framework for simulating network conditions
by StarBrilliant on Tuesday November 02, 2021 @02:56PM
(#29085860)
Not sure if this software satisfies your need: https://github.com/tylertreat/Comcast
Re:Toxiproxy is a framework for simulating network conditions
by gaul on Wednesday November 03, 2021 @07:16PM
(#29101767)
Vaurien can do this: