From 6a97e403badd758fded25efd93255acc908cb321 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 21 Sep 2026 17:27:22 +0800 Subject: [PATCH] =?UTF-8?q?netty=20=E6=8C=89=E9=9C=80=E5=A3=B0=E6=98=8E?= =?UTF-8?q?=EF=BC=8C=E5=8E=BB=E6=8E=89=E7=94=A8=E4=B8=8D=E5=88=B0=E7=9A=84?= =?UTF-8?q?=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit netty-all 是聚合 pom,会拖进 35 个模块:osx/aarch64/riscv64 的 epoll 与 kqueue native、codec-http3/mqtt/redis/smtp/stomp/xml/protobuf、transport-rxtx/sctp/udt 等,而节点只用 ServerBootstrap/Bootstrap/NioEventLoopGroup/NioServerSocketChannel/ NioSocketChannel/ByteBuf/ByteToMessageCodec/LengthFieldBasedFrameDecoder。 收敛为 transport + codec(buffer/common/resolver 传递引入)。节点侧未使用 handler 模块的类,故不声明。4.1 无独立 codec-base,编解码基类在 netty-codec。 效果:lib 16MB -> 13MB,netty 模块 35 -> 5,进程 RSS 171MB -> 约 155-162MB。 15 个测试全绿,重启后与主站长连接正常重建(主站日志确认「存储节点上线」)。 hutool 未动。 --- pom.xml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0f5af87..d6dbb6f 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,25 @@ io.netty - netty-all + + netty-transport + 4.1.138.Final + + + + io.netty + netty-codec 4.1.138.Final