Slide 1

Slide 1 text

Introduction to Traefik

Slide 2

Slide 2 text

AGENDA AGENDA About Traefik Common Misunderstandings Compared to Nginx Example of use Using Docker & Docker-Compose Insight into V2

Slide 3

Slide 3 text

ABOUT TRAEFIK ABOUT TRAEFIK HTTP Reverse Proxy & Load Balancer First commit: 2017-03 Written in Go Open to the community

Slide 4

Slide 4 text

ABOUT TRAEFIK ABOUT TRAEFIK HTTP Reverse Proxy & Load Balancer

Slide 5

Slide 5 text

COMMON MISUNDERSTANDINGS COMMON MISUNDERSTANDINGS It's not a webserver Has a built-in webserver for error pages (But nothing more!)

Slide 6

Slide 6 text

COMPARED TO NGINX COMPARED TO NGINX Nginx Traefik Load Balancer   Reverse Proxy   Webserver   Supports TCP & FastCGI  ¹ ¹ Traefik in Version 1.X

Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

BENEFITS OF TRAEFIK BENEFITS OF TRAEFIK Nginx Traefik Let's Encrypt   Docker   Kubernetes   Dashboard   Dynamic Configuration  

Slide 9

Slide 9 text

EXAMPLE OF USE EXAMPLE OF USE Live demo!

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

docker-compose.yml whoami: image: emilevauge/whoami labels: - "traefik.frontend.rule=Host:whoami.localtest.me" 1 2 3 4

Slide 13

Slide 13 text

INSIGHT INTO V2 INSIGHT INTO V2 TCP Middlewares...

Slide 14

Slide 14 text

THANK YOU! THANK YOU! Slack: Blog: Github: Tutorials: https://slack.traefik.io https://blog.containo.us https://github.com/containous/traefik Github: Awesome-Traefik

Slide 15

Slide 15 text

WORKAROUND FOR FASTCGI WORKAROUND FOR FASTCGI https://github.com/containous/traefik/issues/753