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
Lighthouse: prefer the local cluster first, before routing to other remote clusters #331
Comments
We have a weight which is assigned to zero and unused. The weight can be increased to a higher value for the local cluster and can use weighted RR to select the IP. The plugin currently does not have the awareness of the cluster which it is running. But I think we could get it from one of the Submariner CRD. This will be required to assign a higher weight. |
Aren't DNS requests from within the cluster will not get to the Lighthouse plugin? |
Sure, Daniel. All requests to service.ns.svc.clusterset.local will be forwarded to the Lighthouse DNS. Please sync with @aswinsuryan and @vthapar if you have any questions, but a PR is welcome :) |
@danibachar We get local clusterid from gateway object here https://github.com/submariner-io/lighthouse/blob/master/pkg/gateway/controller.go#L175 and storing it in connection map. We can easily tweak the code here to handle it differently from remote endpoints. |
@danibachar we want to support this feature in our upcoming release (v0.8). Do you have cycles to work on this in the next few weeks? |
@nyechiel Yep! |
@manosnoam FYI |
Today, for the use case where a single ClusterIP service is deployed to multiple clusters for redundancy or scale, the Lighthouse plugin uses a round robin selection, so that traffic will be eventually served by all clusters in the ClusterSet.
Ideally, routing should be optimized for some sort of cost metric (e.g look at complete Service Topology information and prioritize traffic local to zone, region, etc), but until this concept matures in the upstream community I'd like to propose that we default to what we used to do with the original Lighthouse design and always prefer the local cluster first, before routing the traffic to other remote clusters (in a round-robin fashion).
I hope we can achieve this by enhancing the Lighthouse agent, and without modifying the MCS API.
The text was updated successfully, but these errors were encountered: