Traefik routes HTTP traffic to microservices and balances load across backends. It watches orchestrators and registries to update routes without manual restarts.
Overview
Traefik is an HTTP reverse proxy and load balancer oriented toward microservice deployments. Instead of maintaining a static route map, it listens to orchestrator or service-registry APIs and generates routes as services appear, move, or scale, which reduces manual updates when containers are added or replaced frequently.
It plugs into Docker, Swarm mode, Kubernetes, Consul, Etcd, Rancher, Amazon ECS, and file-based configuration, among other backends. Configuration can refresh continuously without restarting the proxy, and operators may still define selected routes by hand when needed.
Load balancing supports multiple algorithms, with circuit breakers and retries for upstream calls. The proxy handles WebSocket, HTTP/2, and gRPC, exposes a REST API and a simple web UI, and can emit metrics to Prometheus, Datadog, Statsd, InfluxDB, and related systems while writing access logs in JSON or CLF formats.
You can run Traefik from release binaries with a configuration file or from the official small Docker image. Pointing Traefik at your orchestrator is the main setup step for automatic routing.
Key features
- Dynamic configuration from orchestrators
- Multiple load balancing algorithms
- Circuit breakers and retries
- Web UI and REST API
- WebSocket HTTP/2 and gRPC support
- Metrics and access log exporters
- Docker and Kubernetes backends
- Optional manual route definitions
Use cases
- Exposing containerized microservices
- Automatic routing on Kubernetes or Swarm
- Load balancing across service replicas
- Ingress for Docker-based stacks
- Observing proxy traffic via metrics