-
Notifications
You must be signed in to change notification settings - Fork 347
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
Locality Based Routing Support #1909
Comments
Hey @tanujd11 from a user perspective can you share what you like to happen on the data plane ( from gateway to multiple backend endpoints with different topology info ) |
I understand this is very useful for optimizing East West traffic within a cluster, is that also the case for north South ? |
I think for an Envoy gateway running in us-east-1/us-east-1a should prefer the same zone backend to prevent cross zonal traffic. I think this behaviour could be made as default as cross zone communication is obviously costly. WDYT? |
thanks, here's something more to think about
|
This issue has been automatically marked as stale because it has not had activity in the last 30 days. |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. |
there's a new field in the Service spec (trafficDistribution.preferClose) https://kubernetes.io/docs/concepts/services-networking/service/#traffic-distribution that we could consider using to automate priority amongst endpoints within a Service |
Could be an option when this new field is stable and corresponding K8s version is adopted by massive companies. Before that, IMO it's better to do load balancing accross endpoints in the cluster via Envoy's capability. Currently EG has implemented locality weighted load balancing 1, one locality := &endpointv3.LocalityLbEndpoints{
Locality: &corev3.Locality{
Region: fmt.Sprintf("%s/backend/%d", clusterName, i),
},
LbEndpoints: endpoints,
Priority: 0,
}
// Set locality weight
var weight uint32
if ds.Weight != nil {
weight = *ds.Weight
} else {
weight = 1
} Actually endpoints inside a Through Envoy's capability, priority levels 2 or zone aware routing 3 4 can archive the goal to save cross zone cost. priority levels
zone aware routing
personal preferenceSince step 1 and 2 is required by both, priority levels can work with implemented locality weighed load balancing, but zone aware routing can't. Apparently priority levels are easier to implement. But it requires EDS resources should be arranged in Footnotes
|
thanks for outlining the steps @aoledk ! we currently have #3055 open to get explicit priority per backendRef and program that into the xds cluster resource. In the future, we can use this issue to make sure we track the auto priority work, the field in k8s |
Hi @aoledk, regarding:
Is this option viable? Can our XDS server produce different EDS for different envoy pods that are part of the same Envoy deployment? |
I think it's possible. xDS server can read the locality info of envoy node.
// Identifies a specific Envoy instance. Remote server may have per Envoy configuration.
message Node {
// An opaque node identifier for the Envoy node. This must be set.
string id = 1;
// The cluster that the Envoy node belongs to. This must be set.
string cluster = 2;
google.protobuf.Struct metadata = 3;
Locality locality = 4;
// This is motivated by informing a management server during canary which
// version of Envoy is being tested in a heterogeneous fleet.
string build_version = 5;
} |
Thanks for pointing that out @modatwork. My other concerns wrt. to this approach are:
In general:
Is there a reason to prefer the Priority-based approach? I'm not sure that it's significantly simpler than enabling zone-aware routing. |
is @modatwork the same person as @aoledk :) ?
@guydc we have are dumuxing on gateway/IR, with |
@arkodg I work together with @modatwork |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. |
hey @aoledk , adding this issue to the v1.2 milestone, is this something you can help with ?
|
@arkodg I can help. |
awesome thanks @aoledk ! |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. |
hey @aoledk still planning on working on this one for v1.2 ? |
thanks for the update @aoledk, let us know if you hit any issues while running EG v1.1 |
@arkodg LGTM. |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. |
Description:
Implement locality based routing support by default in EG. Now that we we can have individual endpoints as backend to EG. Can we support region/zone/subzone based routing based on EndpointSlice information, node labels etc.?
The text was updated successfully, but these errors were encountered: