Rishabh Daim created OAK-12563:
----------------------------------

             Summary: Keep Elasticsearch request gzip opt-in for bulk indexing
                 Key: OAK-12563
                 URL: https://issues.apache.org/jira/browse/OAK-12563
             Project: Jackrabbit Oak
          Issue Type: Bug
          Components: search-elastic
            Reporter: Rishabh Daim


OAK-12562 upgraded the Elasticsearch client to 9.5.7 and enabled HTTP 
compression for both requests and responses. With request gzip enabled, REST5 
buffers the entire compressed bulk request on the HTTP I/O thread. Local 
profiling observed 8 MiB byte-array allocations in 
ContentCompressingEntity.getContent().

Keep gzip response negotiation enabled by default via Accept-Encoding: gzip and 
make request gzip opt-in. Preserve the existing property as an opt-out from all 
compression. Add a wire-level test for default response-only gzip, explicit 
request gzip, and the global opt-out.

Local Elasticsearch 9.5.7 bulk indexing medians (six runs per mode and 
workload, 24,576 documents per run, 8 MiB flush threshold, one in-flight bulk):
|| Workload || Compression off || Gzip responses only || Gzip requests and 
responses ||
| Log-like | 20,842 docs/s | 21,339 docs/s | 8,266 docs/s |
| High entropy | 18,082 docs/s | 17,532 docs/s | 5,649 docs/s |

These are loopback measurements. The CPU/network trade-off may differ on 
bandwidth-constrained deployments.

[Discussion on PR 
#3325|https://github.com/apache/jackrabbit-oak/pull/3325#issuecomment-7306005867]




--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to