Search code examples
asp.netwindowsdocker-swarmdocker-network

How to setup external load balancer or Proxy on Windows Docker Swarm?


I'm new to Docker, need expose multiple container on different domain. Whether I need to setup external load balancer or proxy?

And also for production setup have to deploy container on which networking overlay or anyother?

Anyone please clear me on this on Windows Docker Production?


Solution

  • First you have to realize what all that buzzwords means.

    When using docker swarm mode, we're takling about

    • using overlay networks
    • using services

    then scaling, service discovery and load balancing are included and handled by docker swarm.

    On a single docker machine, we're talking about

    • using bridge networks
    • using run command

    Whether I need to setup external load balancer or proxy?

    In the end you only need a external load balancer for all your instances. Remember, every node (doesn't matter if it's a manager or worker) can be used as entry point where you can reach every service.
    But that requires a reverse proxy (doesn't matter if it's apache, nginx, haproxy ...take what you're familar with) is configured and reployed in global mode.