full-stack-fastapi-template icon indicating copy to clipboard operation
full-stack-fastapi-template copied to clipboard

Understanding Ngnix and Traefik

Open kaleming opened this issue 4 years ago • 2 comments

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 ?

kaleming avatar Mar 29 '21 16:03 kaleming

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

haviduck avatar Mar 31 '21 01:03 haviduck

Thanks for the reply @haviduck. It makes sense, maybe traefik is being used just to handle basic tasks.

kaleming avatar Apr 01 '21 21:04 kaleming