By default eureka client should always connect to primary eureka server.
When Primary eureka server is not reachable it fallback to another eureka server as configured.
When primary eureka server comes online the subsequent load from the client shifts to this server only and the backup server should become idle.
Have tried the Eureka failover as per the documentation and here is what I observed.
Eureka client connects to any server listed on the zone.
On fallback scenario, eureka client connects to another eureka server listed in zone.
Once the server comes back online , eureka client still serving from the backup server.
Here are the configuration:
eureka:
client:
register-with-eureka: true
fetch-registry: true
availability-zones:
us-east-1: us-east-1a,us-east-1b
region: us-east-1
prefer-same-zone-eureka: true
service-url:
us-east-1a: http://localhost:9771/eureka/
us-east-1b: http://localhost:9762/eureka/
Now my question is that if we need to build the customized solution to meet our requirements then what all options we have in our application to modify the existing behavior. Any insight on it is appreciated.
-Amardeep
Hi Amardeep,
would you mind sharing how did you configure Eureka Client to multiple region support. Even I am setting up similar setup as you had described above.
Thanks
Harish