Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduction to Traefik

Introduction to Traefik

Short introduction to Traefik in Version 1.

waahhhh

May 20, 2019
Tweet

Other Decks in Programming

Transcript

  1. AGENDA AGENDA About Traefik Common Misunderstandings Compared to Nginx Example

    of use Using Docker & Docker-Compose Insight into V2
  2. ABOUT TRAEFIK ABOUT TRAEFIK HTTP Reverse Proxy & Load Balancer

    First commit: 2017-03 Written in Go Open to the community
  3. COMMON MISUNDERSTANDINGS COMMON MISUNDERSTANDINGS It's not a webserver Has a

    built-in webserver for error pages (But nothing more!)
  4. COMPARED TO NGINX COMPARED TO NGINX Nginx Traefik Load Balancer

      Reverse Proxy   Webserver   Supports TCP & FastCGI  ¹ ¹ Traefik in Version 1.X
  5. COMPARED TO NGINX COMPARED TO NGINX BENCHMARK BENCHMARK Source: Traefik

    is obviously slower than Nginx, but not so much: Traefik can serve 28392 requests/sec and Nginx 33591 requests/sec which gives a ratio of 85%. Not bad for young project :) ! https://docs.traefik.io/v1.5/benchmarks
  6. BENEFITS OF TRAEFIK BENEFITS OF TRAEFIK Nginx Traefik Let's Encrypt

      Docker   Kubernetes   Dashboard   Dynamic Configuration  
  7. docker-compose.yml version: "3.7" services: traefik: image: traefik:alpine ports: - "80:80"

    labels: - "traefik.frontend.rule=Host:traefik.localtest.me" - "traefik.port=8080" volumes: - /var/run/docker.sock:/var/run/docker.sock:ro - ./traefik.toml:/etc/traefik/traefik.toml 1 2 3 4 5 6 7 8 9 10 11 12 13
  8. traefik.toml defaultEntryPoints = ["http"] [entryPoints] [entryPoints.http] address = ":80" [docker]

    endpoint = "unix:///var/run/docker.sock" watch = true exposedByDefault = true swarmMode = false [api] entryPoint = "traefik" adress = ":8080" dashboard = true 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16