0

I'm involved in the development of an enterprise web application whose functionality is separated into microservices deployed in a Docker Swarm.

In order to expose these microservices to the Internet (for example for our client side front ends), one of our microservices is an NGINX web server, which listens to web requests and functions as a reverse proxy to the various other microservices.

This approach is a source of frustration in our project, as the paths to the various Docker services are written into the NGINX's configuration, and thus the NGINX will only load correctly if all the other services are already running, and also, if any service is added, the NGINX service will have to be reloaded.

We are now looking into various enterprise solutions to handle dynamic discovery of services in the NGINX (apparently the premium version of NGINX will handle this), but I get the feeling that this could somehow be handled in a simpler manner, and that if we set things up differently, we wouldn't be having this problem in the first place.

Are we overcomplicating this?

1 Answer 1

2

For a swarm-native reverse proxy, check out Traefik (and the swarm setup docs here). Traefik runs as a docker service on the manager node of the swarm and hooks into docker.socks allowing dynamic discovery of services. Adding a service to the reverse proxy is as simple as connecting it to the Traefik docker network and adding a few labels in the compose file.

1
  • There's also Docker Flow Proxy which does basically the same thing, except as a few small services hooked together instead of one monolithic proxy service.
    – Jack
    Commented Oct 19, 2017 at 18:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.