envoyproxy / envoy

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

Support to weaken strong ETags when compressing/decompressing #35152

Open httpdigest opened 2 months ago

httpdigest commented 2 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 2 months ago

cc @kbaichoo @mattklein123

httpdigest commented 1 month ago

Not stale.

KBaichoo commented 1 month 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 1 month ago

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