-
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
max request size limitation without buffer #36946
Comments
It's reasonable to return 413 ,but why we need close the connection ? The max request body size reached for this request but not mean other requests via this connection will also over size right ? |
It depends on the protocol. HTTP1.1 will close the connection because the reponse will be complete before the response. For the HTTP2, the connection may be kept. |
To confirm the problem: we want to have a max request payload size while streaming the request to avoid buffering the entire request in memory at the proxy? |
yeah. |
What about the http1.1 with keep-alive? |
HTTP1.1 has no frame or stream like HTTP2 on the top of the connection. So, if the response cannot end as normally, to avoid possible dirty data, the connection should be closed anyway. |
OK, the proposed solution here is: I just wonder how this body limit was done by other proxy like nginx . Is it possible to have the same behavior ? So that it will much easier to do proxy replacement and no sence for upstream service. |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions. |
Title: One line description
Now, all the the exist way to limit the max request body in the Envoy need to buffer the request body. But I won't whether make sense to add a featue to limit the request body without buffer body.
The request body will be proxied to upstream. But if the limitation is reached then the 413 will be returned and whole connection will be closed directly.
From the clients' view, the Envoy responded a 413, from the servers' view, Envoy cancelled the requests by close connection. This could limit the max request body size and need keep the body in the memory buffer.
🤔
The text was updated successfully, but these errors were encountered: