Reputation: 1018
I have multiple and different dockerized applications, each one comes with its proper Nginx service which sends traffic to its containers based on some rules.
I need to put those applications on the same server, so I added a new Nginx in the host that will handle SSL, and forward the traffic to the correct dockerized Nginx based on some rules.
Question: Is it ok to use Nginx in the host which will forward traffic to multiple different dockerized Nginx? Does it have any known problems? will that affect performance?
Upvotes: 0
Views: 219
Reputation: 5394
If you want the added security of a separate Nginx container per cluster of microservices that's fine, but, it comes with the latency hit of another request or redirect between endpoints, consider that every new request has to go through the first reverse proxy and then through another one, the benefits that each one handles a different group of services are mainly security-wise but are negligible when considering it's all running on the same host and are part of the same application stack, on top of creating a debugging nightmare if an inter-service issue occurs and you need to find out where the root cause is.
The more cost-effective and simpler solution as I see it is consolidating and the proxies under a single main one that will handle the TLS termination and the routing to the different services
Upvotes: 1