This message was deleted.
# general
s
This message was deleted.
z
It is possible to discover the router url from the controller though it's not the normally traversed path. There is a cluster discovery endpoint on the controller which should return the d2 url of the router. Though I 'think' from our last conversation you were trying to use this?
a
Can I get a controller url from the router? This will work too (I'll just have to pass the router in the config).
There is a cluster discovery endpoint on the controller which should return the d2 url of the router
Are you suggesting to use something like
Copy code
D2ServiceDiscoveryResponse sysStoreDiscoveryResponse = (D2ServiceDiscoveryResponse) controllerRequestWithRetry(
                () -> ControllerClient.discoverCluster(discoveryUrl.get(), storeName, sslFactory, 1),
                2);
to get config parameters of D2 and fallback to D2? Somehow I got impression that D2 was a 'legacy' way of accessing/configuring things.
z
Can I get a controller url from the router? This will work too (I'll just have to pass the router in the config).
I do not believe so.
Somehow I got impression that D2 was a 'legacy' way of accessing/configuring things.
It's kind of in an interesting state. D2 is used very aggressively in LinkedIn and is at this time a de facto service discovery standard within the company... But... it's popularity pretty much ends there 😅 . So I'd say it's not ideal for most open source adopters. What we can probably do is make it so that instead of just strictly returning a clustername/d2 url pair, we can probably make it configurable to some connect string (dns, or host string, etc.)
My cursory glance through of the code actually implies that perpahs this could work as a host string today? At least as far as the router is concerned this is just a config that maps cluster to connection string.
a
I ended up passing an extra parameter in the config.
🆗 1