mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-10 00:57:02 +02:00
DOC: add a few precisions on compression
Please consider the attached patch, I hope it will clarify haproxy's behavior a bit.
This commit is contained in:
parent
8139b9959f
commit
c9f3b45d7a
@ -1903,16 +1903,23 @@ compression offload
|
|||||||
|
|
||||||
Compression will be activated depending on the Accept-Encoding request
|
Compression will be activated depending on the Accept-Encoding request
|
||||||
header. With identity, it does not take care of that header.
|
header. With identity, it does not take care of that header.
|
||||||
|
If backend servers support HTTP compression, these directives
|
||||||
|
will be no-op: haproxy will see the compressed response and will not
|
||||||
|
compress again. If backend servers do not support HTTP compression and
|
||||||
|
there is Accept-Encoding header in request, haproxy will compress the
|
||||||
|
matching response.
|
||||||
|
|
||||||
The "offload" setting makes haproxy remove the Accept-Encoding header to
|
The "offload" setting makes haproxy remove the Accept-Encoding header to
|
||||||
prevent backend servers from compressing responses. It is strongly
|
prevent backend servers from compressing responses. It is strongly
|
||||||
recommended not to do this because this means that all the compression work
|
recommended not to do this because this means that all the compression work
|
||||||
will be done on the single point where haproxy is located. However in some
|
will be done on the single point where haproxy is located. However in some
|
||||||
deployment scenarios, haproxy may be installed in front of a buggy gateway
|
deployment scenarios, haproxy may be installed in front of a buggy gateway
|
||||||
and need to prevent it from emitting invalid payloads. In this case, simply
|
with broken HTTP compression implementation which can't be turned off.
|
||||||
removing the header in the configuration does not work because it applies
|
In that case haproxy can be used to prevent that gateway from emitting
|
||||||
before the header is parsed, so that prevents haproxy from compressing. The
|
invalid payloads. In this case, simply removing the header in the
|
||||||
"offload" setting should then be used for such scenarios.
|
configuration does not work because it applies before the header is parsed,
|
||||||
|
so that prevents haproxy from compressing. The "offload" setting should
|
||||||
|
then be used for such scenarios.
|
||||||
|
|
||||||
Compression is disabled when:
|
Compression is disabled when:
|
||||||
* the server is not HTTP/1.1.
|
* the server is not HTTP/1.1.
|
||||||
|
Loading…
Reference in New Issue
Block a user