You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// DisableCompression, if true, prevents the Transport from// requesting compression with an "Accept-Encoding: gzip"// request header when the Request contains no existing// Accept-Encoding value. If the Transport requests gzip on// its own and gets a gzipped response, it's transparently// decoded in the Response.Body. However, if the user// explicitly requested gzip it is not automatically// uncompressed.DisableCompressionbool
This behavior means that gzip-aware backend and Skipper spend time compressing and decompressing response even when Skipper client did not ask for any compression.
Describe the solution you would like
Make proxy transport DisableCompression option configurable. Consider disabling transparent compression by default (this is potentially breaking change as it may cause changes in the system behavior due to increased skipper<->backend network consumption).
Describe alternatives you've considered (optional)
disable compression unconditionally
leave everything as is
Additional context (optional)
http.Response contains Uncompressed field that hints if response was transparenmty uncompressed by the transport:
// Uncompressed reports whether the response was sent compressed but// was decompressed by the http package. When true, reading from// Body yields the uncompressed content instead of the compressed// content actually set from the server, ContentLength is set to -1,// and the "Content-Length" and "Content-Encoding" fields are deleted// from the responseHeader. To get the original response from// the server, set Transport.DisableCompression to true.Uncompressedbool
This data might be used to make a decision about enabling/disabling transport compression.
Would you like to work on it?
Yes
The text was updated successfully, but these errors were encountered:
One argument to disable compression unconditionally is that if Skipper client never asked for compression operators might be surprised to discover that backend serves gzip.
* Adds previously missing tests for proxy metrics
* Adds GetBody helper to the proxytest client
For #2307
Signed-off-by: Alexander Yastrebov <alexander.yastrebov@zalando.de>
* Adds previously missing tests for proxy metrics
* Adds GetBody helper to the proxytest client
For #2307
Signed-off-by: Alexander Yastrebov <alexander.yastrebov@zalando.de>
* Adds previously missing tests for proxy metrics
* Adds GetBody helper to the proxytest client
For #2307
Signed-off-by: Alexander Yastrebov <alexander.yastrebov@zalando.de>
Is your feature request related to a problem? Please describe.
Skipper proxy component uses http.Transport to perform backend requests. When Skipper client does not specify that it accepts gzip response encoding, the http.Transport adds
Accept-Encoding: gzip
request header and if backend serves compressed response the Transport will transparently decompress it before serving back to the client. This behavior can be configured by theDisableCompression
http.Transport option:E.g. consider the following two routes:
Logs of GET request to the
/test
:show that request to the "backend" receives
Accept-Encoding: gzip
header added by the transport:This behavior means that gzip-aware backend and Skipper spend time compressing and decompressing response even when Skipper client did not ask for any compression.
Describe the solution you would like
Make proxy transport
DisableCompression
option configurable. Consider disabling transparent compression by default (this is potentially breaking change as it may cause changes in the system behavior due to increased skipper<->backend network consumption).Describe alternatives you've considered (optional)
Additional context (optional)
http.Response contains
Uncompressed
field that hints if response was transparenmty uncompressed by the transport:This data might be used to make a decision about enabling/disabling transport compression.
Would you like to work on it?
Yes
The text was updated successfully, but these errors were encountered: