From cae970833fc0ba58515e602d9f6608f89ec5800a Mon Sep 17 00:00:00 2001 From: Matt Holt Date: Thu, 16 Feb 2023 09:28:41 -0700 Subject: [PATCH] reverseproxy: Update buffering docs (#301) Co-authored-by: Francis Lavoie --- .../markdown/caddyfile/directives/reverse_proxy.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/docs/markdown/caddyfile/directives/reverse_proxy.md b/src/docs/markdown/caddyfile/directives/reverse_proxy.md index 7557ad3..4b019ba 100644 --- a/src/docs/markdown/caddyfile/directives/reverse_proxy.md +++ b/src/docs/markdown/caddyfile/directives/reverse_proxy.md @@ -84,9 +84,8 @@ reverse_proxy [] [] { # streaming flush_interval - buffer_requests - buffer_responses - max_buffer_size + request_buffers + response_buffers # request/header manipulation trusted_proxies [private_ranges] @@ -332,11 +331,9 @@ By default, the proxy partially buffers the response for wire efficiency: - `Content-Length` is unknown - HTTP/2 on both sides of the proxy, `Content-Length` is unknown, and `Accept-Encoding` is either not set or is "identity" -- **buffer_requests** will cause the proxy to read the entire request body into a buffer before sending it upstream. This is very inefficient and should only be done if the upstream requires reading request bodies without delay (which is something the upstream application should fix). +- **request_buffers** will cause the proxy to read up to `` amount of bytes from the request body into a buffer before sending it upstream. This is very inefficient and should only be done if the upstream requires reading request bodies without delay (which is something the upstream application should fix). This accepts all size formats supported by [go-humanize](https://github.com/dustin/go-humanize/blob/master/bytes.go). -- **buffer_responses** will cause the entire response body to be read and buffered in memory before being proxied to the client. This should be avoided if at all possible for performance reasons, but could be useful if the backend has tighter memory constraints. - -- **max_buffer_size** if body buffering is enabled, this sets the maximum size of the buffers used for the requests and responses. This accepts all size formats supported by [go-humanize](https://github.com/dustin/go-humanize/blob/master/bytes.go). +- **response_buffers** will cause the proxy to read up to `` amount of bytes from the response body to be read into a buffer before being returned to the client. This should be avoided if at all possible for performance reasons, but could be useful if the backend has tighter memory constraints. This accepts all size formats supported by [go-humanize](https://github.com/dustin/go-humanize/blob/master/bytes.go).