8000 Set priorities when using distribute localityLbSetting (distribute + failover mode?) · Issue #22669 · istio/istio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Set priorities when using distribute localityLbSetting (distribute + failover mode?) #22669
Closed
@rcann

Description

@rcann

Describe the feature request

Hi,

When using the global mesh LocalityLoadBalancerSetting in distribute mode, pilot doesn't set any priority in the generated LocalityLbEndpoints (in https://github.com/istio/istio/blob/master/pilot/pkg/networking/core/v1alpha3/loadbalancer/loadbalancer.go#L80 )

The priorities are only applied when failover is enabled, based on locality.

It would be extremely useful if weighted and prioritised distribution could be applied: this would allow for, for example, cross-AZ traffic to be priority 0, with different weightings per-AZ, but cross-region traffic could be dropped to priority 1, as a failover case. Envoy's docs and APIs say that this is possible, with priorities being checked before weightings.

I think this could be exposed through an additional prioritised setting, e.g.

distribute:
    - from: *
      to:
        "us-west/zone1/*": 49
        "us-west/zone2/*": 49
        "us-east/*: 2
      prioritised: true

where priorities would be determined based on locality, as in the current failover implementation. I don't think there's a need to specify explicit priorities.

or even by allowing both failover and distribute to be specified? I'm not sure of the reasoning behind only allowing one or the other - is there a design doc around that?

Describe alternatives you've considered

I tried using an EnvoyFilter to set priorities for existing LocalityLbEdndpoints but with the JSON merging semantics I was only able to append new endpoints, not modify existing list items.

Additional context

Metadata

Metadata

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0