-
Notifications
You must be signed in to change notification settings - Fork 679
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
Zone aware routing #2859
Comments
I think this would be super interesting @dsvetl! The tricky part is finding out what you describe as a "zone". I know there are labels that get applied to nodes. So a quick thought would be to parse which endpoint is running on which node, then filter that information back into Envoy so it can make decisions on where to route to next. We'd need to probably come up with a design doc to outline how this might work, how it might integrate into Contour, as well as how users would configure. |
@dsvetl This is a pretty open ended project, and we are not likely to tackle is in the immediate future. If you have a proposal for how zones should be defined and handled in Contour+Envoy, we can help you design and implement that. |
I think we can take a simple K8s approach first:
That really looks pretty simple and enough to cover most use cases, and make envoy at least aware about zones where it running. We ignore complex things like Region/Zone and other complex stuff just some label to group by endpoints and envoy hosts. After that, we can add the ability to change min host count in the zone, because not all applications are really must run 6 instances per zone (for an example most of our are 10-20 pods total in RS) Both that things for tests, can be implemented by configmap keys for contour controller, like: Another approach is to use priority to do the same stuff, but require to generate per envoy xDS config, because Contour must know in which zone envoy are works, who asks config to reorder priority stuff based on zone locality... that's more tricky part (and afaik that how It works in istio) |
Sorry to take a long time to respond here, I've been hoping to spend some time to take a look at some of the newer changes upstream (like NetworkTopology and similar things), before responding, but I have not had bandwidth yet. I think the rough approach outlined by @nefelim4ag sound reasonable at first glance, but this one will definitely need a design document that runs through:
|
Some time has already passed, and we now have some ready instruments to deal with it:
I already spend some time writing in-house side-car zone routing with Envoy (based on Priority). I see the following design (I can make a PR on request): Design proposalStatus: Draft
AbstractZone-aware routing is a GA feature of Kubernetes which is good to support. BackgroundThis feature was requested in #2859. Goals
Non Goals
High-Level Design
Detailed Design
<TODO: How to inform envoy about such data>
<TODO: Choice solution Priority or LocalityWeightedLbConfig > In the case of LocalityWeightedLbConfig:
In case of Priority:
Alternatives ConsideredMake envoy zone aware. Security ConsiderationsN/A CompatibilityKubernetes 1.21+ Implementation |
Hi, projectcontour,
You need to add the ability to contour to use this functionality in envoy
https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/zone_aware#arch-overview-load-balancing-zone-aware-routing
I wish we can parse pod region/zone to provide this info into xDS API.
The text was updated successfully, but these errors were encountered: