From 8f8a09fcadbc0208c0dda5c66bcd04066f3c1823 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Mon, 29 Aug 2022 10:15:26 -0600 Subject: [PATCH] reverse_proxy: Clarify streaming/buffering --- src/docs/markdown/caddyfile/directives/reverse_proxy.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/docs/markdown/caddyfile/directives/reverse_proxy.md b/src/docs/markdown/caddyfile/directives/reverse_proxy.md index 8777104..92e94fe 100644 --- a/src/docs/markdown/caddyfile/directives/reverse_proxy.md +++ b/src/docs/markdown/caddyfile/directives/reverse_proxy.md @@ -289,9 +289,9 @@ Passive health checks happen inline with actual proxied requests: ### Streaming -The proxy **buffers responses** by default for wire efficiency: +The proxy partially buffers and periodically flushes responses by default for wire efficiency: -- **flush_interval** is a [duration value](/docs/conventions#durations) that adjusts how often Caddy should flush the response buffer to the client. By default, no periodic flushing is done. A negative value disables response buffering, and flushes immediately after each write to the client. This option is ignored when the upstream's response is recognized as a streaming response, or if its content length is `-1`; for such responses, writes are flushed to the client immediately. +- **flush_interval** is a [duration value](/docs/conventions#durations) that adjusts how often Caddy should flush the response buffer to the client. By default, no periodic flushing is done. A negative value disables response buffering, and flushes immediately after each write to the client. This option is ignored when the upstream's response is recognized as a streaming response, or if its content length is `-1`; for such responses, writes are always flushed to the client immediately. - **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).