envoyproxy / envoy

Cloud-native high-performance edge/middle/service proxy
https://www.envoyproxy.io
Apache License 2.0
24.97k stars 4.81k forks source link

Support to weaken strong ETags when compressing/decompressing #35152

Open httpdigest opened 3 months ago

httpdigest commented 3 months ago

Title: Support to weaken strong ETags when compressing/decompressing

Description: Currently, when using the compressor filter, there are basically two options to handle (strong) ETags:

But one other option, that is popular in other HTTP proxies/caches, for example Varnish HTTP Cache, is:

When searching the web, there are numerous stackoverflow, bugzilla (or other bug tracking tools) and blog posts about how to handle ETags and how to do it in the least surprising ways (surprising for any developer or server/platform operator).

Now, since we were using Varnish and I was familiar with the "weaken any strong ETag when compressing" behaviour, it caught me by surprise that the Envoy compressor does not provide such an option (only the above two mentioned options).

My current use-case is to compress/decompress the traffic between each two Istio sidecars when the backends do not:

Would it be possible to provide a way to weaken any strong ETag with Envoy's compressor here?

nezdolik commented 3 months ago

cc @kbaichoo @mattklein123

httpdigest commented 3 months ago

Not stale.

KBaichoo commented 3 months ago

Sorry, this fell off my radar @httpdigest. This sounds reasonable to me if it's an additional option. e.g. we have several modes of how etag is supported and the behavior you described being one of them.

httpdigest commented 3 months ago

Yeah, having the option to configure it like that, would be very much preferable for us.