netem-agent is a container that artificially slows down a Docker network.
I use it to test the behavior of distributed systems when exposed to real-world networking conditions.
netem
pumba, a powerful chaos-testing tool
which needs the iproute2 package in the target containers.It uses dockerveth
in the host network context to map all selected containers to their veth interfaces.
Then, it activates the NetEm traffic control facilities on those interfaces.
Requirements:
NET_ADMIN capability on agent and elevated privileges
(TODO Make it work with less privileges)Example:
docker run -it --rm \
--name netem-agent \
--cap-add=NET_ADMIN \
--privileged \
--net=host \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v /var/run/docker/netns:/var/run/netns:ro \
terorie/netem-agent \
--name='^dummy.*' \
--delay=100ms \
--jitter=50ms
--interval Update interval--name Container name regex filters
(optional, by default delaying all containers)--delay Outgoing packets delay--jitter Delay jitter--delete Delete all delays and exitveth interfaces of containersContent type
Image
Digest
Size
68 MB
Last updated
almost 7 years ago
docker pull terorie/netem-agent