Repository navigation
envoy: the body limit is applied before the filters that wait, and a plain route states its largest body with max_request_bytes - #84
Merged
Conversation
…and a plain route states its largest body with max_request_bytes (Part of #83) The Envoy output lists the buffer filter, which holds the limit of each method and route that writes one, right before the first filter the file writes that can hold a request while it waits for an answer: the check of an origin no list holds (`ask_unlisted`), the token filter (`auth.jwt`) and the auth check (`auth.ask`). A request over a limit is answered before any of them is asked about it, and no service receives it. A file that writes none of the three lists the filter where 2.4.0 did, right before the Connect bridge, or before the router without one. A plain route can state the largest request body it takes, in bytes: `routes[].max_request_bytes`, a whole number from 1 to 4294967295. The Envoy output turns on the buffer filter on the route with the limit as written, because a plain route's body carries no gRPC prefix; a larger body is answered 413 before the service reads any of it. The route refuses no other form of request and adds no route before its own. A route that does not write the key has no limit. The nginx and HAProxy outputs refuse the key. An Envoy file that sets `max_request_bytes` on a method and writes `auth.ask`, `auth.jwt` or an environment's `ask_unlisted` renders differently from 2.4.0 and is rendered again after the upgrade (docs/format.md, "After 2.4.0"). Every other file renders byte for byte as 2.4.0 renders it. docs/limits.md states what the limit holds and what it does not. The conformance battery checks each answer on Envoy 1.40.2 in two new scenarios and more rows of the request-limit one. The README and the docs name release 2.5.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #83
The Envoy output applies a request limit before the filters that can hold a request while they wait for an answer, and a plain route can state its largest body.
ask_unlisted), the token filter (auth.jwt) and the auth check (auth.ask) that the file writes. A request over a limit is answered before any of them is asked about it, and no service receives it. A file that writes none of the three lists the filter where 2.4.0 did.routes[].max_request_bytes, a whole number from 1 to 4294967295, is the largest request body a plain route takes, in bytes as the proxy receives it. The Envoy output turns on the buffer filter on the route with the limit as written; a larger body is answered413before the service reads any of it. The route refuses no other form of request and adds no route before its own.max_request_byteson a method and writesauth.ask,auth.jwtor an environment'sask_unlistedrenders differently from 2.4.0 and is rendered again (docs/format.md, "After 2.4.0"). Every other file renders byte for byte as 2.4.0 renders it, for each target.docs/limits.mdstates what the limit holds and what it does not.One independent review of the pushed branch and one round of corrections, built tests first. The findings and what was changed for each are in the issue.
Run locally at this tree:
go test ./...with no failing package,gofmt -lprinting nothing, bothgo vetruns,scripts/validate-envoy.shon all 26 examples, the site build and its check, and the conformance battery'srequest-limit(30 rows),request-limit-keys(23),route-limit(8) andfull(the two limit scenarios, 36 rows) on Envoy 1.40.2. Not run locally: the whole battery and the nginx and HAProxy validators, which the required check runs. The branch is squashed onto master with its tree unchanged.