← All open source projects

Traefik

traefik/traefik

Traefik is a cloud-native proxy and load balancer for routing traffic to services and containers.

Forks 6,050
Author traefik
Language Go
License MIT
Synced 2026-06-27

What it is

Traefik is a proxy and load balancer for service infrastructure. It accepts incoming HTTP or TCP traffic, decides where to route it, and can discover services in Docker, Kubernetes, and other environments.

It became visible because manual proxy configuration does not fit dynamic infrastructure well. Containers appear and disappear, service addresses change, and routes need to update quickly.

How routing works

Traefik works around configuration providers. It reads environment state, discovers services, and builds routes from rules based on host, path, headers, protocols, or other settings.

TLS automation, middleware, and dashboards are part of the practical value, reducing the glue code between services and external traffic.

Simplified route model

This sketch shows the idea without committing to a specific config format: a request passes through a rule, middleware, and then a service.

Language: Plain text
request: api.example.com/users
  -> router: Host(api.example.com) && PathPrefix(/users)
  -> middleware: auth, rate-limit
  -> service: users-api:8080

What is inside

The repository contains the Traefik core, providers, protocol handling, routing logic, dashboard pieces, documentation, and tests. It is written in Go, which fits network services and single-binary delivery.

Support for several environments makes it useful beyond Kubernetes: Docker Compose, small servers, labs, and multi-service products.

Strengths

The main strength is dynamic service discovery. Routes can follow infrastructure state instead of being fully maintained by hand.

Its role is also clear: Traefik focuses on the traffic entry layer rather than becoming the whole deployment platform.

Limits

Traefik needs careful rule design. Chaotic routes, middleware, and certificates can turn the proxy into a complicated failure point.

Very specific networking needs may require a different proxy or lower-level tuning. Traefik fits best where dynamic services and route automation matter.