压缩时的 Elasticsearch http.max_content_length

Mar*_*jek 1 elasticsearch

压缩如何影响

http.max_content_length

https://www.elastic.co/guide/en/elasticsearch/reference/current/modules

假设内容为 130Mb,但压缩后为 80Mb。弹性搜索是否会因为未压缩大小超过默认 100Mb 而拒绝内容?

Val*_*Val 6

http.max_content_length参数适用于未压缩的大小,默认为 100 MB。

最好的方法是尝试一下:

测试 1:设置http.compression: falsehttp.max_content_length: 100mb,然后发送大于 100mb 的 JSON 正文

=> 你会得到 413 Request Entity Too Large

测试 2:设置http.compression: trueand http.max_content_length: 100mb,然后发送一个未压缩大小大于 100mb 但小于 100mb 的 JSON body 在 gzip 时

=> 你会得到 413 Request Entity Too Large