Eureka support for ensemble discovery? (Query)
Closed this issue · 4 comments
I am working on bringing up the various components/demos, and have found that one of the sticking points is regarding how to configure an application, like Flux Capacitor, to use as few hard-coded addresses as possible in their configurations.
One such area is informing the zookeeper support in Archaius on where to find the ZK ensemble, and Eureka seems like it would be well positioned for this.
To be clear, I'm not suggesting that Exhibitor use Eureka to do any kind of self discovery... simply tie registrations to the ready state of each node, such that an external application, looking for a ZK ensemble, can use Eureka to discovery a topographically close ZK node (IE: same zone) to connect with.
I just wanted to use this issue as a sounding board for feedback on the approach before charging ahead, as I'd like to see it take the form of something everyone agrees may be of use to everyone.
P.S.: I could have sworn there was a ticket discussing integration approaches between these two components on one of these projects, but can not for the life of me find it now, so I apologize in advance if I have created a duplicate here.
Internally at Netflix, there's a version of Exhibitor that interacts with Eureka. Maybe whomever is maintaining it at Netflix can open source it.
@jhohertz It should be fairly straight forward to integrate eureka-client into exhibitor. The necessary integration points would be:
- add dependency to com.netflix.eureka:eureka-client:{version}
- add appropriate configs to resources/eureka-client.properties (see https://github.com/Netflix/eureka/wiki/Configuring-Eureka)
- Initialize EurekaManager in exhibitor main:
DiscoveryManager.getInstance().initComponent(
new MyDataCenterInstanceConfig(),
new DefaultEurekaClientConfig()
);
- Get DiscoveryClient
DiscoveryClient client = DiscoveryManager.getInstance().getDiscoveryClient();
As an update to this, Discovery Client is now also available via a guice module (EurekaModule). install(new EurekaModule()) and then EurekaClient can be @Inject-ed when needed.
Looks like this issue has been resolved.
Closing for now. You can re-open if that is not the case.