-
|
Hi, I noticed that traefik is used to provide load balancing between frontend and backend under the same domain served by different containers. I also noticed that on Vue dockerfile also contains NGNIX (another load balancer). I would like to understand the main purpose of using Ngnix in this case. Is it necessary to deal with static files ? With vue-router ? Traefik does not serve static content like NGINX does ? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
for prod, traefik is pretty sluggish, but its great for build stage with hot reload and all that jazz. for me personally on prod i prefer nginx. fast, scaleable, great compression, great security. but thats just my opinion and im sure theres alot of pros for traefik aswell |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the reply @haviduck. It makes sense, maybe traefik is being used just to handle basic tasks. |
Beta Was this translation helpful? Give feedback.
-
|
Traefik works as a high performance TLS termination proxy, you can read more about it here: https://fastapi.tiangolo.com/deployment/https/ It sits in front of everything, handling HTTPS for everything underneath. It handles obtaining HTTPS certificates automatically. Nginx could do some parts of that, but it wouldn't be able to obtain HTTPS certificates automatically. In this project, Nginx is used to serve files, static files, for the frontend (which Traefik can't do). So, Traefik is on top of everything, handling HTTPS, then underneath is Nginx serving static frontend files. A request goes: your browser -> HTTPS to Traefik -> HTTP to Nginx |
Beta Was this translation helpful? Give feedback.
Traefik works as a high performance TLS termination proxy, you can read more about it here: https://fastapi.tiangolo.com/deployment/https/
It sits in front of everything, handling HTTPS for everything underneath. It handles obtaining HTTPS certificates automatically.
Nginx could do some parts of that, but it wouldn't be able to obtain HTTPS certificates automatically.
In this project, Nginx is used to serve files, static files, for the frontend (which Traefik can't do).
So, Traefik is on top of everything, handling HTTPS, then underneath is Nginx serving static frontend files.
A request goes:
your browser -> HTTPS to Traefik -> HTTP to Nginx