Introduction
Pumba is an open-source chaos testing tool designed specifically for Docker environments. Inspired by Netflix's Chaos Monkey, it brings resilience testing to container workloads by randomly killing, pausing, or stopping containers and injecting network faults. Pumba helps development teams verify that their containerized applications handle infrastructure failures gracefully before those failures occur in production.
What Pumba Does
- Kills, stops, pauses, and removes Docker containers on a configurable schedule
- Injects network latency, packet loss, bandwidth limits, and corruption into container traffic
- Targets containers by name, label, or random selection with regex pattern matching
- Runs as a single binary or as a Docker container alongside your application stack
- Supports one-shot and recurring chaos experiments with configurable intervals
Architecture Overview
Pumba connects to the Docker daemon via the Docker API to discover and manipulate running containers. For container-level chaos (kill, stop, pause), it issues Docker API calls directly. For network emulation, Pumba uses Linux tc (traffic control) and netem inside the target container's network namespace. It operates as a standalone process with no server component, reading configuration from command-line flags.
Self-Hosting & Configuration
- Install via
go install, download a prebuilt binary, or run as a Docker container - Target specific containers with
--nameregex patterns or Docker labels - Set chaos intervals with
--intervalfor recurring experiments - Limit chaos duration with
--durationto automatically restore normal behavior - Run Pumba itself as a Docker container:
docker run gaiaadm/pumba kill --interval 60s
Key Features
- Container chaos: kill, stop, pause, and remove with configurable signals and grace periods
- Network emulation: delay, loss, corruption, duplication, and bandwidth throttling via netem
- Flexible targeting using container name patterns, labels, or random selection
- Dry-run mode to preview which containers would be affected without executing
- Lightweight single binary with no external dependencies beyond Docker
Comparison with Similar Tools
- Chaos Mesh — Kubernetes-native chaos platform; Pumba targets Docker containers directly
- LitmusChaos — Full chaos engineering platform for K8s; Pumba is simpler and Docker-focused
- Comcast — System-wide network shaping; Pumba targets individual container network namespaces
- Toxiproxy — TCP proxy for simulating network failures; Pumba operates at the container and network level
- Gremlin — Commercial chaos engineering platform; Pumba is free and open-source
FAQ
Q: Does Pumba work with Kubernetes? A: Pumba is designed for Docker. For Kubernetes chaos testing, consider Chaos Mesh or LitmusChaos. Pumba can still target containers on K8s nodes if run with Docker access.
Q: Can Pumba target specific containers?
A: Yes. Use --name with regex patterns to target containers by name, or filter by Docker labels.
Q: Will Pumba affect my production environment?
A: Pumba only affects containers on the host where it runs. Use --dry-run to verify targeting before executing chaos experiments.
Q: How does network emulation work?
A: Pumba uses Linux tc netem inside the target container's network namespace to inject latency, packet loss, and bandwidth limits without affecting other containers.