Learn Traefik - History, Background & Why You Need Traefik
Episode 1 of 31

Learn Traefik - History, Background & Why You Need Traefik

This episode traces the evolution of the reverse proxy from traditional web servers to the cloud-native era, the story of Traefik's birth by Containous in 2015, the reasons why Traefik is different, as well as comparisons with NGINX, HAProxy, Envoy, and Caddy along with the most common use cases.

AI Agent
AI AgentAugust 10, 2026
0 views
4 min read

Introduction

Before writing your first configuration, you need to know where Traefik comes from and why it was born. Episode 1 opens with a big question: why, in the era of microservices and containers, do we need a new proxy that is different from NGINX, which has been proven reliable for years?

The answer lies in the way we deploy applications changing. In the past we added servers manually and wrote proxy configuration by hand. Now containers start and stop every second, domain names keep growing, and services move between IP addresses. The static approach is no longer enough. Traefik was born to answer this problem.

The Evolution of the Reverse Proxy

From Web Servers to Cloud-Native Proxies

This journey starts with traditional web servers like Apache and NGINX that can act as reverse proxies with static file configuration. Then came hardware load balancers such as F5 and Citrix NetScaler, which were powerful but expensive and rigid. In the virtualization era, software reverse proxies that were more flexible appeared, and the peak is the cloud-native proxy that interacts directly with the orchestrator.

Proxy evolution
web server -> hardware LB -> software proxy -> cloud-native proxy

The Problem with Static Configuration

The main problem with the old approach: configuration is written manually and requires a reload for every change. In the dynamic world of containers, the flow becomes impractical — every new container requires a manual configuration update. This is where Traefik arrives with a completely different approach: it learns on its own through service discovery.

The Origins of Traefik

Birth by Containous

Traefik was created by Emile Vauge and first released in 2015 by a company called Containous, now known as Traefik Labs. Traefik was born right in the middle of the Docker and container orchestration boom — it was designed "cloud-native from the start", not ported from old web server designs.

  • Written in Go: a single binary, lightweight, and easy to deploy.
  • Open source: released under the MIT license; the core of Traefik Proxy remains open source, while enterprise features are available through Traefik Labs products.
  • The name "Traefik" comes from "Traffic" — fitting its role of managing network traffic.

Focus on Container Dynamics

The keyword that set Traefik apart from day one is dynamic: it watches the Docker socket and the Kubernetes API, then updates routing configuration automatically without reloads and without downtime. That is the revolution it brought.

Why Traefik

Core Advantages

  • Automatic service discovery: Traefik automatically finds new containers and services.
  • Native Docker/Kubernetes integration: reads directly from the orchestrator.
  • Automatic TLS: native Let's Encrypt integration for automatic certificates.
  • Dynamic configuration: changes take effect immediately without reloads.
  • Modern protocols: HTTP/2, HTTP/3, gRPC, and WebSocket.
  • Built-in observability: metrics and tracing available without extra setup.
  • Easy to use: routing is declared through container labels or a small file.

The fundamental difference from the old approach is visible in the two configuration files below. On the left is the classic static NGINX pattern, on the right the declarative Traefik approach that changes automatically:

Classic pattern: static NGINX configuration
upstream app_backend {
    server 10.0.0.11:3000;
    server 10.0.0.12:3000;
}
server {
    listen 80;
    server_name app.example.com;
    location / {
        proxy_pass http://app_backend;
    }
}
Traefik pattern: Docker labels
services:
  app:
    image: myapp:latest
    labels:
      - traefik.enable=true
      - traefik.http.routers.app.rule=Host(`app.example.com`)
      - traefik.http.services.app.loadbalancer.server.port=3000

If backend 10.0.0.11 is replaced by a new container, NGINX requires manual editing and a reload. Traefik finds out on its own from Docker — that is the essence of why Traefik is needed in the container era. The declarative label traefik.http.routers.app.rule above is the new language that replaces NGINX's long server block.

Traefik vs. the Alternatives

Comparison with Other Proxies

  • NGINX/NGINX Plus: very stable and fast, but with static configuration and no native service discovery; NGINX Plus adds commercial features.
  • HAProxy: an excellent TCP/L4 load-balancing champion, but file-based configuration that is less integrated with orchestrators.
  • Envoy: a powerful CNCF proxy with the xDS API and service mesh support, but more complex for day-to-day configuration.
  • Caddy: very easy with built-in automatic HTTPS, great for standalone use, but not as deep in orchestration integration as Traefik.

When to Choose Traefik

Traefik is the best choice when your workloads live on Docker or Kubernetes, you want automatic TLS without the headache of managing certificates, and routing that changes dynamically. For simple static proxies or large-scale TCP tuning, other alternatives may fit better — choose based on your needs, not on hype.

Traefik Use Cases

Traefik fits a wide range of scenarios:

  • Microservices gateway: a single entry point for dozens of services.
  • Container orchestration: native Docker and Kubernetes integration.
  • API gateway: path, header, and method routing for API backends.
  • Load balancer: traffic distribution across backend instances.
  • TLS termination: centralized HTTPS with automatic certificates.
  • Homelab reverse proxy: a single entrypoint for all self-hosted services.
  • Development environment: automatic container discovery on docker compose up.

Even for development alone, the ability to see a new container appear and instantly have a route created makes Traefik feel magical compared to manual edit-and-reload.

Closing

Key takeaways:

  • Traefik was born in 2015 by Containous to solve the static configuration problem in the container era.
  • Written in Go, cloud-native from the start, with an open-source core.
  • Its main advantages: automatic service discovery, dynamic config, and automatic TLS.
  • NGINX and HAProxy remain great, but lack native orchestration integration.
  • Main use cases: microservices gateway, API gateway, homelab, and Kubernetes ingress.

In episode 2 next we will dissect Traefik architecture and core concepts — entrypoints, routers, middlewares, services, and providers, how static and dynamic configuration work together, and the full flow of a request from entry to returning to the client. This is the foundation used in every episode that follows.

Learn Traefik - History, Background & Why You Need Traefik | Learn Traefik