Skip to content
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

Why slow start config not fully supported? #41039

Closed
masquee opened this issue Sep 18, 2022 · 8 comments
Closed

Why slow start config not fully supported? #41039

masquee opened this issue Sep 18, 2022 · 8 comments
Labels
area/networking area/user experience kind/enhancement lifecycle/automatically-closed Indicates a PR or issue that has been closed automatically. lifecycle/stale Indicates a PR or issue hasn't been manipulated by an Istio team member for a while

Comments

@masquee
Copy link
Contributor

masquee commented Sep 18, 2022

(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

@howardjohn
Copy link
Member

These fields are not currently settable via Istio APIs

@ramaraochavali
Copy link
Contributor

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.

@masquee
Copy link
Contributor Author

masquee commented Sep 21, 2022

@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.

@ramaraochavali
Copy link
Contributor

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

@istio-policy-bot istio-policy-bot added the lifecycle/stale Indicates a PR or issue hasn't been manipulated by an Istio team member for a while label Mar 21, 2023
@istio-policy-bot
Copy link

🚧 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 istio-policy-bot added the lifecycle/automatically-closed Indicates a PR or issue that has been closed automatically. label Apr 5, 2023
@KasperDeng
Copy link

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

@frgaudet
Copy link
Contributor

frgaudet commented Mar 5, 2024

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
Copy link
Contributor

frgaudet commented Mar 5, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/networking area/user experience kind/enhancement lifecycle/automatically-closed Indicates a PR or issue that has been closed automatically. lifecycle/stale Indicates a PR or issue hasn't been manipulated by an Istio team member for a while
Projects
None yet
Development

No branches or pull requests

6 participants