Spring boot with docker swarm intra service communication

Viewed 150

So far, we are deploying microservices as seperate docker container. and service to service comunications happens via REST APi call.

<continer-name>:<port-no>

Now are moving from docker to docker swarm and we need to invoke using service name. and these sevice names are being formed with underscore, and tat cannot be changed.

So how can i invoke my services usign rest template or feign client in docker swarm scenario. cos if my url has _ it will be considered as an invalid url.

Note: I dont want to use DNS name of the server. it should jsut be container to container call.

0 Answers
Related