Add support for drop category policy and reporting#3894
Add support for drop category policy and reporting#3894zuercher merged 1 commit intoenvoyproxy:masterfrom
Conversation
5a5bc32 to
d449441
Compare
zuercher
left a comment
There was a problem hiding this comment.
Thanks for taking this on. I have a few questions and found a couple typos, but I think it's headed in the right direction.
api/envoy/api/v2/eds.proto
Outdated
There was a problem hiding this comment.
I gather this was never implemented, but do we need to keep this in place (but marked deprecated) until 1.8.0 on the off chance that someone is setting it?
There was a problem hiding this comment.
I think it's reasonable to skip it. If someone is setting a hidden/unimplemented field, I don't think we need to be applying the policy. Maybe we should clarify it to make this explicit if it isn't already.
api/envoy/api/v2/eds.proto
Outdated
There was a problem hiding this comment.
typo: rom; also drop the first or
There was a problem hiding this comment.
typo: request should be requests
There was a problem hiding this comment.
typo: request should be requests
api/envoy/api/v2/eds.proto
Outdated
There was a problem hiding this comment.
I'm not sure about this validation. If there are other, unrelated policy settings in the future we won't want to require this one.
There was a problem hiding this comment.
Removed validation.
api/envoy/api/v2/eds.proto
Outdated
There was a problem hiding this comment.
Should this have a validation rule to prevent it from being an empty string?
htuch
left a comment
There was a problem hiding this comment.
Yep, thanks for making this happen.
DEPRECATED.md
Outdated
There was a problem hiding this comment.
I would just drop this, it's a hidden field.
api/envoy/api/v2/eds.proto
Outdated
There was a problem hiding this comment.
Identifier for the policy specifying the drop.`
api/envoy/api/v2/eds.proto
Outdated
There was a problem hiding this comment.
Please use envoy.type.Percent here.
api/envoy/api/v2/eds.proto
Outdated
There was a problem hiding this comment.
Can you provide the full explanation in the comments here for how drop policy is applied, including the worked example from your doc? These comments get rendered into docs.
443b195 to
9cc3f3b
Compare
htuch
left a comment
There was a problem hiding this comment.
LGTM modulo remaining comments.
api/envoy/api/v2/eds.proto
Outdated
There was a problem hiding this comment.
Nit: Please use JSON or YAML examples, even for pseudo-code. There is no XML in the Envoy code base :)
There was a problem hiding this comment.
I think this can also be deprecated, since it can be inferred from dropped_requests now. Better to be concise in APIs.
There was a problem hiding this comment.
Yes, I did not want to do this as it is implemented.
I am open to doing those changes in subsequent PRs
|
Also, looks like build is broken @vishalpowar |
b5e8b34 to
4ddabc1
Compare
This PR contains changes to implement feature requested in issue envoyproxy#3823 - Adding DropOverload in eds policy which can be used to specify drop_percentage per category. - Adding DroppedRequests in load_report which can report deliberately dropped requests for each category. Signed-off-by: vishalpowar <vishal.powar@gmail.com>
4ddabc1 to
6839b73
Compare
| string category = 1 [(validate.rules).string.min_bytes = 1]; | ||
|
|
||
| // Percentage of traffic that should be dropped for the category. | ||
| envoy.type.Percent drop_percentage = 2; |
There was a problem hiding this comment.
@vishalpowar I'm a little late here, but I would recommend using FractionalPercent here. It will be higher performance in the data path. cc @zuercher @htuch
There was a problem hiding this comment.
I can do that in another PR (this one is already merged) unless there is any restriction on making such changes in two different PRs.
There was a problem hiding this comment.
@vishalpowar I would just do a follow up PR, it's fine to change it now since it just merged and no one is using it, unless there are objections from others, but we can discuss that in the follow up.
There was a problem hiding this comment.
Yeah, sure, FractionalPercent makes sense here.
This PR contains changes to implement feature requested in issue #3823
drop_percentage per category.
dropped requests for each category.
For an explanation of how to fill out the fields, please see the relevant section
in PULL_REQUESTS.md
Description:
Risk Level:
Testing: None
Docs Changes: None
Release Notes:
Fixes #3823