Traefik Crash Course (Without docker)

  Рет қаралды 48,024

Hussein Nasser

Hussein Nasser

Күн бұрын

Traefik is an open-source reverse proxy written in GO and marketed as an Edge Router. It supports automatic TLS and HTTP/2 by default and other cloud native features. In this video I want to discuss Traefik as a reverse proxy and load balancer.
0:00 Intro
2:00 Problem
4:00 Traefik Architecture
11:00 TCP vs HTTP Proxying
12:00 Demo
15:30 Install Treafik Docker
16:40 Treafik as a Layer 7 Proxy
18:00 Static Configuration
20:00 Proxy to all 4 backend NodeJS services
27:00 Split load to multiple backends (app1/app2)
32:00 Block certain requests (/admin)
34:20 Weighted RR
38:30 Treafik as a Layer 4 Proxy (tcp router)
43:30 Create DNS record
44:40 Enable HTTPS on Treafik (lets encrypt)
50:00 Disable 1.1/1.0 Enable TLS 1.2 and TLS 1.3
53:50 Summary
Resources
docs.traefik.io/providers/file/
Config
github.com/hnasr/javascript_p...
🏭 Backend Engineering Videos
• Backend Engineering (B...
💾 Database Engineering Videos
• Database Engineering
🛰 Network Engineering Videos
• Network Engineering
🏰 Load Balancing and Proxies Videos
• Proxies
🐘 Postgres Videos
• PostgresSQL
🚢Docker
• Docker
🧮 Programming Pattern Videos
• Programming Patterns
🛡 Web Security Videos
• Web Security
🦠 HTTP Videos
• HTTP
🐍 Python Videos
• Python by Example
🔆 Javascript Videos
• Javascript by Example
👾Discord Server / discord
Become a Member
/ @hnasr
Support me on PayPal
bit.ly/33ENps4
Become a Patreon
/ hnasr
Stay Awesome,
Hussein

Пікірлер: 90
@m_codes
@m_codes Күн бұрын
Love your content bro. Very appreciated
@mujun_kross
@mujun_kross 2 жыл бұрын
I have been trying to get my head around how to setup and use Traefik. This tutorial has helped me more than any other I have tried to follow. Thank you for the excellent tutorial and I look forward to viewing more of your work. Keep up the good job!
@tdevzone2654
@tdevzone2654 3 жыл бұрын
i like your enthusiasm when making this type of video thank you a loooooooot
@EddyCaffrey
@EddyCaffrey 3 жыл бұрын
Finally the long-awaited Traefik video. Thanks, Mr. Hussein. Great like always. Thank you also for taking the time to learn and share your knowledge with us.
@hnasr
@hnasr 3 жыл бұрын
Thanks Eddy!
@usmonbekravshanov6933
@usmonbekravshanov6933 7 ай бұрын
This channel is a true gem
@kapurar
@kapurar Жыл бұрын
Thank you! One of the best tutorials I have see on Traefik. I particularly apprecaite the fact that you did it without Docker and didnt just cut and paste some YAMl file.
@roger74989
@roger74989 3 жыл бұрын
Great course!. I was able to understand a lot of things that I didn't know how it worked.
@henrygraterol
@henrygraterol 2 жыл бұрын
Great tutorial! I also think traefik is overly complicated, but you have managed somehow to explain it in a manner I could understand the whole concept. Also, good choice of explaining this using a file as the provider. It made things easier to understand. Thank you!
@jairunet
@jairunet 2 жыл бұрын
There are a lot of people posting complicated, copy paste, with strange assumptions, you do it the right way Hussein. The fundamentals are core important, as you say the most important detail "understand"! thank you so very much I enjoy every note you shared, excellent, and I am definitely looking forward to continue learning from your excellent explanation.
@shahinbayat
@shahinbayat 3 жыл бұрын
That's great, u finally created a crash course on this awesome tool. Thanks alot
@jeansilga3516
@jeansilga3516 5 ай бұрын
Great video! I was able to get up and running pretty quickly with traefik thanks to this video. You made a wonderful job right there. I love your mindset. Keep up the good work. Cheers!
@mutley11
@mutley11 3 жыл бұрын
Thanks for your huge effort on this; the pain you go through was most instructive. I was writing a much bigger comment, but KZbin lost it when it moved onto the next video 😒, so I'll just say that: - Traefik is less like a traditional load-balencer or a reverse-proxy, but is instead designed as an ingress-controller; this is particularly evident in the documention around middlewares - Traefik is easier to type if you pronounce it "tray-fik" - and if you really don't like YAML, Traefik also support TOML I love your videos; they make it much easier to try and stay up-to-date (I had no idea there even was such as a thing as HTTP/3 until I found your channel). Thanks!
@chrisumali9841
@chrisumali9841 2 жыл бұрын
thanks for the demo and info. I have setup traefik 2.6 with a cloudflare ARGO. The journey took several hours, but I guess its done. I learned some insight into your demo. Thanks, and have a great day
@AkshayKarode
@AkshayKarode Жыл бұрын
Much relief bro, you simply did very good. The video that traefik docs team should really watch.
@NastyWicked
@NastyWicked 3 жыл бұрын
Great guide as always, nothing is boring with your enthusiasm :) Also, when it comes to copy pasting tab-formatted text into tab aware IDEs, you can usually select the text and Shift + Tab to remove the indentations, should also work in Visual Studio Code
@hnasr
@hnasr 3 жыл бұрын
Mind blown 🤯 nice tip thank you 🙏😍
@ddpxl
@ddpxl 3 жыл бұрын
@@hnasr you actually do it at 29:22 ;)
@pestorosso450
@pestorosso450 3 жыл бұрын
Thank you soooo much! I was a little bit frustrated with the traefik docs.
@cappedvillain2522
@cappedvillain2522 3 жыл бұрын
Haha epic. Possibly my best channel to watch. Thank you
@JensenSiu
@JensenSiu 2 жыл бұрын
This tutorial is the only one I have found explaining Traefik without the use of docker and docker-compose.yml which is widely used almost anywhere else. So many thanks Hussein ! As yourself, I am working on my homelab environnement under macOS and there are so many restrictions compared to Linux systems that I am still struggling with very basics configurations. For example, at start, I tried to use Traefik with Docker Desktop. Then I realized that on non-Linux systems, it is impossible to share the same network as the local machine for docker services. Therefore, it is impossible to get real client IPs. Then, I toggled to the standalone version of Traefik (easy homebrew on macOS!) wich makes it possible. But I encountered a new problem with Let's Encrypt certificates behind Cloudflare which needs to pass environnement API key to authenticate certificate generation. At this point, I found no informations either on Traefik documentation or on forums to declare those API keys trough static or dynamic configuration files (the other only uses docker-compose.yml to declare those keys). For the time being, I use previously manually generated certificates from Let' Encrypt stored on my local machine but I fell very frustrated to miss the use of the automatic service provided by Traefik. Would you have a solution for this problem ?
@KennedyWaithaka
@KennedyWaithaka Жыл бұрын
Great explanation. Traefik is overwhelming but once you get over the basics, everything flows naturally. I think explicit is better, so i appreciate Rule being mandatory field
@AK474000
@AK474000 Жыл бұрын
This is Godsend too many tuts for Traefik is just copy this paste that and I get that this has the potential of automating stuff with certain services, but I never felt it was explained well and the labels thing that gets injected into Docker Compose files only adds to the confusion for me. Thanks for the stripped back approach to how to use this project.
@ramane2900
@ramane2900 2 жыл бұрын
Loved every second of the video..
@George.Targaryen
@George.Targaryen 10 ай бұрын
These guy is Amazing!
@ghassenbenmansour3159
@ghassenbenmansour3159 3 жыл бұрын
Great video, thanks for sharing :)
@hnasr
@hnasr 3 жыл бұрын
Thanks Ghassen
@rasheed.a873
@rasheed.a873 2 жыл бұрын
Good videos as always brother
@johnclarkson6120
@johnclarkson6120 3 жыл бұрын
you know what... you are amazing instructor... thx a lot.. it's so useful...
@hnasr
@hnasr 3 жыл бұрын
Glad it was helpful! thanks!
@johnclarkson6120
@johnclarkson6120 3 жыл бұрын
@@hnasr what if add docker-compose version configuration...wow..amazing dude...cool man...thx a lot.
@Giondo
@Giondo 2 жыл бұрын
great video!, I was expecting something more related to k8s (architecture) and how it works how connections are made traffic flow and those kind of stuff, but is good for basic understanding of traefik anyway :), Thanks!
@exelfer081
@exelfer081 Жыл бұрын
Thank you... I start learn traefik
@danydanger
@danydanger 2 жыл бұрын
Wow!! kudos to u Hussein, after so long able to learn about Traefik in such a simple way, Keep up the good work !!! Also, can you also share how and where to learn YAML from ?
@lun1c0n
@lun1c0n 3 жыл бұрын
Hussein, first thing to do when playing with new software is enable maximum logging (in traefik --log.level=DEBUG) ;)
@EduardoMazolini
@EduardoMazolini 4 ай бұрын
Vi diversos vídeos sobre traefik esse foi o mais didático.
@ivanmaglica264
@ivanmaglica264 Жыл бұрын
Great tutorial! Yaml processing is not done by traefik itself, but yaml processing library, so error logging is done by it. These problems (duplicate keys) are usually caught by vscode these days.
@xenossephiroth8225
@xenossephiroth8225 3 жыл бұрын
We use traefik with docker. The docker label make it so easy to upgrade, no nginx dns problem any more.
@speakthememe
@speakthememe Жыл бұрын
thank you, i lov you
@santoshakhilesh
@santoshakhilesh 3 жыл бұрын
Nice one.
@thannasip8001
@thannasip8001 3 жыл бұрын
Thanks 😊
@dojohansen123
@dojohansen123 3 жыл бұрын
Thanks. Nice for once to see someone presenting something while still retaining some critical sense. This is, IMHO, definitely not production ready. (And I *really* hate this megatrend, in general, away from strict behavior towards "best effort" and guesses and all the rest of the script-kiddie approach..!)
@thatguy6225
@thatguy6225 3 жыл бұрын
A crash course when you jump into traefik! Nice puns.
@hnasr
@hnasr 3 жыл бұрын
30:40 yell at me guys
@Operaatoors
@Operaatoors 3 жыл бұрын
Exactly... :D The question is, how did you manage to learn all this stuff before this video? I am struggling hard time...
@nyamdorjtsereg9543
@nyamdorjtsereg9543 3 жыл бұрын
"how it's production ready" i'm dead xD
@abhaykatiyar3539
@abhaykatiyar3539 Жыл бұрын
Hi Hussein , i have a question regarding noip setup. Do we need to setup ddns in our router for the hostname from noip
@MehdiShojaei
@MehdiShojaei 3 жыл бұрын
Hi Hossein, Thanks so much for your useful researches. Just as a suggestion, How do you think about adding some very simple benchmarks to some of your demos? For example, comparing your demos using these different Edge proxies for Request Per Second, Latency, and Error Ratio, using tools like *wrk*? I know benchmarks are not an absolute thing, but they can give viewers some hints in terms of performance.
@hnasr
@hnasr 3 жыл бұрын
Nice idea! Thanks Mahdi
@jjames7206
@jjames7206 3 жыл бұрын
Thanks Hussein , I start knowing a lot of LB softwares not just nginx , all these knowledges because you! Thank you! By the way does Traefik and Caddy support automatic renew SSL?
@hnasr
@hnasr 3 жыл бұрын
J James thank you very happy I could help 🙏 and yes both Caddy and Traefik support that
@nurhusni
@nurhusni 2 жыл бұрын
2 years later, do you now understand traefik with docker and will you make a crash course & tutorial about that?
@Lavaboy1985
@Lavaboy1985 3 жыл бұрын
I'm a little too late to this show, but you can block access with a ton of middlewares traefik is capable of. You need to tell your service to make use of it. For example "Errors" or IpWhitelist. Middlewares are capable of redirect http to https aswell.
@moshiurmd.rahmanshuvo3067
@moshiurmd.rahmanshuvo3067 Жыл бұрын
Is there any package for installing traefik on ubuntu? Or do I need to build traefik from source to use it on ubuntu?
@colinm3130
@colinm3130 3 жыл бұрын
I am curious about how all the letsencrypt stuff is automatic. It was to be renewed every 3 months. Is that automatic too? I assume you have to have letsencrypt already installed and run the update script?
@colinm3130
@colinm3130 3 жыл бұрын
Oh acme, now I get it.
@bashardlaleh2110
@bashardlaleh2110 Жыл бұрын
I think some configuration and abstractions in Traefik don't make sense in a normal environment because Traefik was designed for containerized environments (swarm, k8s, ecs,....etc) where backends are always-changing containers and that's why you struggled to make it work with TCP because it's not meant to be used like that
@user-hi7pc4bg7v
@user-hi7pc4bg7v 5 ай бұрын
Can you give me a way how to block a certain path, cuz i tried to follow you (32:00) but this way is deprecated
@jatinofficial
@jatinofficial 3 жыл бұрын
Any chance for traefik in docker?
@pipi_delina
@pipi_delina 3 жыл бұрын
when will you do a tut on docker... I like it when you teach
@hnasr
@hnasr 3 жыл бұрын
Ismail Yushaw I might do a full tutorial on it. i have a playlist using docker Docker kzbin.info/aero/PLQnljOFTspQWsD-rakNw1C20c1JI8UR1r
@dbassett74
@dbassett74 3 жыл бұрын
Is it just me or does all the gripes in this video actually point to advantages? I think Traefik is amazing.
@hnasr
@hnasr 3 жыл бұрын
Dan I have no doubt, A lot of people like traefik (see comments) so it actually might be just me 😅
@ddpxl
@ddpxl 3 жыл бұрын
besides autorenewing letsencrypt, traefik shines most in k8s environments which can me highly dynamic. i don't even want to start thinking about configuring nginx with 20+ services that go up and down and change ip and port constantly. you would need to have some script talking to the k8s api and grab the nodes and whatnot... traefik does that magic with a few lines of yaml.. and just like k8s lets you forget about the plumbing behind the scenes.
@aishasyed5704
@aishasyed5704 3 жыл бұрын
traefik on kubernetes as ingress controller video please :)
@mohammedhewedy8231
@mohammedhewedy8231 3 жыл бұрын
Can you please work on making the sound louder in the next episodes?
@pipi_delina
@pipi_delina 3 жыл бұрын
does it support something like DNS
@the.turd.sandwich
@the.turd.sandwich 3 жыл бұрын
What do you mean by that?
@pipi_delina
@pipi_delina 3 жыл бұрын
Assumin I have 4 Authoritative DNS servers... Thats what I mean... use Traefik to load balance them
@user-ye8zh3ep7m
@user-ye8zh3ep7m 3 жыл бұрын
Envoy proxy?
@hnasr
@hnasr 3 жыл бұрын
Роман Воловик yes that’s probably next
@vim55k
@vim55k 3 жыл бұрын
Linkerd maybe?
@user-ye8zh3ep7m
@user-ye8zh3ep7m 3 жыл бұрын
@@vim55k no, envoy exactly
@mmalam7182
@mmalam7182 3 жыл бұрын
do u have patreon? please take my money
@corneliuslumos668
@corneliuslumos668 3 жыл бұрын
12:33 I have the same problem as you, it's a curse actually :-(
@baltox61
@baltox61 2 жыл бұрын
i did as he suggested and just jumped into traffic, did not end well
@antontishchenko294
@antontishchenko294 3 жыл бұрын
49:22 The same name for routers. That is why HTTPS is resolved and HTTP is not resolved.
@antontishchenko294
@antontishchenko294 3 жыл бұрын
52:40 You have asked why HTTP doesn't work and found the answer. Ignore my comment, it doesn't make sense when I watched full video :-)
@karimmirak2158
@karimmirak2158 3 жыл бұрын
There's lots of things you didn't cover in the default configuration (debug, dashboard,...) Then there's no need to cover the round robin manually when you use labels, you must read the doc carefully.
@corneliuslumos668
@corneliuslumos668 3 жыл бұрын
8:30 Fuck I am toast if I don't figure this out
@danieljohannbutcher9927
@danieljohannbutcher9927 3 жыл бұрын
13:12 I HATE YAML I am not alone
@BryanChance
@BryanChance Жыл бұрын
i'm already not using Traffic...err Traefic....Traefik.
@altimmons
@altimmons 3 жыл бұрын
Yes their doc is so bad starting out- it skips a bunch of critical steps
@Danielo515
@Danielo515 2 жыл бұрын
God bless you, but not for posting a nice tutorial from scratch, that's nice, but I'm happy about you sharing your opinions on garbage. As everything Google related or inspired, the documentation is lacky, confusing, incomplete and misleading, but still it gets popular. Another nasty thing is how they leak implementation details about their underlying language. Why can't you use single quotes like in any other place? Because GO uses that for single characters. Wtf? I don't care about your programming language syntax! do your homework! And the default behavior without no config is to yield no error and start a useless process? What a pile of garbage.
@cyanwarewolf
@cyanwarewolf Жыл бұрын
"not" is not supported 😆🤣😂😁
МАМА И STANDOFF 2 😳 !FAKE GUN! #shorts
00:34
INNA SERG
Рет қаралды 2,8 МЛН
Василиса наняла личного массажиста 😂 #shorts
00:22
Денис Кукояка
Рет қаралды 9 МЛН
Final muy inesperado 🥹
00:48
Juan De Dios Pantoja
Рет қаралды 18 МЛН
TLS Passthrough Explained
13:37
Hussein Nasser
Рет қаралды 7 М.
Before you move to HTTP/3 ...
11:31
Hussein Nasser
Рет қаралды 15 М.
They Enabled Postgres Partitioning and their Backend fell apart
31:52
Hussein Nasser
Рет қаралды 38 М.
Traefik vs. Nginx performance benchmark
12:38
Anton Putra
Рет қаралды 36 М.
Understand File Provider in Traefik 2
13:35
Li Yang
Рет қаралды 4,9 М.
Apache Kafka Crash Course
1:18:06
Hussein Nasser
Рет қаралды 414 М.
Will the battery emit smoke if it rotates rapidly?
0:11
Meaningful Cartoons 183
Рет қаралды 30 МЛН
Main filter..
0:15
CikoYt
Рет қаралды 10 МЛН
WWDC 2024 Recap: Is Apple Intelligence Legit?
18:23
Marques Brownlee
Рет қаралды 6 МЛН
iOS 18 vs Samsung, Xiaomi,Tecno, Android
0:54
AndroHack
Рет қаралды 81 М.