How/Can Docker-Swarm load-balancer/ network switch request/traffic internally between similar service tasks

Hi fouscou,
No, those services are three separate services es1, es2 & es3 and actually are forming an ES cluster in my two node Docker-swarm (manager & worker) cluster.

My question was that is it possible in Docker-Swarm to switch request coming from my java-app to say es1 and if es1 service is removed, would request then be sent to either es2 or es3. (From your reply i think it’s not possible to sent request to es2 or es3 as originally request was for es1. Correct me if i’m wrong).

Secondly, is there a way to make my java-app read available three services es1, es2 & es3(internally within docker-swarm) & select first available among three services using Docker only and not any external load-balancer like haproxy.

Thanks & Regards,
devopssysadmin