配置项作用 #
http.netty.max_composite_buffer_components 配置项控制 Netty 复合缓冲区(CompositeByteBuf)中最大组件数量。这用于优化 HTTP 请求块聚合时的内存使用。
默认值 #
动态计算(基于 maxContentLength 和 MTU)
配置类型 #
静态配置
取值范围 #
2 ~ Integer.MAX_VALUE
配置格式 #
# 默认配置:自动计算
http.netty.max_composite_buffer_components: <auto>
# 设置固定值
http.netty.max_composite_buffer_components: 1000
工作原理 #
默认值计算公式:maxContentLength / MTU,结果限制在 2 到 Integer.MAX_VALUE 之间。
推荐配置 #
# 使用默认的自动计算
# http.netty.max_composite_buffer_components: <auto>
注意事项 #
- 重启生效:修改此配置需要重启节点
- 更高的值允许更细粒度的块聚合,但增加内存开销





