Traefik - The Cloud Native Edge Router, Reverse Proxy, and Load Balancer

This episode we quickly cover the amazingly cool Reverse Proxy Traefik Simply point Traefik at your container orchestrator and it does the rest for you like Revers Proxy, Load Balancing, HTTPS with Lets Encrypt, and much more.

This episode we quickly cover the amazingly cool Reverse Proxy Traefik Simply point Traefik at your container orchestrator and it does the rest for you like Revers Proxy, Load Balancing, HTTPS with Lets Encrypt, and much more.

Website - https://traefik.io
GitHub Project - https://github.com/containous/traefik

Episode Transcription

Welcome back to The Byte. In this episode, we're gonna talk about Traefik.
Traefik, for all those that don't know, is a reverse proxy. It's a cloud-native reverse proxy, and I must say it's one of my favorite proxies out there. I've used Apache in the past, Nginx, and several others, and I keep coming back to Traefik. Out of the box, it just contains so many features.

Basically, all we're doing is pointing Traefik at our container orchestrator, Docker Swarm, Kubernetes, Rancher, Amazon UCS, whatever your orchestrator is. And Traefik does the rest. It provides HTTPS with Let's Encrypt. It does reverse proxying. It does load balancing. It provides Prometheus metrics right out of the bat. I mean, it's really, really nice. And what's nice is, I mean, it's a container itself, obviously. You deploy it, and it's up and running right away.

It provides a really nice user interface, which provides the health of each route, so if you have a website, it shows the website and how it routes to the back end of your services. It gives you average response time between when a request comes into what hits the service. It gives you some metrics for Prometheus. It provides logging. You can integrate like open tracing, Jaeger, Zipkin, et cetera, for some observability.
It really checks all the boxes. I must say that I use it for quite a lot of my projects, so, for example, I use it for my Prometheus demos, and every new project where I go to a customer, I always recommend it because, for one, it's easy. Two, you don't have to maintain much, and three, it comes with so many features that you just can't go wrong.

Now, what I find really nice is, in the docker compose example, all you do is provide a label. For example, I provide a label to my front web service, and I call it, you know. I could give it a domain name like host.mywebsite.com and it actually registers the Let's Encrypt certificate with my DNS provider or my Cloud provider. And then it has its certificate right away, right when I start up Docker Compose. It registers. It gets everything up and running. It's really that simple.

Now, what also I find nice is like the Prometheus metrics. So for example, I also my Prometheus demo I have Traefik setting file notes, I'm doing a lot of the routing between different services, between Prometheus, Grafana, et cetera. Then I also am scraping the metrics from Traefik itself, and you can get stuff like how long the latency, you can get total requests, number of 404 errors, 502. So you get a lot of great information from it, as well as like health and different options outsource.
Personally, I've only used the opensource edition. I realized the enterprise edition is now out in the market, and it's getting a lot of attention, especially now that NginX was just recently acquired. Traefik is getting a little bit more attention now I would imagine. And it's quite popular. I mean, on their website they claim there are 400 million downloads already, 19,000 stars in GitHub, and 300 contributors. But what I like about it is, you know, easy to deploy, easy to maintain, I mean, mine running in my demo environment's been running over a year, no issues. It's very stable, very fast. It can handle the load.

Traefik is just if you compare it to other providers like Nginx or stuff, you have to do so many configurations to get up and running, where Traefik you just deploy it, and it's just watching the orchestrator the whole time. I find that is a much easier way to manage a proxy than the other way around.

Additionally, it's like I said, it integrates with Docker, Kubernetes, Rancher, AWS. So give it a try. The name is Traefik, T-R-A-E-F-I-K.io they are very active in the open source community, they are going to DockerCon, they're going to KubeCon, and they have a really cool logo, too. So it's a gopher logo. And I say performance-wise, it's also great. Give it a try. Give us some feedback and let us know your thoughts. I can also share the links in the show notes on how I deploy it and some different situations.


Brian Christner