Skip to content

router: Make direct response body size configurable#13487

Closed
dio wants to merge 3 commits intoenvoyproxy:masterfrom
dio:max-body-size
Closed

router: Make direct response body size configurable#13487
dio wants to merge 3 commits intoenvoyproxy:masterfrom
dio:max-body-size

Conversation

@dio
Copy link
Copy Markdown
Member

@dio dio commented Oct 10, 2020

Commit Message: This patch adds max_body_size_bytes to set the maximum bytes of the direct response body size.
Risk Level: Low, since the default behavior is preserved.
Testing: Updated to test the newly introduced config.
Docs Changes: Updated.
Release Notes: Added.
Fixes #13422

Signed-off-by: Dhi Aurrahman dio@tetrate.io

This patch adds max_body_size_bytes to set the maximum bytes of the
direct response body size.

Signed-off-by: Dhi Aurrahman <dio@tetrate.io>
@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/envoy/.
CC @envoyproxy/api-watchers: FYI only for changes made to api/envoy/.

🐱

Caused by: #13487 was opened by dio.

see: more, trace.

Copy link
Copy Markdown
Member

@zuercher zuercher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor nit.

More of an API question, but I wonder if this should be done as a runtime flag rather than an API field?

Signed-off-by: Dhi Aurrahman <dio@tetrate.io>
@dio
Copy link
Copy Markdown
Member Author

dio commented Oct 12, 2020

I have no strong preference, I can change it to get the value from a specified runtime_key. cc. @envoyproxy/api-shepherds

@mattklein123
Copy link
Copy Markdown
Member

I have no strong preference, I can change it to get the value from a specified runtime_key. cc. @envoyproxy/api-shepherds

I don't have a strong opinion on whether we make this a full config field or a runtime field. Do we think people will use this limit on a per-route basis or just want a global override? @alyssawilk any thoughts?

@alyssawilk
Copy link
Copy Markdown
Contributor

If this is just OOM avoidance, I think a single value is probably good enough.

@dio
Copy link
Copy Markdown
Member Author

dio commented Oct 13, 2020

@alyssawilk the use-case presented in #13422 is to make it larger than the current limit.

@alyssawilk
Copy link
Copy Markdown
Contributor

Fair, same goes for OOM avoidance avoidance :-P Unless someone asks to configure it per-route, I think we can have one value.

@htuch
Copy link
Copy Markdown
Member

htuch commented Oct 13, 2020

One value is fine to start with. I'd vote to make it part of the API as it makes it possible to reason about limits consistently, e.g. when looking at a config like https://www.envoyproxy.io/docs/envoy/latest/configuration/best_practices/edge#best-practices-edge

@mattklein123
Copy link
Copy Markdown
Member

Config sounds good. We could put it at the top level of the route config, or possible on the HCM config and wire it through to the route.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 9, 2020

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions bot added the stale stalebot believes this issue/PR has not been touched recently label Dec 9, 2020
@mattklein123 mattklein123 removed the stale stalebot believes this issue/PR has not been touched recently label Dec 9, 2020
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 8, 2021

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions bot added the stale stalebot believes this issue/PR has not been touched recently label Jan 8, 2021
@github-actions
Copy link
Copy Markdown

This pull request has been automatically closed because it has not had activity in the last 37 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions bot closed this Jan 15, 2021
@petedmarsh
Copy link
Copy Markdown
Contributor

@zuercher I would also like this change to be merged, is there anything I can do to help?

@mattklein123
Copy link
Copy Markdown
Member

@dio can you open a fresh PR and let's get this merged?

@dio
Copy link
Copy Markdown
Member Author

dio commented Jan 19, 2021

Yes, sure. Sorry this was slipped under my radar :(.

htuch pushed a commit that referenced this pull request Feb 2, 2021
This patch adds max_direct_response_body_size_bytes to set the maximum bytes of the direct response body size (in bytes). The config is added as a field in RouteConfiguration.

Reviving #13487 with a slightly different approach (add the config to RouteConfiguration instead of directly per direct response config entry).

Risk Level: Low, since the default behavior is preserved.
Testing: Updated to test the newly introduced config.
Docs Changes: Updated.
Release Notes: Added.
Fixes #13422

Signed-off-by: Dhi Aurrahman <dio@rockybars.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api stale stalebot believes this issue/PR has not been touched recently

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Give the option to increase the maximun size of the HTTP body in responses to be bigger than 4 KB

6 participants