Reputation: 2187
Forgive me if I am asking a stupid question, but I am building a server where I will host multiple Flask websites Docker Container using Nginx Docker. My question now is: is it better to have one main nginx docker container and then host all my Websites Docker containers on it or have an Nginx docker container for each application with docker compose?
I want to know in terms of resource handling and efficiency which one is better to go for ?
Upvotes: 3
Views: 1115
Reputation: 3041
Many roads lead to Rome. If you follow the "microservice approach", i.e. you are closer to the backend with the Nginx paths etc., you have the advantage that you can change or break one service without having a big impact on the others.
We have DNS -> F5 -> Nginx -> Nginx -> backend at work for example. No problems.
An Nginx (container) does not consume many resources, partly because it is programmed in C.
Upvotes: 2