-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Eureka Clustering documentation and best practices #203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Here are my fist findings:
Remarks:
Questions and concerns:
Remarks:
|
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. |
Hello, I have a similar problem here. 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). It seems like I cannot use the same properties defined in Netflix wiki (they are not interpreted by the client). Do you have any suggestion ? Thanks a lot, Arthur |
The settings above definitely do the trick for me. |
I did not test multiple zones though. |
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. Arthur |
Never tested multiple zones. How are your clients configured? |
I tried the same "client" configuration for both eureka clients and servers (see previous message). |
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. My dns config: |
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? |
Actually, i think your issue is that you specify availabilityZones. you should leave that to the dns. |
Ok, I can try that. |
datacenter=cloud? |
I like that! |
Arthur, maybe you need to read the docs a bit, and the source code. |
never tried it myself on Amazon |
Well, I'll be delighted to find some docs... Because when I believe what I see in the source code, I have this! |
+1 adding additional documentation around how to configure this would be helpful |
@ryanjbaxter are you referring to Eureka Clustering in general or Amazon info? |
Is there an exampe (including dns records setup) describing how to setup 4 eureka nodes , whre each of two are in an own zone: zone1 and zone2 beeing in the same region but having zone affinity load balancing for all zuul and feign requests? |
+1 need an example with 3+ nodes. The sample on http://projects.spring.io/spring-cloud/spring-cloud.html#_peer_awareness doesn't look right. I expect each peer to still default to it's own zone while knowing peers from other zones. I'm playing with config like below without success:
|
+1, i find the @cforce comments interesting, would like to see/know how to do that. |
After some trial and error. I got a configuration set which allow a few Eureka servers synchronize and share apps registered under each of them. Sharing below:
|
This seems incomplete to me. Where is the eureka cfg in the same zone |
2
3
4
when not first peer will start, you'll find logs like these:
when peer1 go down, you will see log like this:
as soon it will restore you'll see common instance registeration log message |
I've created a blog post with the details of Eureka here, that fills in some missing detail from Spring doc or Netflix blog. It is the result of several days of debugging and digging through source code. |
@streethawk Fixed. |
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
The text was updated successfully, but these errors were encountered: