Open-Source Wikis

/

Traefik

/

Lore

traefik/traefik

Lore

How this codebase got to where it is. Dates are derived from git history; speculation is hedged when the "why" is not in the commit message.

Eras

The toml-config era (Aug 2015 – mid 2016)

The first commits on August 28, 2015 (initial commit, toml config, toml config with nested tables) set the tone: configuration was a first-class concern from day one. Within weeks, file-watching, label-based Docker discovery, and Marathon/Mesos/etcd providers were sketched out. v1.0.0 shipped on July 6, 2016 — under a year from the first commit.

The v1 expansion (mid 2016 – late 2018)

This era added the long tail of providers (Consul Catalog, Kubernetes Ingress, Rancher, Eureka, DynamoDB, Rest API), the embedded ACME client, the dashboard, and most of the middleware catalogue. The codebase grew quickly and accumulated abstractions that did not survive the next major version.

The v2 redesign (late 2018 – Sep 2019)

v2.0.0 shipped on September 16, 2019. The redesign introduced:

  • A new rule grammar (Host(\`), PathPrefix(``)) parsed by the new pkg/rules/parser.go`.
  • Routers, services, and middlewares as first-class, named, addressable objects in the dynamic configuration.
  • Native TCP routing with SNI/ALPN multiplexing on shared ports (pkg/muxer/tcp).
  • A clean split of static vs dynamic configuration that survives in pkg/config/static and pkg/config/dynamic today.
  • Custom Resource Definitions for Kubernetes (pkg/provider/kubernetes/crd).

A lot of the v1 provider code was dropped or rewritten during this period. The label-based "front-end / back-end" model from v1 does not exist in this repository at all — only its successor.

The hardening era (Sep 2019 – Apr 2024)

v2 minor releases stabilized the new model. Highlights, derived from tag dates and visible directories:

  • Extensive observability work: OpenTelemetry replaced custom tracing, metrics gained an OTLP exporter (pkg/observability/metrics/otel.go), and access logging was rewritten.
  • Plugin system added: Yaegi-based Go plugins (pkg/plugins/middlewareyaegi.go), then later Wasm plugins via Wazero (pkg/plugins/middlewarewasm.go).
  • HTTP/3 support landed (pkg/server/server_entrypoint_tcp_http3.go).
  • ACME got DNS-01 via go-acme/lego plugins.
  • Tailscale integration as a certificate resolver (pkg/provider/tailscale).

The Gateway API era (Apr 2024 – present)

v3.0.0 shipped on April 29, 2024. The dominant theme of v3 has been Kubernetes-native routing primitives:

  • Full Gateway API support in pkg/provider/kubernetes/gateway, with its own conformance test suite (make test-gateway-api-conformance).
  • Knative Serving conformance support in pkg/provider/kubernetes/knative (make test-knative-conformance).
  • Native Ingress-NGINX compatibility shim in pkg/provider/kubernetes/ingress-nginx and pkg/middlewares/ingressnginx.
  • A new "fast" HTTP reverse proxy implementation (pkg/proxy/fast) sitting alongside the standard-library variant (pkg/proxy/httputil), selected by pkg/proxy/smart_builder.go.
  • A redesigned dashboard in webui/ using Vue 3, Vite, and TypeScript (with Vitest unit tests).
  • A formalized observability surface: per-service metrics, configurable access-log retention, capture-based latency measurement (pkg/middlewares/capture).

v3.7 is being merged into master as of late April 2026, with new capabilities such as connection limits and a metamodel-driven Ingress-NGINX configuration generator.

Longest-standing features

These have been in the codebase since v1 or early v2 and have weathered many refactors:

  • The file provider (pkg/provider/file). The simplest provider — watches a file or directory and emits the parsed configuration. It has survived essentially intact since the toml era.
  • The Docker label provider (pkg/provider/docker). The original "watch labels and emit routes" provider. The labels themselves were redesigned for v2 but the discovery loop is older.
  • ACME automatic certificate management (pkg/provider/acme). Present since v1; has tracked Let's Encrypt's evolution (HTTP-01, TLS-SNI deprecation, TLS-ALPN-01, DNS-01) without changing its public surface much.
  • The configuration watcher loop (pkg/server/configurationwatcher.go). The shape — receive, deduplicate, transform, apply — has been stable for years.

Deprecated features

A few removals visible in the current source:

  • Core.DefaultRuleSyntax (pkg/config/static/static_config.go). Marked // Deprecated: Please do not use this field and rewrite the router rules to use the v3 syntax. This was a v2-to-v3 migration knob.
  • Pilot. Pilot was Traefik's SaaS offering during the v2 era. The integration was removed in v3, leaving only historical mentions.
  • Marathon, Eureka, Mesos, Rancher v1, DynamoDB, BoltDB, Service Fabric — all v1 providers that were dropped during the v2 rewrite. They do not appear in this v3 source tree.
  • TLS-SNI ACME challenges were retired industry-wide; only HTTP-01, TLS-ALPN-01, and DNS-01 remain (pkg/provider/acme/challenge_*.go).

Major rewrites

  • Dashboard rewrite (v3, 2023–2024). The previous Angular dashboard was replaced with the Vue 3 + Vite + TypeScript app currently in webui/. The README describes it as a fresh app rather than a port.
  • Reverse-proxy rewrite (v3). pkg/proxy/fast is a from-scratch HTTP/1.x proxy aimed at lower allocation overhead. The standard-library implementation (pkg/proxy/httputil) remains for cases the fast path cannot handle. pkg/proxy/smart_builder.go chooses between them.
  • Metrics overhaul. pkg/observability/metrics consolidated several historical exporters (Prometheus, Datadog, StatsD, InfluxDB) and added an OpenTelemetry-native exporter (otel.go).
  • Configuration loader. Configuration loading was extracted into the github.com/traefik/paerser library and is now consumed via tcli loaders in pkg/cli and cmd/traefik/traefik.go.

Growth trajectory

A few signals of how the project has grown:

  • Provider count. The directory pkg/provider lists 16 providers in this v3 tree — Docker (with Swarm), file, HTTP, Kubernetes (Ingress / CRD / Gateway / Knative / Ingress-NGINX), Consul (KV + Catalog), etcd, ZooKeeper, Redis, Nomad, ECS, ACME (as a meta-provider), Rest, Tailscale, and the internal traefik provider.
  • Middleware count. The pkg/middlewares directory holds 30+ middleware implementations, plus an observability and a tcp subtree for protocol-specific middlewares.
  • Load-balancing strategies. From a single weighted round robin, the project has grown to six strategies (wrr, p2c, hrw, failover, mirror, leasttime) under pkg/server/service/loadbalancer/.
  • Conformance suites. Gateway API and Knative conformance tests are now first-class CI gates, not afterthoughts.

The trend across eras is consistent: more deployment targets supported, more L7 features absorbed, more observability hooks added, with the core configuration watcher loop largely preserved.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Lore – Traefik wiki | Factory