Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

162
Visualizações
Do I need a reverse proxy if I'm running a Node.js in a Docker container?

I've read some articles that recommend using reverse proxy (like nginx) before the Node.js application(like that one: Advantages of a reverse proxy in front of Node.JS). That is better (in terms of security at least) than running Node.js itself and exposing it.

However, running the Node.JS app inside a Docker container should prevent the security issues (because the app is running inside a container and is isolated from the host system).

So, my question is: are there benefits of using reverse proxy while running Node.js app in a Docker container? And if so, how can it improve my application?

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Every time I had to setup Nginx to proxy to Docker containers is, not only for the security aspect, which as you mentioned, is self contained in the Docker container, but also to facilitate the distributed system communication.

In a standard architecture, you have an API container, an IDP container, and a Frontend container (let's assume this is a webapp). Everything is behind Nginx. IDP, API and Frontend are exposed to external traffic... but here comes the fun part. Let say you want to have an additional service running on a different container (a geolocation service, ETL, or whatever else). That container doesn't need to be exposed to the public. Just the internal containers can talk to it.

In the previous scenario a request will hit the frontend, frontend will send the request(s) to the API, API will verify the token with the IDP (internal call), if not authorized redirect the frontend to the IDP (3 legged authentication) or just return 403 and have the user reauth (2 legged auth) by sending credentials back to API again. Then if the user needs to call any additional service, all calls will go first thru the API, OR they could be mapped in Nginx to hit the service directly, just make sure the user is authenticated/authorized to use the service.

I hope that sheds some light on a particular usage of Nginx. Keep in mind, this is just 'one' use case, but Nginx could be used for many other purposes.

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda