#59095·istio

Add Peak Exponentially Moving Average load balancer (Peak EWMA)

Author: frittenthekeCreated Feb 16, 2026Updated Sep 17, 2026
Labelskind/enhancementarea/perf and scalabilitylifecycle/stale

Describe the feature request Add first class support for Peak EWMA load balancing to Istio.

Adaptive load balancing algorithms like Peak Exponentially Moving Average (PEWMA) by taking reponse latency into account, can greatly improve the latency without other changes to the applications. More and more load balancer and proxy implementations therefore add support for this.

There was a feature request to Envoy (https://github.com/envoyproxy/envoy/issues/20907) which resulted in PR https://github.com/envoyproxy/envoy/pull/40653 by @rroblak adding support for this algorithm. I then proposed to add this extension to the istio proxy via https://github.com/istio/proxy/pull/6690, which made it into Istio 1.29.

Unfortunately there is no support in Istio to configure the use of peak_ewma yet. But it's possible to configure an EnvoyFilter with a the required http filter and load_balancing_policies section:

---
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
  name: peak-ewma-lb
  namespace: istio-ingress
spec:
  configPatches:
  - applyTo: HTTP_FILTER
    match:
      context: GATEWAY
      listener:
        filterChain:
          filter:
            name: envoy.filters.network.http_connection_manager
            subFilter:
              name: envoy.filters.http.router
    patch:
      operation: INSERT_BEFORE
      value:
        name: envoy.filters.http.peak_ewma
        typed_config:
          '@type': type.googleapis.com/envoy.extensions.filters.http.peak_ewma.v3alpha.PeakEwmaConfig
  - applyTo: CLUSTER
    match:
      context: GATEWAY
    patch:
      operation: MERGE
      value:
        load_balancing_policy:
          policies:
          - typed_extension_config:
              name: envoy.clusters.lb.peak_ewma
              typed_config:
                '@type': type.googleapis.com/envoy.extensions.load_balancing_policies.peak_ewma.v3alpha.PeakEwma
  workloadSelector:
    labels:
      istio: ingressgateway-external

while this works, not all installations will want to run custom EnvoyFilters. And there are some interactions and issues with the existing LB configuration that Istio applies to clusters.

E.g. when using trafficDistribution: PreferClose on a K8s service the configuration becomes invalid, causing Envoy to complain with

cluster: load_balancing_policy cannot be combined with partial fields (zone_aware_lb_config, locality_weighted
_lb_config, consistent_hashing_lb_config) of common_lb_config","caller":"external/envoy/source/extensions/config_subscription/grpc/delta_subscription_state.cc:283","thread":"14"}

(https://github.com/envoyproxy/envoy/blob/1d0ba73ad200d28e86c0c23f76c55320f82a8fba/source/common/upstream/upstream_impl.cc#L1390-L1401)

It seems that the Istio cluster builder still uses the old lb_policy https://github.com/istio/istio/blob/bcdd144cfe5b2627efe004a08f28fd97e0a1b4f6/pilot/pkg/networking/core/cluster_builder.go#L215-L218 which was depecated in favor of load_balancing_policies.

In the past, Envoy used an enum to specify load balancing policies. This enum is still supported for backward compatibility, but deprecated. extendable load balancing policies should be used instead

In essence this feature request then is about moving away from the deprecated lb_config and then to add support for configuring peak_ewma.

Describe alternatives you've considered

Affected product area (please put an X in all that apply)

[ ] Ambient [ ] Docs [ ] Dual Stack [ ] Installation [ ] Networking [X] Performance and Scalability [ ] Extensions and Telemetry [ ] Security [ ] Test and Release [ ] User Experience [ ] Developer Infrastructure

Affected features (please put an X in all that apply)

[ ] Multi Cluster [ ] Virtual Machine [ ] Multi Control Plane

Additional context @abirsigron also proposed the addition of PeakEWMA at the Istio Combined Working Group meeting 11th of Feb 2026.