There are a lot of clear answers to the question on why one should use Nginx in a classic 3-tier architecture with a Gunicorn/Flask app where you also serve static content.
The architecture I want to deploy is different and I can't find an answer to my doubt if it would make sense to put Nginx in front of Gunicorn in this case.
In my case I have I typical back-end in Node.js but when new data is sent to the back-end it sends this for asynchronous processing to a Gunicorn/Flask app.
The Node app and the Gunicorn/Flask app are in two different Docker containers and communicate over a docker network. Only the Node app communicates with the Gunicorn/Flask app.
Does it make sense in any way to put Nginx in front of the Gunicorn/Flask app as it does not serve static content and is not connected to the "outside world"?
Thank you!
Edit:
I add new information based on Michael Hampton's comment:
There is also a front-end component which is served by Nginx. Incoming traffik gets redirected by traefik to the front-end component or the Node back-end component for which I use pm2.
There are two docker networks. On one hand a network that is used for traefik where, apart from traefik, the front-end and the Node back-end component are attached to as they have to be accessible from the outside. On the other hand, there is an internal network where the Node back-end component and the Gunicorn/Flask app are attached to in order to make sure the Gunicorn/Flask app is not accessible from the outside.
At the moment the Node back-end component sends requests directly over the internal docker network to the Flask app via the port on which Gunicorn is serving it. As I don't want it to be accessible from outside, traffic to Gunicorn does not get redirected through traefik.
Is this a good approach or should I put something like Nginx in front of Gunicorn in the Gunicorn/Flask container?