From cb1d00bf7f7bb87ad13b2061b92849d431498c8d Mon Sep 17 00:00:00 2001 From: ChocoLZS Date: Wed, 25 Mar 2026 16:18:30 +0800 Subject: [PATCH] doc(kitex): deprecated for netpollmux --- content/en/docs/kitex/FAQ/_index.md | 4 ++++ .../docs/kitex/Tutorials/basic-feature/connection_type.md | 6 ++++++ content/en/docs/kitex/Tutorials/options/client_options.md | 4 ++++ content/en/docs/kitex/Tutorials/options/server_options.md | 4 ++++ content/zh/docs/kitex/FAQ/_index.md | 4 ++++ .../docs/kitex/Tutorials/basic-feature/connection_type.md | 6 ++++++ content/zh/docs/kitex/Tutorials/options/client_options.md | 4 ++++ content/zh/docs/kitex/Tutorials/options/server_options.md | 4 ++++ 8 files changed, 36 insertions(+) diff --git a/content/en/docs/kitex/FAQ/_index.md b/content/en/docs/kitex/FAQ/_index.md index c33eaa3bc30..7cc16f23967 100644 --- a/content/en/docs/kitex/FAQ/_index.md +++ b/content/en/docs/kitex/FAQ/_index.md @@ -23,6 +23,10 @@ description: "Kitex Frequently Asked Questions and corresponding Answers." **Q3: How to configure multiplexing?** +> **⚠️ Deprecated** +> +> Reason see [Connection Multiplexing](/docs/kitex/tutorials/basic-feature/connection_type/#connection-multiplexing). + - If you are using Thrift or Kitex Protobuf, to configure multiplexing: 1. Configure WithMuxTransport() on your server. 2. Configure WithMuxConnection(1) on your client diff --git a/content/en/docs/kitex/Tutorials/basic-feature/connection_type.md b/content/en/docs/kitex/Tutorials/basic-feature/connection_type.md index d6b5c59677b..ea850e721e6 100644 --- a/content/en/docs/kitex/Tutorials/basic-feature/connection_type.md +++ b/content/en/docs/kitex/Tutorials/basic-feature/connection_type.md @@ -81,6 +81,12 @@ The setting of parameters is suggested as follows: ## Connection Multiplexing +> **⚠️ Deprecated** +> +> - `WithMuxConnection` and `WithMuxTransport` rely on [`netpollmux`](https://github.com/cloudwego/kitex/pull/1933) which is no longer maintained +> - The performance gain is not significant in actual business scenarios +> - The server must enable this feature first, otherwise, it may lead to request failure if used improperly + The client invokes the Server only need one connection normally when enabling Connection Multiplexing. Connection Multiplexing not only reduces the number of connections but also performs better than Connection Pool. Special Note: diff --git a/content/en/docs/kitex/Tutorials/options/client_options.md b/content/en/docs/kitex/Tutorials/options/client_options.md index 86aa11dc0ae..2699b410ad9 100644 --- a/content/en/docs/kitex/Tutorials/options/client_options.md +++ b/content/en/docs/kitex/Tutorials/options/client_options.md @@ -61,6 +61,10 @@ Enable long connections. [More](/docs/kitex/tutorials/basic-feature/connection_t ### WithMuxConnection +> **⚠️ Deprecated** +> +> Reason see [Connection Multiplexing](/docs/kitex/tutorials/basic-feature/connection_type/#connection-multiplexing). + ```go func WithMuxConnection(connNum int) Option ``` diff --git a/content/en/docs/kitex/Tutorials/options/server_options.md b/content/en/docs/kitex/Tutorials/options/server_options.md index 62854e56296..54b67f50128 100644 --- a/content/en/docs/kitex/Tutorials/options/server_options.md +++ b/content/en/docs/kitex/Tutorials/options/server_options.md @@ -42,6 +42,10 @@ When local server has multiple IP addresses, you can also use this method to spe ### WithMuxTransport +> **⚠️ Deprecated** +> +> Reason see [Connection Multiplexing](/docs/kitex/tutorials/basic-feature/connection_type/#connection-multiplexing). + ```go func WithMuxTransport() Option ``` diff --git a/content/zh/docs/kitex/FAQ/_index.md b/content/zh/docs/kitex/FAQ/_index.md index 44fd64363e9..37a8d2202bd 100644 --- a/content/zh/docs/kitex/FAQ/_index.md +++ b/content/zh/docs/kitex/FAQ/_index.md @@ -22,6 +22,10 @@ description: "Kitex 常见问题解答。" **Q3: 如何配置开启连接多路复用?** +> **⚠️ 已废弃** +> +> 原因详见[连接类型-连接多路复用](/zh/docs/kitex/tutorials/basic-feature/connection_type/#连接多路复用)。 + - 如果使用 Thrift 或 Kitex Protobuf ,开启连接多路复用:服务端配置 WithMuxTransport(),调用端配置 WithMuxConnection(1)。 - 如果使用 gRPC, 默认是连接多路复用。 diff --git a/content/zh/docs/kitex/Tutorials/basic-feature/connection_type.md b/content/zh/docs/kitex/Tutorials/basic-feature/connection_type.md index 85e8d762260..114a081af8c 100644 --- a/content/zh/docs/kitex/Tutorials/basic-feature/connection_type.md +++ b/content/zh/docs/kitex/Tutorials/basic-feature/connection_type.md @@ -82,6 +82,12 @@ xxxCli := xxxservice.NewClient("destServiceName", client.WithLongConnection(conn ## 连接多路复用 +> **⚠️ 已废弃** +> +> - `WithMuxConnection` 和 `WithMuxTransport` 所依赖的 [`netpollmux`](https://github.com/cloudwego/kitex/pull/1933) 不再维护 +> - 在实际业务场景中性能收益不显著 +> - 服务端需要先启用此功能,否则使用不当可能导致请求失败 + 开启连接多路复用,Client 访问 Server 常规只需要**1个连接**即可,相比连接池极限测试吞吐表现更好(目前的极限测试配置了2个连接),且能大大减少连接数量。 特别说明: diff --git a/content/zh/docs/kitex/Tutorials/options/client_options.md b/content/zh/docs/kitex/Tutorials/options/client_options.md index 1ef1285b002..6cff8e445ce 100644 --- a/content/zh/docs/kitex/Tutorials/options/client_options.md +++ b/content/zh/docs/kitex/Tutorials/options/client_options.md @@ -60,6 +60,10 @@ func WithLongConnection(cfg connpool.IdleConfig) Option ### 多路复用 - WithMuxConnection +> **⚠️ 已废弃** +> +> 原因详见[连接类型-连接多路复用](/zh/docs/kitex/tutorials/basic-feature/connection_type/#连接多路复用)。 + ```go func WithMuxConnection(connNum int) Option ``` diff --git a/content/zh/docs/kitex/Tutorials/options/server_options.md b/content/zh/docs/kitex/Tutorials/options/server_options.md index a0b2366549d..8d205b3b722 100644 --- a/content/zh/docs/kitex/Tutorials/options/server_options.md +++ b/content/zh/docs/kitex/Tutorials/options/server_options.md @@ -41,6 +41,10 @@ func WithServiceAddr(addr net.Addr) Option ### 多路复用 - WithMuxTransport +> **⚠️ 已废弃** +> +> 原因详见[连接类型-连接多路复用](/zh/docs/kitex/tutorials/basic-feature/connection_type/#连接多路复用)。 + ```go func WithMuxTransport() Option ```