Skip to content

Add ZoneAwareLB settings for MeshConfig and DestinationRule#3733

Open
sschepens wants to merge 1 commit into
istio:masterfrom
sschepens:zone-aware-routing
Open

Add ZoneAwareLB settings for MeshConfig and DestinationRule#3733
sschepens wants to merge 1 commit into
istio:masterfrom
sschepens:zone-aware-routing

Conversation

@sschepens

Copy link
Copy Markdown
Contributor

This is needed to implement Zone Aware Routing support in Istio.

I'm adding a zone_aware_lb_setting in DestinationRule to allow configuring enabling Zone Aware LB,it's mutually exclusive with locality_lb_setting and it's settings are very similar, with the following differences:

  • distribute is not actually needed here because Envoy distributes traffic automatically
  • failoverPriority cannot specify region, zone or subZone topology labels because we always partition by region and zone and subZone don't make sense with Zone Aware because envoy automatically shifts traffic between zones.

I'm also adding a mesh-wide zone_aware_lb_setting to enable zone aware routing globally. For practical reasons, there is no way to simply reject this setting being enabled together with locality_lb_setting because locality_lb_setting is actually enabled by default and validation occurs with the defaults merged.

Issue: istio/istio#35102 (comment)
RFC: https://docs.google.com/document/d/1nPVSTIy_s0s9cRBS7DNwHZkDXhHO1qW4x9F9W7y_gyo/edit?tab=t.0#heading=h.xw1gqgyqs5b

@sschepens sschepens requested a review from a team as a code owner July 2, 2026 18:28
@istio-policy-bot

Copy link
Copy Markdown

😊 Welcome @sschepens! This is either your first contribution to the Istio api repo, or it's been
a while since you've been here.

You can learn more about the Istio working groups, Code of Conduct, and contribution guidelines
by referring to Contributing to Istio.

Thanks for contributing!

Courtesy of your friendly welcome wagon.

@istio-testing istio-testing added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 2, 2026
@sschepens

Copy link
Copy Markdown
Contributor Author

@ramaraochavali @keithmattix @howardjohn could you take a look at this please?

@sschepens sschepens force-pushed the zone-aware-routing branch from d14020f to 97dd888 Compare July 8, 2026 14:23
@istio-testing

Copy link
Copy Markdown
Collaborator

@sschepens: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
release-notes_api 97dd888 link false /test release-notes
Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@ramaraochavali ramaraochavali left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some comments. @hzxuzhonghu can you PTAL as well?

//
// - The downstream proxy is configured with `ISTIO_META_ENABLE_SELF_DISCOVERY=true`
// (set via `proxyMetadata`).
// - The upstream cluster has at least `minClusterSize` hosts (default 6). Below

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the significance of minClusterSize and the default value 6? Does it mean if a service has two pods per AZ - we can not use zone aware load balancing?

// this threshold zone-aware load balancing is disabled entirely, regardless of other
// settings.
// - The upstream cluster spans more than one zone.
// - There is at least one healthy endpoint in the local zone.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So if all endpoints in the local zone are unhealthy would the traffic spill over to other zones as per the zone aware load balancing calculations or is it completely disabled? Which load balancing is used if it is disabled?

// apply. This is useful when failing over traffic across regions would not
// improve service health or may need to be restricted for other reasons
// like regulatory controls.
message Failover {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we call this FailoverRegion or call from and to as from_region and to_region to be explicit?

// Minimum number of hosts in the upstream cluster required for zone-aware
// load balancing to be enabled. If the total number of upstream hosts falls below
// this value, zone-aware load balancing is disabled for this cluster regardless of
// other settings. This guards against zone-skew issues that can occur with

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is confusing. Is it total number of hosts in upstream cluster or is it per zone? How is zone-skew identified based on upstream cluster hosts count?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants