vespa
vespa copied to clipboard
Consider adding http zstd compression
Today we support gzip so Vespa delivers a gzip compressed response when the client uses "Accept-Encoding": "gzip", we could also support better and faster compression if we could understand "Accept-Encoding: zstd" and deliver a zstd compressed response. Also relevant for our feeding apis.
I believe this would be a great as it reduced egress cost for multi-cloud usages. curl has support for decompressing zstd compressed content as well https://daniel.haxx.se/blog/2020/08/19/curl-7-72-0-more-compression/
Jetty has currently no builtin support for zstd encoded request/response content. We'll have to implement it ourself. On approach is to create a new Jetty handler + input/output interceptors for (de)compression of zstd content. Jetty's GzipHandler
does that.
I think for our internal feed api's it would make a lot of sense to support it, for query/read traffic where we don't do client implementations we could point to libraries supporting it for reducing network transfer cost.
Consider featurerequest to Jetty, alt contribute in Jetty
Created feature request on Jetty's issue tracker: https://github.com/eclipse/jetty.project/issues/6600.