Docker Swarm network


I’ve deploy a stack (eg stack_01) that expose a port (eg 6000). The protocol supported by the exposed application port is not HTTP. The deployed stack works correctly and each client can connect to it (e.g

Now i would like to deploy another instance (eg stack_02) of the same Stack into my swarm. I would like to use the same port (e.g. 6000). I know that i cannot expose the same port 2 time in the ingress network.

What I would like to obtain is the following scenario:

  • -> stack_01:6000
  • -> stack_02:6000

I’ve the same scenario in place for HTTP services, I’m using Traefik reverse proxy.

The problem is that Traefik supports only HTTP/HTTPS protocols (REF:

Doing some search I found a user that use haproxy to make it work, but he complains about the management of processes.
Other issue is that if you want to add other stacks you have to configure it manually (I like the autodiscovery function used by traefik).

Do you have any suggestions? How would you solve this type of problem?


Hi :slight_smile:

You can check out:
It uses HAProxy and has service discovery