Best Microservice Communication Method in Docker Swarm with Traefik

Hi everyone,

I’m currently working with a Docker Swarm cluster and TriEthic, and I have a question regarding the best approach for communication between microservices within the cluster.

Specifically, I’m wondering what would be more optimal and why: having the microservices communicate directly with each other, or routing the communication through TriEthic (i.e., each microservice making a call to TriEthic in order to communicate with another service). Additionally, will Karkam’s load balancing perform better with one of these options over the other?

I would appreciate any insights or recommendations on the pros and cons of both approaches, especially in terms of performance, security, scalability, and load balancing.

Thanks in advance for your help!

Interesting question. Traefik also has some mesh products.

Docker Swarm itself should do some load balancing, when you connect to a service in overlay network via its service name. But probably just round-robin.