-
Notifications
You must be signed in to change notification settings - Fork 690
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
Added support for Envoy slow start mode. #4772
Conversation
Signed-off-by: Tero Saarni <[email protected]>
4645127
to
abb1ab5
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #4772 +/- ##
==========================================
+ Coverage 75.98% 76.02% +0.04%
==========================================
Files 140 140
Lines 16787 16849 +62
==========================================
+ Hits 12755 12809 +54
- Misses 3780 3788 +8
Partials 252 252
|
Manual test procedure for this PR is described here https://gist.github.com/tsaarni/a22e3d69bf6c31ff0597e9f78454868a. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tsaarni just a couple nits but overall this looks great and pretty straight-forward, thanks! I think we can include this in the upcoming 1.23 release.
Signed-off-by: Tero Saarni <[email protected]>
Thank you for good comments @skriss!
That would be great! :-) BTW I see there is problem with actions currently but I will re-run/bump this PR to trigger the checks later, unless it sorts out itself automatically. |
Signed-off-by: Tero Saarni <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the updates @tsaarni, LGTM. I'll leave for @sunjayBhatia to take a look if he wants.
Signed-off-by: Tero Saarni <[email protected]>
Signed-off-by: Tero Saarni <[email protected]>
SlowStartWindow: protobuf.Duration(slowStartConfig.Window), | ||
Aggression: &envoy_core_v3.RuntimeDouble{ | ||
DefaultValue: slowStartConfig.Aggression, | ||
RuntimeKey: "contour.slowstart.aggression", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting this is also configurable via RTDS, not sure if we will need to take advantage of that though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, I did not see how to take advantage of it either, but it seems that (almost) all Runtime*
message types have validation rules in .proto
which makes the RuntimeKeys
required. For example in this case RuntimeDouble.runtime_key
has validation rule:
string runtime_key = 2 [(validate.rules).string = {min_len: 1}];
that causes config to be rejected if runtime key is not given:
[2022-10-06 06:03:23.608][1][warning][config] [source/common/config/grpc_subscription_impl.cc:126]
gRPC config for type.googleapis.com/envoy.config.cluster.v3.Cluster rejected:
Proto constraint validation failed
(ClusterValidationError.RoundRobinLbConfig: embedded message failed validation |
caused by RoundRobinLbConfigValidationError.SlowStartConfig: embedded message failed validation |
caused by SlowStartConfigValidationError.Aggression: embedded message failed validation |
caused by RuntimeDoubleValidationError.RuntimeKey: value length must be at least 1 characters)
So I have assumed these are mandatory, even if we would never use them.
Curiously, there are at least some cases where it is not required, like when we configure ratelimit here. In this case the message definition is missing the validation rule. Maybe that is just by mistake, since that is the only runtime_key
that is missing validation in base.proto
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just made a little comment on doc wording 👍🏽
Signed-off-by: Tero Saarni <[email protected]>
Very good clarification, thank you for the review! |
This PR adds support for slow start mode, described here in Envoy documentation. Envoy to gradually increase the amount of traffic targeted to a newly added upstream endpoint. This can be useful for example with JVM based applications, that might otherwise get overwhelmed during JIT warm-up period.
The feature is configured via struct
HTTPProxy.spec.routes.services.slowStart
:Slow start is off by default. To enable it, only
window
is mandatory. Other parameters are optional.Fixes #2296
Fixes #4687
Signed-off-by: Tero Saarni [email protected]