-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
extensions: add http bandwidth limit filter #16358
Conversation
* Add bandwidthlimit filter skeleton * fix build * Add core logic * fix build * minor fix * Add bandwidthlimit filter skeleton * fix build * Add core logic * fix build * minor fix * minor * add generated configs * final build fixes * config and test related changes Signed-off-by: Nitin <nigoyal@microsoft.com> * fix spellings Signed-off-by: Nitin <nigoyal@microsoft.com> * update generated config Signed-off-by: Nitin <nigoyal@microsoft.com> * move configs to v3alpha * bandwidth limit filter config Signed-off-by: Nitin <nigoyal@microsoft.com> Signed-off-by: Nitin Goyal <nrk.goyal@gmail.com> * Address comments: remove enforce threshold Signed-off-by: Nitin <nigoyal@microsoft.com> Signed-off-by: Nitin Goyal <nrk.goyal@gmail.com> * move proto to alpha Signed-off-by: Nitin <nigoyal@microsoft.com> Signed-off-by: Nitin Goyal <nrk.goyal@gmail.com> * bandwidth limit filter config Signed-off-by: Nitin <nigoyal@microsoft.com> * Address comments: remove enforce threshold Signed-off-by: Nitin <nigoyal@microsoft.com> * change limit field to optional Signed-off-by: Nitin <nigoyal@microsoft.com> Signed-off-by: Nitin Goyal <nrk.goyal@gmail.com> * delete v3 file Signed-off-by: Nitin <nigoyal@microsoft.com> * generated configs Signed-off-by: Nitin <nigoyal@microsoft.com> * add spelling Signed-off-by: Nitin <nigoyal@microsoft.com> * Add v4alpha proto Signed-off-by: Nitin <nigoyal@microsoft.com> * add generated v4alpha configs Signed-off-by: Nitin <nigoyal@microsoft.com> * fix test and build Signed-off-by: Nitin <nigoyal@microsoft.com> * fix config tests Signed-off-by: Nitin <nigoyal@microsoft.com> * Add tests Signed-off-by: Nitin <nigoyal@microsoft.com> * fix tests Signed-off-by: Nitin <nigoyal@microsoft.com> * fix format Signed-off-by: Nitin <nigoyal@microsoft.com> * Add bi-directional test Signed-off-by: Nitin <nigoyal@microsoft.com> * proto format Signed-off-by: Nitin <nigoyal@microsoft.com> * remove soft limit config Signed-off-by: Nitin <nigoyal@microsoft.com> * extension: add http bandwidth limit filter (#3) Add bandwidth limit filter core functionality and UTs. The filter smoothens the flow of data in both direction up to the specified bandwidth limit. Signed-off-by: Nitin <nigoyal@microsoft.com> Signed-off-by: Nitin Goyal <nrk.goyal@gmail.com> * make token bucket conditionally thread-safe and add comment for stream rate limiter Signed-off-by: Nitin <nigoyal@microsoft.com> * fix reset Signed-off-by: Nitin <nigoyal@microsoft.com> * remove some absl guards Signed-off-by: Nitin <nigoyal@microsoft.com> * update filter Signed-off-by: Nitin Goyal <nigoyal@microsoft.com> * update proto Signed-off-by: Nitin Goyal <nigoyal@microsoft.com> * add docs Signed-off-by: Nitin Goyal <nigoyal@microsoft.com> * proto and doc fixes Signed-off-by: Nitin Goyal <nigoyal@microsoft.com> * test fix Signed-off-by: Nitin Goyal <nigoyal@microsoft.com>
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
Signed-off-by: Nitin Goyal <nigoyal@microsoft.com>
Any idea about the format_pre and docs check failure? The |
Actually found this warning with docs build command: |
Not an expert, but I think the idea is that the entire doc will be a tree (not a forest), and so everything can be reached from the main docs page. |
Signed-off-by: Nitin Goyal <nigoyal@microsoft.com>
I see. It didn't get picked up because http.rst only looks in the v3 folder but not v3alpha folder. Changed that one but not sure if it's acceptable. Please review. |
@adisuissa The docs error got fixed. Any insight into the format_pre failure or how to reproduce it locally? |
According to the pipelines errors:
To reproduce locally, you cant try running: |
Signed-off-by: Nitin Goyal <nigoyal@microsoft.com>
Signed-off-by: Nitin Goyal <nigoyal@microsoft.com>
api/envoy/extensions/filters/http/bandwidth_limit/v3alpha/bandwidth_limit.proto
Outdated
Show resolved
Hide resolved
docs/root/configuration/http/http_filters/bandwidth_limit_filter.rst
Outdated
Show resolved
Hide resolved
Signed-off-by: Nitin Goyal <nigoyal@microsoft.com>
Signed-off-by: Nitin Goyal <nigoyal@microsoft.com>
Signed-off-by: Nitin Goyal <nigoyal@microsoft.com>
Signed-off-by: Nitin Goyal <nigoyal@microsoft.com>
Signed-off-by: Nitin Goyal <nigoyal@microsoft.com>
Signed-off-by: Nitin Goyal <nigoyal@microsoft.com>
Signed-off-by: Nitin Goyal <nigoyal@microsoft.com>
/retest |
Retrying Azure Pipelines: |
Signed-off-by: Nitin Goyal <nigoyal@microsoft.com>
/retest |
Retrying Azure Pipelines: |
Signed-off-by: Nitin Goyal <nigoyal@microsoft.com>
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 from docs pov - thanks @nitgoy
api/envoy/extensions/filters/http/bandwidth_limit/v3alpha/bandwidth_limit.proto
Outdated
Show resolved
Hide resolved
docs/root/configuration/http/http_filters/bandwidth_limit_filter.rst
Outdated
Show resolved
Hide resolved
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.
apologies for last minute nits @nitgoy - i would really appreciate if you could fix the literal - it looks wrong with italics
see here:
docs/root/configuration/http/http_filters/bandwidth_limit_filter.rst
Outdated
Show resolved
Hide resolved
Signed-off-by: Nitin Goyal <nigoyal@microsoft.com>
Signed-off-by: Nitin Goyal <nigoyal@microsoft.com>
/retest |
Retrying Azure Pipelines: |
api/envoy/extensions/filters/http/bandwidth_limit/v3alpha/bandwidth_limit.proto
Outdated
Show resolved
Hide resolved
source/extensions/filters/http/bandwidth_limit/bandwidth_limit.cc
Outdated
Show resolved
Hide resolved
Signed-off-by: Nitin Goyal <nigoyal@microsoft.com>
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 for docs, thanks for cleanups @nitgoy
Signed-off-by: Nitin Goyal <nigoyal@microsoft.com>
the filter smoothens the flow of data in both direction up to the specified bandwidth limit. Risk Level: Low, new filter Testing: UTs added. Adding more UTs and integration tests. Docs Changes: Added Release Notes: Added Fixes envoyproxy#13604 Signed-off-by: Nitin Goyal <nigoyal@microsoft.com>
Commit Message: adds bandwidth limit filter core functionality and UTs
Additional Description: the filter smoothens the flow of data in both direction up to the specified bandwidth limit.
Risk Level: Low, new filter
Testing: UTs added. Adding more UTs and integration tests.
Docs Changes: Added
Release Notes: Added
Fixes #13604