Open
Description
I understand that there is a section in the documentation about Eureka Peer Awareness, but somehow I do not find this enough.
I find it hard to understand how this would make Eureka more HA. There would be a chain server1, server2, server3 and they are cross referenced, but if one node fails the chain breaks anyway.
Would it be a good option to just specify a list containing all 3 servers separated by comma for each all of them (server1, server2, server3)?
What is your experience?
PS: did not try DNS yet
Activity
aivans commentedon Feb 11, 2015
Here are my fist findings:
and keep trying to contact server1
Remarks:
Questions and concerns:
Seems like they took care of this when enabling DNS for serviceURLs:
// Rearrange the fail over server list to distribute the load
arrangeListBasedonHostname(serviceUrls);
This leads to another concern.
Remarks:
aivans commentedon Feb 13, 2015
Hi again,
I am pleased to announce that the behaviour from the previous post happens because all my Eureka nodes were configured with localhost as host name.
Changing to peer1 and peer2 as in the documentation allows for the creation of a mirrored style cluster.
radenui commentedon Mar 2, 2015
Hello,
I have a similar problem here.
I'm using AWS, and I'd like to leverage the HA provided by Netflix using DNS and the region settings (https://github.com/Netflix/eureka/wiki/Configuring-Eureka-in-AWS-Cloud#configuring-eips-using-dns).
I'm not really interested in EIP or Auto-scaling groups here, just the DNS part.
As my Eureka clients will be in different Availability zones, I will need them to contact the Eureka server in their own availability zone (as a priority, with fallback on other zones in case of a problem).
And I still will need my Eureka servers to connect each other (across multiple AZs) and share their configuration.
It seems like I cannot use the same properties defined in Netflix wiki (they are not interpreted by the client).
And the way the authentication works (in the URL !!) seems a little restrictive in this case.
Do you have any suggestion ?
Thanks a lot,
Arthur
aivans commentedon Mar 2, 2015
The settings above definitely do the trick for me.
aivans commentedon Mar 2, 2015
I did not test multiple zones though.
Please come back and share your results for your multiple zones setup.
radenui commentedon Mar 3, 2015
Thank you for your answers!
I started using these properties:
On the DNS side, I have:
Into my Eureka servers (wanted them to descover their peers with DNS) and it seems like the DNS discovery does not allow to define peers at all: I had a very strange and inconsistent behavior using the same client params. Any idea why ?
But this seem to work pretty well with the eureka clients:
For the availability zones, not sure what is happening: I have this error sometimes (and have no idea why):
And
I will try to increase the log level to see what's happening here, and will keep you in touch.
Thanks a lot,
Arthur
aivans commentedon Mar 3, 2015
Never tested multiple zones.
In one single zone (defaultZone) I could configure multiple servers and they saw eachother as replicas.
How are your clients configured?
radenui commentedon Mar 3, 2015
I tried the same "client" configuration for both eureka clients and servers (see previous message).
It only works on the clients.
On the Eureka servers, they are not able to use the DNS information to define peers: I had to use "defaultZone" as well.
aivans commentedon Mar 3, 2015
i would start with the default region(don't try to set it yet) and default zone and see if the dns config is ok.
It is ok when in the Eureka web UI you will see servers as available replicas when they are all started.
Afterwards, I would try a different zone for one server.
My dns config:
txt.us-east-1 IN TXT "defaultZone.eureka.local"
txt.defaultZone IN TXT "user:password@peer1" "user:password@peer2"
aivans commentedon Mar 3, 2015
My hunch is that for the client you should specify one single zone, after all the client runs in a single zone, isn't it?
aivans commentedon Mar 3, 2015
Actually, i think your issue is that you specify availabilityZones. you should leave that to the dns.
radenui commentedon Mar 3, 2015
Ok, I can try that.
But as I cannot set the datacenter as "Amazon", how does the eureka client know its zone ?
aivans commentedon Mar 3, 2015
datacenter=cloud?
radenui commentedon Mar 3, 2015
I like that!
what is the full name for this property? just "datacenter" ?
aivans commentedon Mar 3, 2015
Arthur, maybe you need to read the docs a bit, and the source code.
25 remaining items