YoungLearnsToCoding
YoungLearnsToCoding

Reputation: 427

Will spring eureka client send heartbeat to all discovery servers?

Setup: 2 eureka servers replicate. and 1 eureka client set the default zone in application.yml as localhost:8761, localhost:8762.

Question: 1.Will eureka client send heartbeat to both 8761 and 8762?

Thanks, Young

Upvotes: 1

Views: 1144

Answers (1)

Sachin
Sachin

Reputation: 541

No, it will not send the heart beat to both 8761 and 8762. How it works is- We provide the list of Eureka servers. All the clients will pick first server from the list (in your case 8761) and start sending the heartbeat. All the clients will switch to other server only in case first Eureka server dies.

Second server will always get a copy of registry from first server.

Upvotes: 2

Related Questions