-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Method isThisMyUrl returns false in setup configured with DNS, is there a workaround? #1087
Comments
Any news here? |
In our custom build we ended up with following solution. |
Thanks @mgtriffid for the proposed solution, that would work. In effect what's required is for eureka servers to have an identity that it can match on. When using hostnames directly, this works, but not when servers are fronted by an ELB. The custom changes by @mgtriffid may be something that can be generalised into something that can work with both hostnames and custom UUIDs, and we would welcome such a PR for this project. |
Submitted a PR, @qiangdavidliu . With this PR Eureka still first tries to perform regular check, and only if it fails, we try to fetch peer id. Also, I've added check only for replications and not for initial resolving peers, because in common scenario (when several instances are starting at the same time) we can't contact peers, as they are not open for traffic yet. Also wanted to perform calls to peers through common mechanism of |
Hi @mgtriffid In my mind I think when a But I found it not skip itself : ( |
@holy12345 , PR #1107 is merged and included in 1.9.4, please see if new config parameter fits your needs. |
In our setup Eureka replication is configured following this guide. DNS records are resolved into AWS ELBs. And looks like this method returns
false
for ELB which actually belongs to stack where this instance is running. Because of that, heartbeats which were sent by clients to particular Eureka instance are replicated to this instance again. And because of that self-preservation can't trigger properly: there are more heartbeats than expected.Has anybody face this issue? As possible workaround, maybe there is a way to configure instanceInfo.hostName somehow to make it match ELB?
Thanks in advance for advice!
The text was updated successfully, but these errors were encountered: