Does API gateways such as Zuul or Ngnix require backend services to be exposed externally as well?

10/23/2019

We are trying to figure out a microservice architecture where we have an API Gateway (Zuul in this case), now all the services that Zuul is redirecting requests to would also need to be exposed externally? It seems counter intuitive as all these services can have private/local/cluster access and gateway is the one that should be externally exposed. Is this correct assessment? In what scenarios would you want these backend services to be exposed externally?

----- |-----

-- user3380149
kubernetes
kubernetes-ingress
netflix-zuul
nginx-ingress
spring-cloud-netflix

1 Answer

10/23/2019

Normally, you would not expose your backend services externally. The gateway (or the ingress) serves as the external gateway and proxies the requests to the internal network.

I am familiar with one use case where I expose some services directly: I do not want to expose some admin services running on my cluster to the external world, but I want to expose them to my VPN, so I have an ingress forwarding traffic between the external network and the cluster, and nodePort services that expose admin apps to my VPN.

-- Burak Serdar
Source: StackOverflow