istio icon indicating copy to clipboard operation
istio copied to clipboard

Why slow start config not fully supported?

Open masquee opened this issue 3 years ago • 4 comments

(This is used to request new product features, please visit https://discuss.istio.io for questions on using Istio)

Describe the feature request

Envoy slow start mode has follow config

{
  "slow_start_window": {...},
  "aggression": {...},
  "min_weight_percent": {...}
}

But DestinationRule only supports warmupDurationSecs which correspoding to slow_start_window config in envoy. How can i config aggression and min_weight_percent?

Describe alternatives you've considered

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

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

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

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

Additional context

masquee avatar Sep 18 '22 13:09 masquee

These fields are not currently settable via Istio APIs

howardjohn avatar Sep 18 '22 16:09 howardjohn

agression default value of 1.0 was sufficient for most use cases. The parameter was added recently. Do you have a use case to configure them ? If yes, may be you should use envoy filter for now to set those values.

ramaraochavali avatar Sep 19 '22 10:09 ramaraochavali

@ramaraochavali We don't need to configure agression yet, but we may need a smaller value for min_weight_percent (default 10%).

EnvoyFilter works, but we want to avoid maintaining a large number of EnvoyFilters in production.

masquee avatar Sep 21 '22 02:09 masquee

Are you seeing the nodes in slow start mode not receiving any traffic?

EnvoyFilter works, but we want to avoid maintaining a large number of EnvoyFilters in production.

Feel free to propose an API

ramaraochavali avatar Sep 21 '22 10:09 ramaraochavali

🚧 This issue or pull request has been closed due to not having had activity from an Istio team member since 2022-09-21. If you feel this issue or pull request deserves attention, please reopen the issue. Please see this wiki page for more information. Thank you for your contributions.

Created by the issue and PR lifecycle manager.

istio-policy-bot avatar Apr 05 '23 05:04 istio-policy-bot

It may be unsuitable to comment on a closed issue. But it is an interesting topic and it is still worth to be discussed. We have micro-service architecture based on Java stack. As you may already knew that, Java application needs JVM warmup to speed up its performance. We also have business requirement on the initial request latency and CPU usage when Pod starting up, for those Java application. The default min_weight_percent of envoy slow start mode, which is 10% cannot meet the requirement, either the aggression parameter. After fine tuning by adding an Envoy Filter, we achieve it, by tuning the min_weight_percent to 0.1% and a non-default value of aggression. If those configurations can be fully configurable in DestinationRule, it will be beneficial to the case I mentioned above. Here I want to propose an API for DestinationRule.

Field Type Description Required
warmupDurationSecs Duration Represents the warmup duration of Service. If set, the newly created endpoint of service remains in warmup mode starting from its creation time for the duration of this window and Istio progressively increases amount of traffic for that endpoint instead of sending proportional amount of traffic. This should be enabled for services that require warm up time to serve full production load with reasonable latency. Please note that this is most effective when few new endpoints come up like scale event in Kubernetes. When all the endpoints are relatively new like new deployment, this is not very effective as all endpoints end up getting same amount of requests. Currently this is only supported for ROUND_ROBIN and LEAST_REQUEST load balancers. No
warmupAggression Double WarmupAggression controls the speed of traffic increase over the warm up duration. If not present, it is defaults to 1.0, so that endpoint would get linearly increasing amount of traffic. When increasing the value for this parameter, the speed of traffic ramp-up increases non-linearly. The value of aggression parameter should be greater than 0.0. By tuning the parameter, is possible to achieve polynomial or exponential shape of ramp-up curve. No
warmupInitialLoadPercent Double warmupInitialLoadPercent specifies the initial percent of origin load, if not present, it is default to 10%. No

KasperDeng avatar Jun 26 '23 06:06 KasperDeng

EnvoyFilter works, but we want to avoid maintaining a large number of EnvoyFilters in production.

@masquee can you share your EnvoyFilter ? I tried to create one, it works with slow_start_window but a soon as I want to add other parameters (ie: aggression and min_weight_percent) the filter is not applied due unmarshmalling issue. I have double check the proto I'm wondering what I had missing.

frgaudet avatar Mar 05 '24 10:03 frgaudet

Okay I managed to have a working config, here is it :

apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
  name: slow-start-ef
spec:
  configPatches:
    - applyTo: CLUSTER
      match:
        cluster:
          name: "outbound|8080||other-application.namespace.svc.cluster.local"
      patch:
        operation: MERGE
        value:
          name: "outbound|8080||other-application.namespace.svc.cluster.local"
          lbPolicy: LEAST_REQUEST
          leastRequestLbConfig:
            slowStartConfig:
              min_weight_percent: { value: 99 }
              slow_start_window: "12s"
              aggression: { default_value: 2, runtime_key: "(" }
  workloadSelector:
    labels:
      app: my-application

frgaudet avatar Mar 05 '24 16:03 frgaudet