[
{
"number": 2724,
"title": "2024-08-02 weekly",
"body": "## 会议纪要\r\n本轮任务与维护工作,由社区Committer 唐启文负责推进\r\n\r\n### 任务一:配置统一,解决配置不生效、位置分散、启动流程不清晰等问题。唐启文、王一博、徐战潮一起跟进\r\n1. config与global.config配置整合,当初global.config从设计上是取代config,目前还未全部完成\r\n2. config掏空,保留老用户兼容性\r\n3. config包中的启动动作迁移,移到server/client等位置\r\n4. 开放一些协议层配置\r\n\r\n### 任务二:包依赖关系。张文锋\r\n一些影响比较大的相关包如下:\r\n● common/extension\r\n● config/global\r\n● server/client\r\n● protocol\r\n● registry/metadata\r\n\r\n### 任务三:商城示例,完成接下来的部署脚本。严旻茜\r\n\r\n### 任务四:triple协议。徐战潮、如漫\r\n1. triple协议的链接与可用性管理,参考grpc-go等keepalive机制。徐战潮、如漫\r\n2. triple与dubbo3/grpc之间的关系,徐战潮\r\n\r\n### 任务五: error分类,陶明宇\r\n\r\n### 其他任务:\r\n● 优雅停机\r\n● 服务发现\r\n● xds,王一博\r\n● java转go的proto工具\r\n\r\n",
"url": "https://github.com/apache/dubbo-go/discussions/2724",
"createdAt": "2024-08-05T02:09:18Z",
"updatedAt": "2025-05-18T03:32:31Z",
"closed": true,
"closedAt": "2025-05-18T03:32:31Z",
"isAnswered": null,
"author": {
"login": "chickenlj"
},
"category": {
"name": "General"
},
"answer": null,
"comments": [
{
"id": "DC_kwDOCJS8R84AnDm5",
"url": "https://github.com/apache/dubbo-go/discussions/2724#discussioncomment-10238393",
"body": "@chickenlj dubbogo 内存泄漏问题,https://github.com/No-SilverBullet 近期会提交一个 PR 上来。",
"createdAt": "2024-08-05T02:43:33Z",
"updatedAt": "2024-08-05T02:43:34Z",
"author": {
"login": "AlexStocks"
},
"replies": []
}
]
},
{
"number": 2735,
"title": "2024-09-27 weekly",
"body": "## 会议纪要\r\n\r\n### 任务四:triple协议。吴歆帆、云兴、唐启文、徐战潮、如漫\r\n1. triple协议的链接与可用性管理,参考grpc-go等keepalive机制。徐战潮、如漫\r\n2. triple与dubbo3/grpc之间的关系,徐战潮\r\n\r\n### 任务一:配置统一,解决配置不生效、位置分散、启动流程不清晰等问题。唐启文、王一博、徐战潮一起跟进\r\n1. config与global.config配置整合,当初global.config从设计上是取代config,目前还未全部完成\r\n2. config掏空,保留老用户兼容性\r\n3. config包中的启动动作迁移,移到server/client等位置\r\n4. 开放一些协议层配置\r\n\r\n### 任务二:包依赖关系,需要重新明确任务范围和目标。张文锋,培养1-2新人来做\r\n一些影响比较大的相关包如下:\r\n● common/extension\r\n● config/global\r\n● server/client\r\n● protocol\r\n● registry/metadata\r\n\r\n### 任务五: error分类,陶明宇\r\n\r\n### 其他任务:\r\n● 优雅停机\r\n● 服务发现\r\n● xds,王一博\r\n● java转go的proto工具\r\n\r\n",
"url": "https://github.com/apache/dubbo-go/discussions/2735",
"createdAt": "2024-09-27T14:02:51Z",
"updatedAt": "2026-02-13T02:12:19Z",
"closed": true,
"closedAt": "2026-02-13T02:12:19Z",
"isAnswered": null,
"author": {
"login": "chickenlj"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 2740,
"title": "2024-10-25 weekly",
"body": "| Item | Priority | Issue/Pr | Owner | Description |\r\n| :---: | :------: | :---- | :---: | :--: |\r\n| triple 协议 | P0 | | 吴歆帆、云兴、姬世文、包哲铭 | 1. triple协议的链接与可用性管理,参考grpc-go等keepalive机制
2. triple与dubbo3/grpc之间的关系 |\r\n| 统一配置 | P1 | | 唐启文、王一博、徐战潮 | 配置统一,解决配置不生效、位置分散、启动流程不清晰等问题
1. config与global.config配置整合,当初global.config从设计上是取代config,目前还未全部完成
2. config掏空,保留老用户兼容性
3. config包中的启动动作迁移,移到server/client等位置
4. 开放一些协议层配置
|\r\n| 包依赖关系 | P0 | | 张文锋、梁嘉嘉、罗颖韬 | common/extension
config/global
server/client
protocol
registry/metadata |\r\n| java 转 go的proto工具 | P0 | | 何亮、梁嘉嘉、杨泽睿 | 把 Java 转成 proto 文件:
1 当前情况,支持 proto 文件生成 Java 文件;
2 反向实现 Java 转成 proto 文件 |\r\n| dubbo-admin | P0 | | 吴歆帆、罗颖韬、马超、郭暾、肖坡 | dubbo-admin 一半是 console 控制台,一半想做 dubbo 控制面,控制面借鉴 istio;
想推进新版本的编写,交叉编译 |\r\n| error分类 | P0 | | | |\r\n| 优雅停机 | P0 | | | |\r\n| 服务发现 | P0 | | | |\r\n| 优雅停机 | P0 | | | |\r\n| xds | P0 | | 王一博 | |\r\n\r\n# ● Members ● \r\n\r\n | Owner | Description |\r\n| :---: | :--: |\r\n| 包哲铭 | 北大 |\r\n| 梁嘉嘉 | solisamicus,北交大 研二,擅长 Java/Go,之前参加过华为 OpenGuass 方言包 |\r\n| 罗颖韬 | lqyt2012, 2022 毕业,擅长 Java 开发 |\r\n| 何亮 | heliang666s,擅长 Java,东北大学大二 |\r\n| 杨泽睿 | similarityoung 南京理工大学研一,擅长 Java,会 Go | \r\n| 马超 | AdrianMachao 擅长 Go,毕业 7 年,做效能平台 | \r\n| 郭暾 | finntew,青岛科技大学大三,擅长 Go | \r\n| 肖坡 | po-168,擅长 Java 和 Dubbo,工作 5 年 |",
"url": "https://github.com/apache/dubbo-go/discussions/2740",
"createdAt": "2024-10-25T13:04:53Z",
"updatedAt": "2026-02-13T02:12:43Z",
"closed": true,
"closedAt": "2026-02-13T02:12:43Z",
"isAnswered": null,
"author": {
"login": "AlexStocks"
},
"category": {
"name": "General"
},
"answer": null,
"comments": [
{
"id": "DC_kwDOCJS8R84AqKfE",
"url": "https://github.com/apache/dubbo-go/discussions/2740#discussioncomment-11052996",
"body": "grpc-go keepalive\r\n### grpc-go keep-alive\r\n\r\n#### client-side\r\n\r\n新建一个HTTP2Client的时候会启动一个goroutine来处理keepalive() \r\n\r\nhttps://github.com/grpc/grpc-go/blob/master/internal/transport/http2_client.go#L403\r\n\r\n```go\r\n//internal/transport/http_client.go #403\r\n\r\n\tif t.keepaliveEnabled {\r\n\t\tt.kpDormancyCond = sync.NewCond(&t.mu)\r\n\t\tgo t.keepalive()\r\n\t}\r\n```\r\n\r\nkeepalive的实现(https://github.com/grpc/grpc-go/blob/master/internal/transport/http2_client.go#L1710)\r\n\r\n```go\r\n// keepalive running in a separate goroutine makes sure the connection is alive by sending pings.\r\nfunc (t *http2Client) keepalive() {\r\n\tvar err error\r\n\tdefer func() {\r\n\t\tclose(t.keepaliveDone)\r\n\t\tif err != nil {\r\n\t\t\tt.Close(err)\r\n\t\t}\r\n\t}()\r\n\tp := &ping{data: [8]byte{}}\r\n\t// True iff a ping has been sent, and no data has been received since then.\r\n\toutstandingPing := false\r\n\t// Amount of time remaining before which we should receive an ACK for the\r\n\t// last sent ping.\r\n\ttimeoutLeft := time.Duration(0)\r\n\t// Records the last value of t.lastRead before we go block on the timer.\r\n\t// This is required to check for read activity since then.\r\n\tprevNano := time.Now().UnixNano()\r\n\ttimer := time.NewTimer(t.kp.Time)\r\n\tfor {\r\n\t\tselect {\r\n\t\tcase <-timer.C:\r\n\t\t\tlastRead := atomic.LoadInt64(&t.lastRead)\r\n\t\t\tif lastRead > prevNano {\r\n\t\t\t\t// There has been read activity since the last time we were here.\r\n\t\t\t\toutstandingPing = false\r\n\t\t\t\t// Next timer should fire at kp.Time seconds from lastRead time.\r\n\t\t\t\ttimer.Reset(time.Duration(lastRead) + t.kp.Time - time.Duration(time.Now().UnixNano()))\r\n\t\t\t\tprevNano = lastRead\r\n\t\t\t\tcontinue\r\n\t\t\t}\r\n\t\t\tif outstandingPing && timeoutLeft <= 0 {\r\n\t\t\t\terr = connectionErrorf(true, nil, \"keepalive ping failed to receive ACK within timeout\")\r\n\t\t\t\treturn\r\n\t\t\t}\r\n\t\t\tt.mu.Lock()\r\n\t\t\tif t.state == closing {\r\n\t\t\t\t// If the transport is closing, we should exit from the\r\n\t\t\t\t// keepalive goroutine here. If not, we could have a race\r\n\t\t\t\t// between the call to Signal() from Close() and the call to\r\n\t\t\t\t// Wait() here, whereby the keepalive goroutine ends up\r\n\t\t\t\t// blocking on the condition variable which will never be\r\n\t\t\t\t// signalled again.\r\n\t\t\t\tt.mu.Unlock()\r\n\t\t\t\treturn\r\n\t\t\t}\r\n\t\t\tif len(t.activeStreams) < 1 && !t.kp.PermitWithoutStream {\r\n\t\t\t\t// If a ping was sent out previously (because there were active\r\n\t\t\t\t// streams at that point) which wasn't acked and its timeout\r\n\t\t\t\t// hadn't fired, but we got here and are about to go dormant,\r\n\t\t\t\t// we should make sure that we unconditionally send a ping once\r\n\t\t\t\t// we awaken.\r\n\t\t\t\toutstandingPing = false\r\n\t\t\t\tt.kpDormant = true\r\n\t\t\t\tt.kpDormancyCond.Wait()\r\n\t\t\t}\r\n\t\t\tt.kpDormant = false\r\n\t\t\tt.mu.Unlock()\r\n\r\n\t\t\t// We get here either because we were dormant and a new stream was\r\n\t\t\t// created which unblocked the Wait() call, or because the\r\n\t\t\t// keepalive timer expired. In both cases, we need to send a ping.\r\n\t\t\tif !outstandingPing {\r\n\t\t\t\tif channelz.IsOn() {\r\n\t\t\t\t\tt.channelz.SocketMetrics.KeepAlivesSent.Add(1)\r\n\t\t\t\t}\r\n\t\t\t\tt.controlBuf.put(p)\r\n\t\t\t\ttimeoutLeft = t.kp.Timeout\r\n\t\t\t\toutstandingPing = true\r\n\t\t\t}\r\n\t\t\t// The amount of time to sleep here is the minimum of kp.Time and\r\n\t\t\t// timeoutLeft. This will ensure that we wait only for kp.Time\r\n\t\t\t// before sending out the next ping (for cases where the ping is\r\n\t\t\t// acked).\r\n\t\t\tsleepDuration := min(t.kp.Time, timeoutLeft)\r\n\t\t\ttimeoutLeft -= sleepDuration\r\n\t\t\ttimer.Reset(sleepDuration)\r\n\t\tcase <-t.ctx.Done():\r\n\t\t\tif !timer.Stop() {\r\n\t\t\t\t<-timer.C\r\n\t\t\t}\r\n\t\t\treturn\r\n\t\t}\r\n\t}\r\n}\r\n\r\n```\r\n\r\n#### server-side\r\n\r\nhttps://github.com/grpc/grpc-go/blob/master/internal/transport/http2_server.go#L880\r\n\r\n```go\r\nfunc (t *http2Server) handlePing(f *http2.PingFrame) {\r\n\tif f.IsAck() {\r\n\t\tif f.Data == goAwayPing.data && t.drainEvent != nil {\r\n\t\t\tt.drainEvent.Fire()\r\n\t\t\treturn\r\n\t\t}\r\n\t\t// Maybe it's a BDP ping.\r\n\t\tif t.bdpEst != nil {\r\n\t\t\tt.bdpEst.calculate(f.Data)\r\n\t\t}\r\n\t\treturn\r\n\t}\r\n\tpingAck := &ping{ack: true}\r\n\tcopy(pingAck.data[:], f.Data[:])\r\n\tt.controlBuf.put(pingAck)\r\n\r\n\tnow := time.Now()\r\n\tdefer func() {\r\n\t\tt.lastPingAt = now\r\n\t}()\r\n\t// A reset ping strikes means that we don't need to check for policy\r\n\t// violation for this ping and the pingStrikes counter should be set\r\n\t// to 0.\r\n\tif atomic.CompareAndSwapUint32(&t.resetPingStrikes, 1, 0) {\r\n\t\tt.pingStrikes = 0\r\n\t\treturn\r\n\t}\r\n\tt.mu.Lock()\r\n\tns := len(t.activeStreams)\r\n\tt.mu.Unlock()\r\n\tif ns < 1 && !t.kep.PermitWithoutStream {\r\n\t\t// Keepalive shouldn't be active thus, this new ping should\r\n\t\t// have come after at least defaultPingTimeout.\r\n\t\tif t.lastPingAt.Add(defaultPingTimeout).After(now) {\r\n\t\t\tt.pingStrikes++\r\n\t\t}\r\n\t} else {\r\n\t\t// Check if keepalive policy is respected.\r\n\t\tif t.lastPingAt.Add(t.kep.MinTime).After(now) {\r\n\t\t\tt.pingStrikes++\r\n\t\t}\r\n\t}\r\n\r\n\tif t.pingStrikes > maxPingStrikes {\r\n\t\t// Send goaway and close the connection.\r\n\t\tt.controlBuf.put(&goAway{code: http2.ErrCodeEnhanceYourCalm, debugData: []byte(\"too_many_pings\"), closeConn: errors.New(\"got too many pings from the client\")})\r\n\t}\r\n}\r\n```",
"createdAt": "2024-10-25T13:41:01Z",
"updatedAt": "2024-10-25T13:42:05Z",
"author": {
"login": "No-SilverBullet"
},
"replies": []
}
]
},
{
"number": 2742,
"title": "2024-11-08 weekly",
"body": "| Item | Priority | Issue/Pr | Owner | Description |\r\n| --------------------- | -------- | -------- | -------------------------------- | ------------------------------------------------------------ |\r\n| triple 协议 | P0 | | 方泽亚、史凤瑞、叶凯乐、孙浩然 | 1. triple协议的链接与可用性管理,参考grpc-go等keepalive机制 2. triple与dubbo3/grpc之间的关系
3 连接实现咨询文峰 |\r\n| 统一配置 | P1 | | 唐启文、王一博、徐战潮 | 配置统一,解决配置不生效、位置分散、启动流程不清晰等问题 1. config与global.config配置整合,当初global.config从设计上是取代config,目前还未全部完成 2. config掏空,保留老用户兼容性 3. config包中的启动动作迁移,移到server/client等位置 4. 开放一些协议层配置 |\r\n| 包依赖关系 | P0 | 嘉嘉: issue:https://github.com/apache/dubbo-go/issues/2741 | 张文锋、梁嘉嘉、罗颖韬 | common/extension config/global server/client protocol registry/metadata |\r\n| java 转 go的proto工具 | P0 | | 何亮、梁嘉嘉、杨泽睿 | 把 Java 转成 proto 文件:
1 当前情况,支持 proto 文件生成 Java 文件;
2 反向实现 Java 转成 proto 文件
|\r\n| dubbo-admin | P0 | | 吴歆帆、罗颖韬、马超、郭暾、肖坡 | dubbo-admin 一半是 console 控制台,一半想做 dubbo 控制面,控制面借鉴 istio; 想推进新版本的编写,交叉编译 |\r\n| error分类 | P0 | | | |\r\n| 优雅停机 | P0 | | | |\r\n| 服务发现 | P0 | | | |\r\n| 优雅停机 | P0 | | | |\r\n| xds | P0 | | 王一博 | |\r\n\r\n",
"url": "https://github.com/apache/dubbo-go/discussions/2742",
"createdAt": "2024-11-08T14:11:22Z",
"updatedAt": "2026-02-13T02:12:48Z",
"closed": true,
"closedAt": "2026-02-13T02:12:48Z",
"isAnswered": null,
"author": {
"login": "AlexStocks"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 2745,
"title": "2024-11-16 weekly",
"body": "| | | | | |\r\n| --------------------- | -------- | ------------------------------------------------------------ | -------------------------------- | ------------------------------------------------------ |\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| triple 协议 | P0 | | 方泽亚、史凤瑞、叶凯乐、孙浩然 | 下周会建立相关的issue 和 pr |\r\n| 统一配置 | P1 | | 唐启文、王一博、徐战潮 | 无进展 |\r\n| 包依赖关系 | P0 | 嘉嘉: issue:[[#2741](https://github.com/apache/dubbo-go/issues/2741)](https://github.com/apache/dubbo-go/issues/2741) | 张文锋、梁嘉嘉、罗颖韬 | 嘉嘉准备画一个依赖关系图,下周再推进 |\r\n| java 转 go的proto工具 | P0 | | 何亮、梁嘉嘉、杨泽睿 | 本周大家比较忙暂无进展,下周准备分一下任务然后开始实现 |\r\n| dubbo-admin | P0 | | 吴歆帆、罗颖韬、马超、郭暾、肖坡 | 军哥比较忙,还未进行交流,暂无进展 |\r\n| error分类 | P0 | | | |\r\n| 优雅停机 | P0 | | | |\r\n| 服务发现 | P0 | | | |\r\n| 优雅停机 | P0 | | | |\r\n| xds | P0 | | 王一博 | 无进展 |",
"url": "https://github.com/apache/dubbo-go/discussions/2745",
"createdAt": "2024-11-16T09:31:27Z",
"updatedAt": "2026-02-13T02:12:53Z",
"closed": true,
"closedAt": "2026-02-13T02:12:53Z",
"isAnswered": null,
"author": {
"login": "heliang666s"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 2747,
"title": "2024-11-22 weekly",
"body": "| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---- | ----- | ----- | ----- | ---- |\r\n| 分支管理 | P0 | | 张峰&xinfan | 分支治理下 |\r\n| triple 协议 | P0 | | 吴歆帆、方泽亚、史凤瑞、叶凯乐、孙浩然 | dubbogo triple 协议目前有两个实现,keepalive (xinfan+zeyang),triple 与 grpc 关系 (凤瑞) |\r\n| 统一配置 | P1 | | 唐启文、王一博、徐战潮 | 无进展 |\r\n| 包依赖关系 | P1 | 嘉嘉: issue:[[#2741](https://github.com/apache/dubbo-go/issues/2741)](https://github.com/apache/dubbo-go/issues/2741) | 张文锋、梁嘉嘉、罗颖韬 | 嘉嘉画一个依赖关系图 |\r\n| java 转 go的proto工具 | P0 | | 何亮、梁嘉嘉、杨泽睿 | dubbo java 海星 已经实现,何亮带着相关筒子继续推进 |\r\n| dubbo-admin | P0 | | 吴歆帆、罗颖韬、马超、郭暾、肖坡 | 军哥比较忙,还未进行交流,暂无进展 |\r\n| error分类 | P0 | | | |\r\n| 优雅停机 | P0 | | | |\r\n| 服务发现 | P0 | | | |\r\n| 优雅停机 | P0 | | | |\r\n| xds | P0 | | 王一博 | 无进展 |\r\n\r\n| Members | task |\r\n| ---- | ----- |\r\n| luoyingtao | Pixiu |\r\n| kaiye | kv |\r\n| zeya | dubbogo 跟着 xinfan | \r\n| guocun | s-g |\r\n| apo | 和 yingtao 合作搞 dubbo-go-pixiu-samples |\r\n| fengrui | pixiu |\r\n| sunhaoran | dubbo-go-samples |\r\n| zerui | busy now | \r\n| maben | pixiu nacos 支持 |",
"url": "https://github.com/apache/dubbo-go/discussions/2747",
"createdAt": "2024-11-22T13:00:31Z",
"updatedAt": "2026-02-13T02:12:25Z",
"closed": true,
"closedAt": "2026-02-13T02:12:25Z",
"isAnswered": null,
"author": {
"login": "AlexStocks"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 2750,
"title": "cloudwego 可借鉴之处",
"body": "https://www.cloudwego.io/zh/blog/2023/11/30/kitex-%E4%B8%A4%E5%91%A8%E5%B9%B4%E5%9B%9E%E9%A1%BE-%E8%83%BD%E5%8A%9B%E5%8D%87%E7%BA%A7%E7%A4%BE%E5%8C%BA%E5%90%88%E4%BD%9C%E4%B8%8E%E6%9C%AA%E6%9D%A5%E5%B1%95%E6%9C%9B/\r\n\r\n\r\n\r\n\r\n",
"url": "https://github.com/apache/dubbo-go/discussions/2750",
"createdAt": "2024-11-26T10:52:30Z",
"updatedAt": "2024-11-26T11:03:54Z",
"closed": false,
"closedAt": null,
"isAnswered": null,
"author": {
"login": "AlexStocks"
},
"category": {
"name": "General"
},
"answer": null,
"comments": [
{
"id": "DC_kwDOCJS8R84Ara8N",
"url": "https://github.com/apache/dubbo-go/discussions/2750#discussioncomment-11382541",
"body": "\r\n\r\nfrom [cloudwego 三周年](https://mp.weixin.qq.com/s/Nbkjq9IYvtvO5Asqx6e-IA)",
"createdAt": "2024-11-26T11:03:54Z",
"updatedAt": "2024-11-26T11:04:23Z",
"author": {
"login": "AlexStocks"
},
"replies": []
}
]
},
{
"number": 2753,
"title": "2024-11-29 weekly",
"body": "| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---- | ----- | ----- | ----- | ---- |\r\n| 分支管理 | P0 | | 张峰&xinfan | |\r\n| triple 协议 | P0 | | 吴歆帆、方泽亚、史凤瑞、叶凯乐、孙浩然 | dubbogo triple 协议目前有两个实现,keepalive (xinfan+zeyang),triple 与 grpc 关系 (凤瑞): https://github.com/dubbogo/triple/pull/87 这个 PR 有待 文锋 Review,然后打个 tag |\r\n| 统一配置 | P1 | | 唐启文、王一博、徐战潮 | 无进展 |\r\n| 包依赖关系 | P1 | 嘉嘉: issue:[[#2741](https://github.com/apache/dubbo-go/issues/2741)](https://github.com/apache/dubbo-go/issues/2741) | 张文锋、梁嘉嘉、罗颖韬 | 嘉嘉画一个依赖关系图 |\r\n| java 转 go的proto工具 | P0 | | 何亮、梁嘉嘉、杨泽睿 | dubbo java 海星 已经实现,何亮带着相关筒子继续推进。zerui 反馈:在梳理 dubbo proto 的代码,然后分工推进。 |\r\n| dubbo-admin | P0 | | 吴歆帆、罗颖韬、马超、郭暾、肖坡 | 军哥比较忙,还未进行交流,暂无进展 |\r\n| error分类 | P0 | | | |\r\n| 优雅停机 | P0 | | | |\r\n| 服务发现 | P0 | | | |\r\n| 优雅停机 | P0 | | | |\r\n| xds | P0 | | 王一博 | 无进展 |\r\n\r\n| Members | task |\r\n| ---- | ----- |\r\n| luoyingtao | Pixiu |\r\n| kaiye | kv |\r\n| zeya | dubbogo 跟着 xinfan | \r\n| guocun | s-g |\r\n| apo | 和 yingtao 合作搞 dubbo-go-pixiu-samples |\r\n| fengrui | pixiu |\r\n| sunhaoran | dubbo-go-samples |\r\n| zerui | busy now | \r\n| maben | pixiu nacos 支持 |",
"url": "https://github.com/apache/dubbo-go/discussions/2753",
"createdAt": "2024-11-29T13:03:12Z",
"updatedAt": "2026-02-13T02:12:31Z",
"closed": true,
"closedAt": "2026-02-13T02:12:31Z",
"isAnswered": null,
"author": {
"login": "AlexStocks"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 2756,
"title": "双向流 BidiStreamForClient 的问题",
"body": " 1. 我在使用 dubbo-go 的时候发现一个问题,请教一下:\r\n client: dubbo-go: v3.2.0-rc2 \r\n server: dubbo v3.3.0\r\n registry: zookeeper\r\n2. 双向流模式:CallBidiStream \r\n3. client: dubbo.NewInstance 方式创建客户端\r\n4. 客户端代码: 其中 biStream 类型为:*triple_protocol.BidiStreamForClient\r\n`\tfor ; ; {\r\n\t\t//1.receive triple server msg\r\n\t\terr := biStream.Receive(response)\r\n\t\tif err != nil {\r\n\t\t\tbreak\r\n\t\t}\r\n }\r\n`\r\n5. 问题 1:biStream 客户端没有关闭长连接的接口;如果服务端不调用 onCompleted,那么 Receive 会永久 block;\r\n 客户端应当具有主动 Close 能力才对,底层使用的是 grpc,而 grpc 客户端是能够主动关闭连接的。\r\n\r\n 问题 2:Java 服务端调用 onCompleted() 后,biStream.Receive 返回 EOF\r\n **但是和服务端的 TCP 连接仍然存在;我知道 dubbo client 内部是连接池,但是我测试了一下,TCP 连接似乎并没有被复用**\r\n",
"url": "https://github.com/apache/dubbo-go/discussions/2756",
"createdAt": "2024-12-03T10:53:29Z",
"updatedAt": "2026-03-16T12:34:25Z",
"closed": true,
"closedAt": "2026-03-16T12:34:25Z",
"isAnswered": true,
"author": {
"login": "zhangcunli"
},
"category": {
"name": "Q&A"
},
"answer": {
"id": "DC_kwDOCJS8R84Aukns",
"url": "https://github.com/apache/dubbo-go/discussions/2756#discussioncomment-12208620",
"body": "### 双向流通信的核心机制与资源管理要点解析\r\n\r\n一、双向流通信的核心机制\r\n在HTTP/2协议下,双向流的本质是通过`d.httpClient.Do(d.request)`建立持久化连接实现的。该接口会创建底层TCP连接,同时维护请求/响应双工通道,其中:\r\n\r\n1. 请求端管理:\r\n\r\n- 通过`requestBodyWriter *io.PipeWriter`进行请求体写入\r\n- CloseRequest()方法的核心职责:\r\n - 关闭管道写入端:`d.requestBodyWriter.Close()`\r\n - 向服务端发送流结束信号\r\n - 触发服务端onCompleted回调(Java示例中的响应终止处理)\r\n\r\n你可以在 java 的 server 端进行如下操作:\r\n\r\n```java\r\n@Override\r\npublic void onCompleted() {\r\n responseObserver.onCompleted();\r\n System.out.println(\"biStream completed\");\r\n}\r\n```\r\n\r\n1. 响应端管理:\r\n\r\n- 通过`response.Body`进行响应体读取\r\n- CloseResponse()的本质操作:`d.response.Body.Close()`\r\n\r\n二、客户端实现的最佳实践\r\n\r\n我仿照 grpc 的 sample 对客户端进行了改写\r\n\r\n```go\r\nfunc TestBiDiStream2(svc greet.GreetService) error {\r\n // 初始化流通道\r\n stream, err := svc.GreetStream(context.Background())\r\n if err != nil {\r\n return err\r\n }\r\n\r\n // 异步响应处理协程\r\n waitc := make(chan struct{})\r\n go func() {\r\n defer close(waitc)\r\n for {\r\n in, err := stream.Recv()\r\n if err != nil { // 捕获EOF或其他错误\r\n fmt.Printf(\"Recv terminal: %v\\n\", err)\r\n return\r\n }\r\n fmt.Printf(\"Response: %s\\n\", in.Greeting)\r\n }\r\n }()\r\n\r\n // 同步发送阶段\r\n for i := 0; i < 5; i++ {\r\n if err := stream.Send(&greet.GreetStreamRequest{\r\n Name: \"stream client!\"\r\n }); err != nil {\r\n return err\r\n }\r\n }\r\n\r\n // 优雅关闭流程\r\n stream.CloseRequest() // 主动终止发送\r\n <-waitc // 等待响应处理完成\r\n defer stream.CloseResponse() // 最终资源清理\r\n\r\n fmt.Println(\"Stream closed properly\")\r\n return nil\r\n}\r\n```\r\n\r\n三、资源管理的必要性\r\n\r\n为什么需要stream.CloseResponse(),我在[相关文章](https://blog.csdn.net/cljdsc/article/details/125027270)找到了如下解释\r\n\r\n> 为什么需要response.Body.Close()\r\n>\r\n> **resp.Body.Close() 做了什么?**\r\n>\r\n> 如果返回值`res`的主体未关闭,`client` 下层的 `RoundTripper` 接口(一般为 `Transport` 类型)可能无法重用 `res` 主体下层保持的 TCP 连接去执行之后的请求。所以它的作用就是用来确保body读干净,释放出该连接\r\n>\r\n> **为什么这样做?**\r\n>\r\n> 连接复用\r\n>\r\n> **如果不这么做会发生什么?**\r\n>\r\n> 第一则是:无法重新使用与服务器的持久 TCP 连接来进行后续的“保持活动”请求,在下次发起HTTP请求的时候,就会重新建立TCP连接\r\n>\r\n> 第二如果不关闭当前请求,readLoop 和 writeLoop 两个 goroutine 在 写入请求并获取 response 返回后,并没有跳出 for 循环,而继续阻塞在下一次 for 循环的 select 语句里面,goroutine 一直无法被回收,cpu 和 memory 全部打满。发生goroutine内存泄漏\r\n>\r\n> 第三如果请求完成后,对端关闭了连接(对端的HTTP服务器向我发送了FIN),如果这边不调用`response.Body.Close()`,那么可以看到与这个请求相关的TCP连接的状态一直处于`CLOSE_WAIT`状态,态,不会被系统回收,则文件描述符不会被释放,出现资源泄漏。\r\n\r\n\r\n\r\n### 关于客户端管理与TCP连接复用的澄清说明\r\n\r\n一、命名误解与技术本质\r\n\r\n1. **客户端创建的核心逻辑**\r\n `NewGreetService` 的命名虽可能引起误解,但其技术本质是**创建客户端实例**而非直接建立TCP连接。通过源码分析可见:\r\n\r\n ```go\r\n svc, err := greet.NewGreetService(cli) \r\n // 实际调用链: \r\n // => newClientManager(url) \r\n // => 初始化 transport (http.RoundTripper) \r\n ```\r\n\r\n 每个客户端实例内部维护独立的**连接池(Transport)**,负责管理底层TCP连接的复用。\r\n\r\n2. **与gRPC设计的对标性**\r\n gRPC的经典实现方式与当前方案高度一致:\r\n\r\n ```go\r\n conn := grpc.NewClient(addr) // 物理连接管理 \r\n client := pb.NewRouteGuideClient(conn) // 逻辑客户端 \r\n runRouteChat(client) // 复用连接 \r\n ```\r\n\r\n 二者的核心差异仅体现在**API抽象层级**,而非连接管理机制。\r\n\r\n二、连接复用的实现机制\r\n\r\n1. **Transport 的核心作用**\r\n\r\n - 作为 `http.RoundTripper` 接口实现,管理HTTP/2连接池\r\n - **自动复用空闲TCP连接**,减少三次握手开销\r\n - 通过 `MaxIdleConns` 等参数控制连接池行为\r\n\r\n2. **客户端生命周期管理**\r\n\r\n ```go\r\n // 正确用法:单例客户端复用 \r\n client := NewGreetService() \r\n for i := 0; i < 10; i++ { \r\n runBiDiStream(client) // 复用同一Transport \r\n } \r\n ```\r\n\r\n **关键准则**:避免重复创建客户端实例,防止产生冗余连接池。",
"author": {
"login": "Similarityoung"
}
},
"comments": [
{
"id": "DC_kwDOCJS8R84AsEP8",
"url": "https://github.com/apache/dubbo-go/discussions/2756#discussioncomment-11551740",
"body": "",
"createdAt": "2024-12-13T03:22:22Z",
"updatedAt": "2024-12-17T09:35:54Z",
"author": {
"login": "No-SilverBullet"
},
"replies": [
{
"id": "DC_kwDOCJS8R84AsNG9",
"url": "https://github.com/apache/dubbo-go/discussions/2756#discussioncomment-11588029",
"body": "> please add my wechat,`wxfowen`, we can discuss your issues on weekly meeting\r\n\r\nOK. 已加,最近略忙,提了 discussion 后没有关注,错过了 12.15 的讨论;再讨论的时候发消息给我",
"createdAt": "2024-12-17T02:55:19Z",
"updatedAt": "2024-12-17T02:55:20Z",
"author": {
"login": "zhangcunli"
}
}
]
},
{
"id": "DC_kwDOCJS8R84AsaWw",
"url": "https://github.com/apache/dubbo-go/discussions/2756#discussioncomment-11642288",
"body": "zhangcunli:\r\n1 连接 gRPC 不能 close request https://github.com/apache/dubbo-go/issues/2755;\r\n2 client 连接数不断增长,到 1k 多,没有复用;\r\n\r\n有待 cunli 提供最小可验证测试方案。",
"createdAt": "2024-12-22T12:13:22Z",
"updatedAt": "2024-12-22T12:24:46Z",
"author": {
"login": "AlexStocks"
},
"replies": [
{
"id": "DC_kwDOCJS8R84AsaXL",
"url": "https://github.com/apache/dubbo-go/discussions/2756#discussioncomment-11642315",
"body": "https://github.com/apache/dubbo-go-pixiu/issues/645",
"createdAt": "2024-12-22T12:17:58Z",
"updatedAt": "2024-12-22T12:17:58Z",
"author": {
"login": "AlexStocks"
}
}
]
},
{
"id": "DC_kwDOCJS8R84AsfQG",
"url": "https://github.com/apache/dubbo-go/discussions/2756#discussioncomment-11662342",
"body": "写了个最小验证 demo: [git@github.com](mailto:git@github.com):zhangcunli/triple-stream-test.git\r\n也许是我使用的方式不正确,按我的 demo,结论如下:\r\n\r\n测试 1:testReuseCli(): 复用 `*client.Client`,那么每创建一个 greet.NewGreetService\r\n 都会新一个新的 TCP 连接,TCP 连接不会复用;\r\n测试 2:testReuseSvc():复用`greet.NewGreetService`,TCP 连接只会有一个\r\n\r\n所以,最佳用法是像 testReuseSvc() 中复用 `GreetService`,然后用户自己维护一个 `GreetService` 池吗?这样用起来有些麻烦。",
"createdAt": "2024-12-25T07:48:15Z",
"updatedAt": "2024-12-26T01:39:11Z",
"author": {
"login": "zhangcunli"
},
"replies": [
{
"id": "DC_kwDOCJS8R84AsmBC",
"url": "https://github.com/apache/dubbo-go/discussions/2756#discussioncomment-11690050",
"body": "@zhangcunli 反馈:1 如何 close request/response 感觉不自然; 2 tcp 连接池复用问题.\r\n\r\n测试案例:https://github.com/zhangcunli/triple-stream-test",
"createdAt": "2024-12-29T12:24:14Z",
"updatedAt": "2024-12-29T12:24:14Z",
"author": {
"login": "AlexStocks"
}
},
{
"id": "DC_kwDOCJS8R84AsmCP",
"url": "https://github.com/apache/dubbo-go/discussions/2756#discussioncomment-11690127",
"body": "> @zhangcunli 反馈:1 如何 close request/response 感觉不自然; 2 tcp 连接池复用问题.\r\n> \r\n> 测试案例:https://github.com/zhangcunli/triple-stream-test\r\n\r\n1. 双向流使用问题:\r\n#dubbo-go: v3.2.0-rc2; \r\ndubbo-go, 双向流 client 接口如下:关闭流需要调用两个接口CloseRequest、CloseResponse 才行;\r\n而且如果 server 是 java server(v3.3.0),则 CloseResponse 依赖 server 端调用 onComplete,否则会卡死\r\n```\r\n#proto 生成\r\ntype GreetService_GreetStreamClient interface {\r\n\tSpec() triple_protocol.Spec\r\n\tPeer() triple_protocol.Peer\r\n\tSend(*GreetStreamRequest) error\r\n\tRequestHeader() http.Header\r\n\tCloseRequest() error\r\n\tRecv() (*GreetStreamResponse, error)\r\n\tResponseHeader() http.Header\r\n\tResponseTrailer() http.Header\r\n\tCloseResponse() error\r\n}\r\n```\r\n\r\n如下是 grpc 双向流 client 接口:直接调用 CloseSend() 就可以关闭双向流\r\n```\r\ntype ClientStream interface {\r\n\tHeader() (metadata.MD, error)\r\n\tTrailer() metadata.MD\r\n\tCloseSend() error\r\n\tContext() context.Context\r\n\tSendMsg(m any) error\r\n\tRecvMsg(m any) error\r\n}\r\n```\r\n\r\n2.tcp 连接问题,参考上面的 demo 即可\r\n",
"createdAt": "2024-12-29T12:46:02Z",
"updatedAt": "2024-12-29T12:46:02Z",
"author": {
"login": "zhangcunli"
}
},
{
"id": "DC_kwDOCJS8R84Aukns",
"url": "https://github.com/apache/dubbo-go/discussions/2756#discussioncomment-12208620",
"body": "### 双向流通信的核心机制与资源管理要点解析\r\n\r\n一、双向流通信的核心机制\r\n在HTTP/2协议下,双向流的本质是通过`d.httpClient.Do(d.request)`建立持久化连接实现的。该接口会创建底层TCP连接,同时维护请求/响应双工通道,其中:\r\n\r\n1. 请求端管理:\r\n\r\n- 通过`requestBodyWriter *io.PipeWriter`进行请求体写入\r\n- CloseRequest()方法的核心职责:\r\n - 关闭管道写入端:`d.requestBodyWriter.Close()`\r\n - 向服务端发送流结束信号\r\n - 触发服务端onCompleted回调(Java示例中的响应终止处理)\r\n\r\n你可以在 java 的 server 端进行如下操作:\r\n\r\n```java\r\n@Override\r\npublic void onCompleted() {\r\n responseObserver.onCompleted();\r\n System.out.println(\"biStream completed\");\r\n}\r\n```\r\n\r\n1. 响应端管理:\r\n\r\n- 通过`response.Body`进行响应体读取\r\n- CloseResponse()的本质操作:`d.response.Body.Close()`\r\n\r\n二、客户端实现的最佳实践\r\n\r\n我仿照 grpc 的 sample 对客户端进行了改写\r\n\r\n```go\r\nfunc TestBiDiStream2(svc greet.GreetService) error {\r\n // 初始化流通道\r\n stream, err := svc.GreetStream(context.Background())\r\n if err != nil {\r\n return err\r\n }\r\n\r\n // 异步响应处理协程\r\n waitc := make(chan struct{})\r\n go func() {\r\n defer close(waitc)\r\n for {\r\n in, err := stream.Recv()\r\n if err != nil { // 捕获EOF或其他错误\r\n fmt.Printf(\"Recv terminal: %v\\n\", err)\r\n return\r\n }\r\n fmt.Printf(\"Response: %s\\n\", in.Greeting)\r\n }\r\n }()\r\n\r\n // 同步发送阶段\r\n for i := 0; i < 5; i++ {\r\n if err := stream.Send(&greet.GreetStreamRequest{\r\n Name: \"stream client!\"\r\n }); err != nil {\r\n return err\r\n }\r\n }\r\n\r\n // 优雅关闭流程\r\n stream.CloseRequest() // 主动终止发送\r\n <-waitc // 等待响应处理完成\r\n defer stream.CloseResponse() // 最终资源清理\r\n\r\n fmt.Println(\"Stream closed properly\")\r\n return nil\r\n}\r\n```\r\n\r\n三、资源管理的必要性\r\n\r\n为什么需要stream.CloseResponse(),我在[相关文章](https://blog.csdn.net/cljdsc/article/details/125027270)找到了如下解释\r\n\r\n> 为什么需要response.Body.Close()\r\n>\r\n> **resp.Body.Close() 做了什么?**\r\n>\r\n> 如果返回值`res`的主体未关闭,`client` 下层的 `RoundTripper` 接口(一般为 `Transport` 类型)可能无法重用 `res` 主体下层保持的 TCP 连接去执行之后的请求。所以它的作用就是用来确保body读干净,释放出该连接\r\n>\r\n> **为什么这样做?**\r\n>\r\n> 连接复用\r\n>\r\n> **如果不这么做会发生什么?**\r\n>\r\n> 第一则是:无法重新使用与服务器的持久 TCP 连接来进行后续的“保持活动”请求,在下次发起HTTP请求的时候,就会重新建立TCP连接\r\n>\r\n> 第二如果不关闭当前请求,readLoop 和 writeLoop 两个 goroutine 在 写入请求并获取 response 返回后,并没有跳出 for 循环,而继续阻塞在下一次 for 循环的 select 语句里面,goroutine 一直无法被回收,cpu 和 memory 全部打满。发生goroutine内存泄漏\r\n>\r\n> 第三如果请求完成后,对端关闭了连接(对端的HTTP服务器向我发送了FIN),如果这边不调用`response.Body.Close()`,那么可以看到与这个请求相关的TCP连接的状态一直处于`CLOSE_WAIT`状态,态,不会被系统回收,则文件描述符不会被释放,出现资源泄漏。\r\n\r\n\r\n\r\n### 关于客户端管理与TCP连接复用的澄清说明\r\n\r\n一、命名误解与技术本质\r\n\r\n1. **客户端创建的核心逻辑**\r\n `NewGreetService` 的命名虽可能引起误解,但其技术本质是**创建客户端实例**而非直接建立TCP连接。通过源码分析可见:\r\n\r\n ```go\r\n svc, err := greet.NewGreetService(cli) \r\n // 实际调用链: \r\n // => newClientManager(url) \r\n // => 初始化 transport (http.RoundTripper) \r\n ```\r\n\r\n 每个客户端实例内部维护独立的**连接池(Transport)**,负责管理底层TCP连接的复用。\r\n\r\n2. **与gRPC设计的对标性**\r\n gRPC的经典实现方式与当前方案高度一致:\r\n\r\n ```go\r\n conn := grpc.NewClient(addr) // 物理连接管理 \r\n client := pb.NewRouteGuideClient(conn) // 逻辑客户端 \r\n runRouteChat(client) // 复用连接 \r\n ```\r\n\r\n 二者的核心差异仅体现在**API抽象层级**,而非连接管理机制。\r\n\r\n二、连接复用的实现机制\r\n\r\n1. **Transport 的核心作用**\r\n\r\n - 作为 `http.RoundTripper` 接口实现,管理HTTP/2连接池\r\n - **自动复用空闲TCP连接**,减少三次握手开销\r\n - 通过 `MaxIdleConns` 等参数控制连接池行为\r\n\r\n2. **客户端生命周期管理**\r\n\r\n ```go\r\n // 正确用法:单例客户端复用 \r\n client := NewGreetService() \r\n for i := 0; i < 10; i++ { \r\n runBiDiStream(client) // 复用同一Transport \r\n } \r\n ```\r\n\r\n **关键准则**:避免重复创建客户端实例,防止产生冗余连接池。",
"createdAt": "2025-02-15T10:29:09Z",
"updatedAt": "2025-02-15T10:29:10Z",
"author": {
"login": "Similarityoung"
}
}
]
}
]
},
{
"number": 2761,
"title": "2024-12-15 weekly",
"body": "| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---- | ----- | ----- | ----- | ---- |\r\n| 分支管理 | P0 | | 张文峰&xinfan | develop 分支为开发文职,master 分支保持稳定可运行,随时可用于发版 |\r\n| triple 协议 | P0 | | 吴歆帆、方泽亚、史凤瑞、叶凯乐、孙浩然 | keepalive (xinfan+zeyang),代码已经合并到 develop 分支;后续可以基于基于 dubbogo 自身的 triple 改进继续改进: dubbogo/triple grpc-h2 分支保存 grpc 版本的 triple,develop&main 分支保存基于 Go 标准库 http2 的 triple 实现; |\r\n| 统一配置 | P1 | | | 无进展 |\r\n| 包依赖关系 | P2 | 嘉嘉: issue:[[#2741](https://github.com/apache/dubbo-go/issues/2741)](https://github.com/apache/dubbo-go/issues/2741) | 张文锋、梁嘉嘉、罗颖韬 | 嘉嘉画一个依赖关系图 |\r\n| java 转 go的proto工具 | P0 | | 何亮、梁嘉嘉、杨泽睿 | dubbo java 海星 已经实现,何亮带着相关筒子继续推进。何亮 反馈:海星的 PR 已经合并,嘉嘉和泽睿推进后续工作。 |\r\n| dubbo-admin | P0 | | 吴歆帆、罗颖韬、马超、郭暾、肖坡 | 军哥比较忙,还未进行交流,暂无进展 |\r\n| common.URL 内存泄漏 | P0 | | 吴歆帆 | doc:https://github.com/apache/dubbo-go/discussions/2750 |",
"url": "https://github.com/apache/dubbo-go/discussions/2761",
"createdAt": "2024-12-15T11:57:29Z",
"updatedAt": "2026-02-13T02:13:01Z",
"closed": true,
"closedAt": "2026-02-13T02:13:01Z",
"isAnswered": null,
"author": {
"login": "AlexStocks"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 2764,
"title": "Analysis of the common.URL memory leak",
"body": "## Background\r\n\r\nBased on the following issues\r\n\r\nhttps://github.com/apache/dubbo-go/issues/2031\r\nhttps://github.com/apache/dubbo-go/issues/2339\r\nhttps://github.com/apache/dubbo-go/issues/2701\r\n\r\nwe can see that `common.URL` has a memory leak problem. However, none of these issues mentioned the minimum steps to reproduce. Therefore, I tried to reproduce the cause of the memory leak in a generic-call scenario (the use case where I found the memory leak myself). The simulation scenario here is to make generic-call to different providers(the same provider `org.apache.dubbo.samples.UserProvider` is used in the client code for convenience.) multiple times (similar to the gateway scenario, generic-call to multiple providers as a proxy). The following are the steps to reproduce and how to use the [[goref](https://github.com/cloudwego/goref)](https://github.com/cloudwego/goref) tool for memory leak analysis.\r\n\r\n## Reproduce the memory leak of `common.URL` and use `goref` for heap object reference analysis \r\n\r\n### 1.install goref\r\n\r\nMake sure your go version is \\>= go1.21 \r\n\r\n```go\r\ngo install github.com/cloudwego/goref/cmd/grf@latest\r\n```\r\n\r\n### 2.start docker\r\n\r\nIn dubbo-go-samples root directory, all related test is based on dubbo-go-samples;\r\n\r\n```sh\r\nmake -f build/Makefile docker-up\r\n```\r\n\r\n### 3.start server \r\n\r\nfor example\r\n\r\n```sh\r\ncd ./compatibility/generic/default/go-server/cmd\r\nexport DUBBO_GO_CONFIG_PATH=\"../conf/dubbogo.yml\"\r\ngo run .\r\n```\r\n\r\n### 4.edit client code\r\n\r\nbased on [[go ref test samples](https://github.com/cloudwego/goref/blob/main/testdata/mockleak/main.go)](https://github.com/cloudwego/goref/blob/main/testdata/mockleak/main.go)\r\n\r\nfor example\r\n\r\n```sh\r\ncd ./compatibility/generic/default/go-client/cmd\r\n```\r\n\r\nimport proof\r\n\r\n```go\r\nimport _ \"net/http/pprof\"\r\n```\r\n\r\nstart to listen 6060 port, add these lines in the begining of client.go/main()\r\n\r\n```go\r\ngo func() {\r\n log.Println(http.ListenAndServe(\"127.0.0.1:6060\", nil))\r\n}()\r\n```\r\n\r\nmodify the code to simulate multiple generic-calls, i simulated a four-minute generic-calls with the following code\r\n\r\n```go\r\nfunc main() {\r\n\tgo func() {\r\n\t\tlog.Println(http.ListenAndServe(\"127.0.0.1:6060\", nil))\r\n\t}()\r\n\t// register POJOs\r\n\thessian.RegisterPOJO(&pkg.User{})\r\n\tanchorTime := time.Now()\r\n\tfor {\r\n\t\tif time.Since(anchorTime) > 4*time.Minute {\r\n\t\t\tbreak\r\n\t\t}\r\n time.Sleep(1 * time.Second)\r\n\t\tdubboRefConf := newRefConf(\"org.apache.dubbo.samples.UserProvider\", dubbo.DUBBO)\r\n\t\tcallGetUser(dubboRefConf)\r\n\t}\r\n\t//wait gc, 1 minute is enough\r\n\ttime.Sleep(1 * time.Minute)\r\n\tselect {}\r\n}\r\n```\r\n\r\nAdd script gif_test.sh\r\n\r\n```shell\r\n#!/bin/bash\r\n\r\n# set variables\r\nGO_FILE=\"client.go\"\r\n\r\nOUTPUT_BINARY=\"client_binary\"\r\nLOG_FILE=\"app.log\"\r\nPID_FILE=\"app.pid\"\r\nCONFIG_FILE=\"../conf/dubbogo.yml\"\r\nexport PATH=$PATH:$(go env GOPATH)/bin\r\nexport DUBBO_GO_CONFIG_PATH=$CONFIG_FILE\r\n\r\n# build go file\r\necho \"> Compiling $GO_FILE...\"\r\ngo build -o $OUTPUT_BINARY $GO_FILE\r\nif [ $? -ne 0 ]; then\r\n echo \"Compilation failed!\"\r\n exit 1\r\nfi\r\necho \"> Compilation successful: $OUTPUT_BINARY\"\r\n\r\n# save PID and log file\r\nnohup ./$OUTPUT_BINARY >$LOG_FILE 2>&1 &\r\necho $! >$PID_FILE\r\nPID=$(cat $PID_FILE)\r\necho \"> Application started with PID: $PID\"\r\n\r\n#wait client run and gc\r\nsleep 300\r\n\r\n#grf attach to target process\r\nif [ -n \"$PID\" ]; then\r\n echo \"> Attaching grf to process $PID...\"\r\n grf attach $PID\r\n kill -9 $PID\r\n echo \"> Killed process with PID $PID.\"\r\nelse\r\n echo \"Failed to retrieve PID!\"\r\n exit 1\r\nfi\r\n\r\n```\r\n\r\nrun this script and wait for terminal output (maybe a few minutes)\r\n\r\n```sh\r\nsuccessfully output to `grf.out`\r\n```\r\n\r\n### 5.Open grf.out file\r\n\r\ninstall `graphviz`, and then\r\n\r\n```go\r\ngo tool pprof -http=:5079 ./grf.out\r\n```\r\n\r\n### 6.Analysis flame graph\r\n\r\n\r\nclick this to get detailed heap object reference information\r\n\r\n\r\n\r\nWe can find that it is mainly` baseinvoker` that holds these `url` objects, which eventually leads to memory leaks. Since dubbo-go-samples is using the `dubbo.apache.org/dubbo-go/v3 v3.2.0-rc1` version, and the related PR to fix this momery leak issue is https://github.com/apache/dubbo-go/pull/2726 which has not been released yet. To verify whether this PR fixes the memory leak problem, i replaced the file to the local file(which keep consistent with the dubbo-go/develop branch);\r\n\r\n```\r\nreplace dubbo.apache.org/dubbo-go/v3 v3.2.0-rc1.0.20240808044912-f61d7c94bfd2 => /path/to/dubbo-go\r\n```\r\n\r\nand retest the above scenario, the final result is \r\n\r\nwe can see that there is no memory leak of `common.URL`;\r\n\r\nWelcome any discussion",
"url": "https://github.com/apache/dubbo-go/discussions/2764",
"createdAt": "2024-12-18T07:23:58Z",
"updatedAt": "2025-03-16T12:59:07Z",
"closed": false,
"closedAt": null,
"isAnswered": null,
"author": {
"login": "No-SilverBullet"
},
"category": {
"name": "General"
},
"answer": null,
"comments": [
{
"id": "DC_kwDOCJS8R84AsRt-",
"url": "https://github.com/apache/dubbo-go/discussions/2764#discussioncomment-11606910",
"body": "Another good tool is pyroscope\r\n\r\nPyroscope 是一个开源的性能分析工具,用于帮助开发者收集、查看和分析应用程序的性能数据(如 CPU 使用率、内存消耗等)。它通过采样的方式,收集程序的性能数据并提供可视化界面,以便开发者查找性能瓶颈,优化代码。\r\n\r\nPyroscope 支持多种编程语言,包括 Go、Java、Python 等,通常用于生产环境中的应用程序性能监控。\r\n\r\n### 安装 Pyroscope\r\n\r\n首先,需要在本地或服务器上安装 Pyroscope。它有多种部署方式,包括 Docker、Kubernetes、以及本地安装。\r\n\r\n#### 1. 使用 Docker 安装 Pyroscope\r\n\r\n```bash\r\ndocker run -d -p 4040:4040 pyroscope/pyroscope:latest\r\n```\r\n\r\n这将会启动一个容器,并在本地的 4040 端口上暴露 Pyroscope 的 Web 界面。\r\n\r\n#### 2. 使用 Homebrew(Mac)安装\r\n\r\n```bash\r\nbrew install pyroscope-io/pyroscope/pyroscope\r\n```\r\n\r\n#### 3. 从源代码安装\r\n\r\n如果你更喜欢从源代码安装,可以按照 Pyroscope GitHub 仓库上的 [安装指南](https://github.com/pyroscope-io/pyroscope) 进行操作。\r\n\r\n### 配置和使用 Pyroscope\r\n\r\n安装 Pyroscope 后,你需要将其集成到你的应用程序中来收集性能数据。\r\n\r\n#### 1. 启动 Pyroscope 服务\r\n\r\nPyroscope 有一个 Web 界面,可以用来查看和分析性能数据。启动 Pyroscope 后,访问 [http://localhost:4040](http://localhost:4040) 来查看性能分析数据。\r\n\r\n#### 2. 在应用中集成 Pyroscope 客户端\r\n\r\nPyroscope 提供了多个客户端库,可以帮助你将性能数据发送到 Pyroscope 服务。\r\n\r\n##### Go 示例:\r\n\r\n```go\r\nimport (\r\n \"github.com/pyroscope-io/pyroscope\"\r\n)\r\n\r\nfunc main() {\r\n // 设置 Pyroscope 客户端\r\n pyroscope.Start(pyroscope.Config{\r\n ApplicationName: \"your-app\",\r\n ServerAddress: \"http://localhost:4040\", // Pyroscope 服务器地址\r\n })\r\n \r\n // Your application logic here\r\n}\r\n```\r\n\r\n##### Python 示例:\r\n\r\n```python\r\nimport pyroscope\r\n\r\n# Set up Pyroscope client\r\npyroscope.configure(\r\n application_name=\"your-app\",\r\n server_address=\"http://localhost:4040\", # Pyroscope server address\r\n)\r\n\r\n# Your application logic here\r\n```\r\n\r\n通过这种方式,Pyroscope 客户端将会定期发送性能数据到 Pyroscope 服务器。\r\n\r\n#### 3. 查看和分析性能数据\r\n\r\n访问 Pyroscope 的 Web 界面(默认地址是 `http://localhost:4040`),你可以看到以下几种信息:\r\n\r\n- **Flame Graph**:展示每个函数调用的性能数据(CPU 使用情况),帮助你识别热点函数。\r\n- **Profile Over Time**:展示不同时间段内应用的性能波动,帮助你分析负载的变化。\r\n- **Top Functions**:显示最消耗资源的函数和方法,帮助你定位瓶颈。\r\n\r\n你可以选择不同的时间窗口、查看不同的应用等,来详细分析你的应用程序性能。\r\n\r\n### Pyroscope 的特点\r\n\r\n- **实时性能监控**:Pyroscope 可以实时收集和展示应用程序的性能数据,帮助开发者在生产环境中追踪性能瓶颈。\r\n- **可视化分析**:通过 Flame Graph 等可视化工具,帮助开发者快速定位性能问题。\r\n- **低开销**:与一些传统的性能分析工具不同,Pyroscope 具有较低的性能开销,适合在生产环境中使用。\r\n- **开源**:Pyroscope 是一个开源工具,免费供开发者使用,也支持自定义功能。\r\n\r\n### 进阶使用\r\n\r\n- **长期存储**:你可以将 Pyroscope 与长期存储系统(如 Prometheus、Elasticsearch 等)集成,方便长期追踪和历史数据分析。\r\n- **自定义指标**:除了默认的性能指标外,你还可以自定义 Pyroscope 收集的指标,结合自己应用的业务场景进行性能监控。\r\n- **集成第三方监控工具**:Pyroscope 也可以与其他监控工具(如 Grafana、Prometheus 等)进行集成,从而在同一个监控平台上查看更多的数据。\r\n\r\n### 总结\r\n\r\nPyroscope 是一个非常实用的性能分析工具,特别适合开发者在生产环境中进行应用性能监控。通过简单的安装和配置,你可以在你的应用中集成 Pyroscope,收集实时的性能数据,并通过 Pyroscope 的 Web 界面进行可视化分析,帮助你快速识别并解决性能瓶颈。",
"createdAt": "2024-12-18T15:15:13Z",
"updatedAt": "2024-12-18T15:20:42Z",
"author": {
"login": "AlexStocks"
},
"replies": []
},
{
"id": "DC_kwDOCJS8R84AsRu7",
"url": "https://github.com/apache/dubbo-go/discussions/2764#discussioncomment-11606971",
"body": "在 Go 程序中,**内存泄漏**是一个常见且严重的问题,它会导致程序内存消耗不断增加,最终可能引起系统崩溃或严重性能下降。使用 Pyroscope 进行内存泄漏检测可以帮助你实时监控程序的内存使用情况,发现潜在的内存泄漏问题。\r\n\r\n下面是如何使用 Pyroscope 来检测 Go 程序中的内存泄漏:\r\n\r\n### 1. 安装并启动 Pyroscope\r\n\r\n首先,确保 Pyroscope 已经安装并启动。在本地测试时,可以通过 Docker 启动 Pyroscope 服务:\r\n\r\n```bash\r\ndocker run -d -p 4040:4040 pyroscope/pyroscope:latest\r\n```\r\n\r\n这将会在 `localhost:4040` 上启动 Pyroscope Web 界面,供你查看和分析数据。\r\n\r\n### 2. 集成 Pyroscope 到你的 Go 程序\r\n\r\n要在 Go 程序中集成 Pyroscope 进行内存分析,你需要使用 Pyroscope Go 客户端。按照以下步骤操作:\r\n\r\n#### 安装 Pyroscope Go 客户端\r\n\r\n通过 `go get` 命令安装 Pyroscope 客户端:\r\n\r\n```bash\r\ngo get github.com/pyroscope-io/pyroscope\r\n```\r\n\r\n#### 配置 Pyroscope 客户端\r\n\r\n在你的 Go 程序中引入 Pyroscope 库,并进行配置,启用内存采样。\r\n\r\n```go\r\npackage main\r\n\r\nimport (\r\n \"github.com/pyroscope-io/pyroscope\"\r\n \"log\"\r\n \"time\"\r\n)\r\n\r\nfunc main() {\r\n // 配置 Pyroscope 客户端,指定应用名称和 Pyroscope 服务器地址\r\n err := pyroscope.Start(pyroscope.Config{\r\n ApplicationName: \"your-go-app\",\r\n ServerAddress: \"http://localhost:4040\", // Pyroscope 服务器地址\r\n })\r\n if err != nil {\r\n log.Fatalf(\"Error starting pyroscope: %v\", err)\r\n }\r\n\r\n // 模拟内存使用,可能引发内存泄漏\r\n for {\r\n leakMemory()\r\n time.Sleep(5 * time.Second)\r\n }\r\n}\r\n\r\n// 模拟内存泄漏的函数\r\nfunc leakMemory() {\r\n // 创建一个大的数组或对象,模拟内存泄漏\r\n _ = make([]byte, 10*1024*1024) // 分配 10MB 内存\r\n}\r\n```\r\n\r\n#### 代码说明:\r\n\r\n- `pyroscope.Start()` 启动 Pyroscope 客户端,并指定应用名称和服务器地址。\r\n- `leakMemory()` 函数每隔一段时间分配新的内存,这样就能模拟内存泄漏的情况。\r\n\r\n### 3. 查看内存分析数据\r\n\r\n在程序运行时,Pyroscope 会定期采样内存使用情况。你可以通过访问 Pyroscope 的 Web 界面(默认地址为 `http://localhost:4040`)来查看内存使用情况。\r\n\r\n在 Pyroscope Web 界面中,你会看到以下内容:\r\n\r\n1. **Flame Graph(火焰图)**:展示 CPU 和内存的调用栈。通过火焰图,你可以直观地看到哪些函数在消耗最多的内存。\r\n2. **Heap Profile(堆分析)**:展示程序中内存分配的情况。如果你看到内存分配量持续增加而没有释放,可能表明存在内存泄漏。\r\n3. **Time Series(时间序列)**:展示内存使用的变化趋势。通过时间轴,你可以观察内存使用情况是否在不断增长,从而发现潜在的内存泄漏问题。\r\n\r\n### 4. 分析内存泄漏\r\n\r\n- 在 Pyroscope Web 界面中,你可以选择查看 `Heap`(堆内存)相关的指标,观察内存的增长趋势。如果发现内存使用量持续增加,且没有明显的下降趋势,可能表明存在内存泄漏。\r\n- **内存分配的热点**:通过分析 Flame Graph,你可以确定内存泄漏是否与特定的函数或操作相关。\r\n \r\n### 5. 使用 Pyroscope 收集更多内存信息\r\n\r\n除了使用 Pyroscope 进行基础的内存分析,你还可以利用 Pyroscope 来收集更多的内存相关数据:\r\n\r\n#### 启用内存分析\r\n\r\nPyroscope 允许你分析堆、栈和内存分配等信息。你可以在配置文件中启用内存采样:\r\n\r\n```go\r\nerr := pyroscope.Start(pyroscope.Config{\r\n ApplicationName: \"your-go-app\",\r\n ServerAddress: \"http://localhost:4040\", // Pyroscope 服务器地址\r\n ProfileTypes: []pyroscope.ProfileType{\r\n pyroscope.TypeCPU,\r\n pyroscope.TypeAllocations,\r\n },\r\n})\r\n```\r\n\r\n在这个配置中,`pyroscope.TypeAllocations` 会启用内存分配的采样,这对于检测内存泄漏非常有用。\r\n\r\n### 6. 其他注意事项\r\n\r\n- **调优采样频率**:如果你需要更精细的内存分析,可以调整 Pyroscope 的采样频率。采样频率过低可能导致漏掉一些重要的内存分配,而过高则可能对程序性能产生影响。\r\n \r\n 你可以通过以下方式设置采样间隔(单位:秒):\r\n \r\n ```go\r\n err := pyroscope.Start(pyroscope.Config{\r\n ApplicationName: \"your-go-app\",\r\n ServerAddress: \"http://localhost:4040\",\r\n ProfileInterval: 1 * time.Second, // 设置每秒采样一次\r\n })\r\n ```\r\n\r\n- **结合其它监控工具**:如果 Pyroscope 检测到内存泄漏,可以结合其他监控工具(如 Prometheus、Grafana)进一步深入分析,做出优化。\r\n\r\n### 总结\r\n\r\n- **Pyroscope** 通过实时内存采样,可以帮助你发现 Go 程序中的内存泄漏问题,尤其适合在生产环境中使用。\r\n- **Heap Profile** 和 **Flame Graph** 是分析内存泄漏的关键工具,能够帮助你识别内存使用的热点和增长趋势。\r\n- 结合 Pyroscope 的内存分析和其它监控工具,你可以更高效地解决内存泄漏问题,优化应用程序的内存管理。",
"createdAt": "2024-12-18T15:20:00Z",
"updatedAt": "2024-12-18T15:20:01Z",
"author": {
"login": "AlexStocks"
},
"replies": [
{
"id": "DC_kwDOCJS8R84AsTZC",
"url": "https://github.com/apache/dubbo-go/discussions/2764#discussioncomment-11613762",
"body": "use `pyroscope`(https://grafana.com/docs/pyroscope/latest/get-started/), client code is almost same with the `goref` test\r\n\r\n```go\r\nfunc main() {\r\n\t// register POJOs\r\n\tserverAddress := os.Getenv(\"PYROSCOPE_SERVER_ADDRESS\")\r\n\tif serverAddress == \"\" {\r\n\t\tserverAddress = \"http://localhost:4040\"\r\n\t}\r\n\t_, err := pyroscope.Start(pyroscope.Config{\r\n\t\tApplicationName: \"generic-call-cache.test.app.20minutes\",\r\n\t\tServerAddress: serverAddress,\r\n\t\tLogger: pyroscope.StandardLogger,\r\n\t\tProfileTypes: []pyroscope.ProfileType{\r\n\t\t\tpyroscope.ProfileAllocObjects,\r\n\t\t\tpyroscope.ProfileAllocSpace,\r\n\t\t\tpyroscope.ProfileInuseObjects,\r\n\t\t\tpyroscope.ProfileInuseSpace,\r\n\t\t},\r\n\t})\r\n\tif err != nil {\r\n\t\tlog.Fatalf(\"error starting pyroscope profiler: %v\", err)\r\n\t}\r\n\thessian.RegisterPOJO(&pkg.User{})\r\n\tanchorTime := time.Now()\r\n\tdubboRefConf := newRefConf(\"org.apache.dubbo.samples.UserProvider\", dubbo.DUBBO)\r\n\tfor {\r\n\t\tif time.Since(anchorTime) > 4*time.Minute {\r\n\t\t\tbreak\r\n\t\t}\r\n\t\ttime.Sleep(1 * time.Second)\r\n\t\tcallGetUser(dubboRefConf)\r\n\t}\r\n\tselect {}\r\n}\r\n```\r\n\r\nfinal result is \r\n\r\n\r\n",
"createdAt": "2024-12-19T07:07:18Z",
"updatedAt": "2024-12-19T07:07:19Z",
"author": {
"login": "No-SilverBullet"
}
}
]
},
{
"id": "DC_kwDOCJS8R84AsRvV",
"url": "https://github.com/apache/dubbo-go/discussions/2764#discussioncomment-11606997",
"body": "`github.com/cloudwego/goref` 是一个用于 Go 项目的函数调用图生成工具,它可以帮助开发者分析和可视化 Go 项目中的函数调用关系。它通过静态分析 Go 源代码,自动生成函数调用图,帮助开发者更好地理解代码结构和调用流程。\r\n\r\n### 1. 安装 `goref`\r\n\r\n你可以通过 `go install` 命令安装 `goref` 工具:\r\n\r\n```bash\r\ngo install github.com/cloudwego/goref/cmd/goref@latest\r\n```\r\n\r\n这将会安装 `goref` 命令行工具,并将其放在 `GOPATH/bin` 目录下。\r\n\r\n### 2. 使用 `goref` 生成函数调用图\r\n\r\n在安装完成后,你就可以使用 `goref` 来生成你的 Go 项目的函数调用图了。\r\n\r\n#### 基本命令\r\n\r\n你可以在 Go 项目的根目录中运行以下命令来生成函数调用图:\r\n\r\n```bash\r\ngoref -dir ./path/to/your/project\r\n```\r\n\r\n这里的 `-dir` 参数是指定你的 Go 项目的目录。你也可以使用其他参数来调整输出和过滤规则。\r\n\r\n#### 其他常用命令参数\r\n\r\n- `-dir`:指定要分析的 Go 项目目录。\r\n- `-output`:指定输出的文件路径,默认是 `callgraph.svg`。\r\n- `-format`:指定输出的格式,支持 `svg` 和 `dot` 格式。\r\n- `-pkg`:指定要分析的特定包(如果你只想分析某个包而不是整个项目)。\r\n- `-exclude`:排除某些文件或目录不进行分析。\r\n\r\n#### 示例\r\n\r\n1. **生成默认的 SVG 格式的函数调用图**:\r\n\r\n 如果你想生成项目的函数调用图并输出为 `callgraph.svg`:\r\n\r\n ```bash\r\n goref -dir ./path/to/your/project\r\n ```\r\n\r\n2. **生成 `dot` 格式的调用图**:\r\n\r\n 如果你希望输出 Graphviz 的 `dot` 格式,可以使用以下命令:\r\n\r\n ```bash\r\n goref -dir ./path/to/your/project -format dot -output callgraph.dot\r\n ```\r\n\r\n3. **指定输出路径和文件名**:\r\n\r\n 你可以自定义输出路径和文件名:\r\n\r\n ```bash\r\n goref -dir ./path/to/your/project -output /path/to/output/callgraph.svg\r\n ```\r\n\r\n### 3. 查看和分析函数调用图\r\n\r\n`goref` 默认生成的函数调用图是一个 **SVG** 格式的图像文件。你可以在浏览器中查看该文件,或使用支持 SVG 的图片查看工具来查看。\r\n\r\n如果你选择输出 **dot** 格式的调用图,可以将其导入到 Graphviz 工具中生成图形:\r\n\r\n```bash\r\ndot -Tsvg callgraph.dot -o callgraph.svg\r\n```\r\n\r\n这会将 `dot` 格式的调用图转换为 `svg` 格式,便于查看和分析。\r\n\r\n### 4. 如何分析函数调用图\r\n\r\n生成的函数调用图会列出项目中函数之间的调用关系。你可以通过图形查看哪些函数之间有调用关系,以及这些关系是如何层次化的。这对于以下几种情况非常有用:\r\n\r\n- **理解代码结构**:特别是当项目中有复杂的函数调用时,调用图可以帮助你更清楚地理解代码的结构。\r\n- **优化代码**:通过查看哪些函数调用最频繁或依赖最多,你可以发现潜在的性能瓶颈或复杂的依赖关系。\r\n- **重构代码**:如果你想重构代码,函数调用图可以帮助你清晰地识别出需要重构的模块或函数。\r\n\r\n### 5. 高级用法\r\n\r\n除了最基本的生成函数调用图的操作,`goref` 还支持一些更高级的用法。例如,你可以指定只分析特定的包或排除不需要的代码。\r\n\r\n#### 仅分析特定包\r\n\r\n如果你只关心项目中的某个特定包,可以通过 `-pkg` 参数指定包路径:\r\n\r\n```bash\r\ngoref -dir ./path/to/your/project -pkg mypackage\r\n```\r\n\r\n#### 排除某些目录或文件\r\n\r\n如果你希望排除某些不需要的文件或目录,可以使用 `-exclude` 参数:\r\n\r\n```bash\r\ngoref -dir ./path/to/your/project -exclude ./path/to/exclude_dir\r\n```\r\n\r\n这会让 `goref` 排除指定的目录或文件,从而减少分析的范围。\r\n\r\n### 6. 总结\r\n\r\n`goref` 是一个非常有用的工具,它通过静态分析 Go 代码生成函数调用图,帮助开发者理解代码中的函数调用关系。以下是 `goref` 的一些常用功能:\r\n\r\n- 自动生成函数调用图。\r\n- 支持输出多种格式(SVG、DOT)。\r\n- 可以自定义输出路径、过滤特定目录或包。\r\n\r\n通过使用 `goref`,你可以更容易地理解 Go 项目的代码结构,发现潜在的问题,并进行有效的性能优化和代码重构。",
"createdAt": "2024-12-18T15:22:38Z",
"updatedAt": "2024-12-18T15:22:38Z",
"author": {
"login": "AlexStocks"
},
"replies": []
},
{
"id": "DC_kwDOCJS8R84AsTZv",
"url": "https://github.com/apache/dubbo-go/discussions/2764#discussioncomment-11613807",
"body": "My question is, is this simulation scenario reasonable? are there any other scenarios that can reproduce the problem? ",
"createdAt": "2024-12-19T07:12:51Z",
"updatedAt": "2024-12-19T07:12:52Z",
"author": {
"login": "No-SilverBullet"
},
"replies": []
},
{
"id": "DC_kwDOCJS8R84AsW09",
"url": "https://github.com/apache/dubbo-go/discussions/2764#discussioncomment-11627837",
"body": "如果在执行泛化调用场景下复现时出现以下如图所示的错误(原因是不支持无参数的泛化调用)\r\n\r\n\r\n参考这个pr https://github.com/apache/dubbo-go-samples/pull/790",
"createdAt": "2024-12-20T11:31:07Z",
"updatedAt": "2024-12-20T11:31:20Z",
"author": {
"login": "1kasa"
},
"replies": []
},
{
"id": "DC_kwDOCJS8R84Avvm4",
"url": "https://github.com/apache/dubbo-go/discussions/2764#discussioncomment-12515768",
"body": "@luoyingtao",
"createdAt": "2025-03-16T12:59:07Z",
"updatedAt": "2025-03-16T12:59:08Z",
"author": {
"login": "AlexStocks"
},
"replies": []
}
]
},
{
"number": 2770,
"title": "2024-12-29 weekly",
"body": "## core work\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---- | ----- | ----- | ----- | ---- |\r\n| triple 协议 | P0 | https://github.com/apache/dubbo-go/issues/2263 | 吴歆帆、方泽亚、史凤瑞、叶凯乐 | keepalive (xinfan+zeyang),代码已经合并到 develop 分支;后续可以基于基于 dubbogo 自身的 triple 改进继续改进: dubbogo/triple grpc-h2 分支保存 grpc 版本的 triple,develop&main 分支保存基于 Go 标准库 http2 的 triple 实现;
歆帆:后续基于 gRPC 作 triple 协议的连接池。【泽亚+凤瑞】 |\r\n| 包依赖关系 | P2 | https://github.com/apache/dubbo-go/issues/2377,https://github.com/apache/dubbo-go/issues/2343,嘉嘉: issue:[[#2741](https://github.com/apache/dubbo-go/issues/2741)](https://github.com/apache/dubbo-go/issues/2741) | 张文锋、梁嘉嘉、罗颖韬 | 嘉嘉画一个依赖关系图 |\r\n| dubbo-admin | P0 | | 吴歆帆、罗颖韬、马超、郭暾、肖坡 | 军哥比较忙,还未进行交流,暂无进展 |\r\n| 易用性改进 | P1 | https://github.com/apache/dubbo-go/issues/2265, https://github.com/apache/dubbo-go/issues/2326 | | |\r\n| dubbo-go路由接口的改进 | P1 | https://github.com/apache/dubbo-go/issues/2283 | | |\r\n| 服务调用时 schema 前缀改进 | P1 | https://github.com/apache/dubbo-go/pull/2484,https://github.com/apache/dubbo-go/issues/2488 | | |\r\n\r\n## RPC Communication\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---- | ----- | ----- | ----- | ---- |\r\n| client can't get attachments which is set from server | P1 | https://github.com/apache/dubbo-go/issues/2641 | | |\r\n| attachment 丢失 | P0 | https://github.com/apache/dubbo-go/issues/2752, https://github.com/apache/dubbo-go/issues/2582 | zhangcunli&文锋&梁嘉嘉 | |\r\n| common.URL 内存泄漏 | P0 | | 吴歆帆 | doc:https://github.com/apache/dubbo-go/discussions/2750,https://github.com/apache/dubbo-go/discussions/2764,https://github.com/apache/dubbo-go/discussions/2770 罗颖韬 跟 歆帆沟通后,推进相关工作。 |\r\n| 内存&goroutine 泄漏 | P0 | https://github.com/apache/dubbo-go/issues/2722,https://github.com/apache/dubbo-go/issues/2709,https://github.com/apache/dubbo-go/issues/2699, https://github.com/apache/dubbo-go/issues/2683, https://github.com/apache/dubbo-go/issues/2678 | 歆帆&罗颖韬 | |\r\n| v3.2 使用问题 | P0 | https://github.com/apache/dubbo-go/issues/2707 https://github.com/apache/dubbo-go/issues/2703 | 文锋 | |\r\n| data race 问题 | P1 | https://github.com/apache/dubbo-go/issues/2277 | | |\r\n| 超时问题改进 | P1 | https://github.com/apache/dubbo-go/issues/2302 | | |\r\n| 直连问题 | P1 | https://github.com/apache/dubbo-go/issues/2342 | | |\r\n| 接口级别注册时,泛化调用需要请求两次才能正常返回结果 | P2 | https://github.com/apache/dubbo-go/issues/2591 | | |\r\n| Provides group version support for the reflection service | P1 | https://github.com/apache/dubbo-go/issues/2567 | | |\r\n| 服务治理能力优化 | P1 | https://github.com/apache/dubbo-go/issues/2318 | Alex | |\r\n\r\n### Java & Go\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---- | ----- | ----- | ----- | ---- |\r\n| 调用java服务端高版本返回的数据过大时报错 | P1 | https://github.com/apache/dubbo-go/issues/2544 | | |\r\n| Failed to invoke the method com.***.****.XxxxService .No provider is available because can't connect server | P1 | https://github.com/apache/dubbo-go/issues/2607 | | |\r\n| dubbo-go 调用JAVA-DUBBO 时 moniter 的相关问题 | P1 | https://github.com/apache/dubbo-go/issues/2431 | | |\r\n\r\n## Registry\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---- | ----- | ----- | ----- | ---- |\r\n| Same address cannot distinguish different registry center | P1 | https://github.com/apache/dubbo-go/issues/2524 | | | \r\n| dubbo-go@v3.1.0获取不到nacos配置 | P1 | https://github.com/apache/dubbo-go/issues/2580 | | |\r\n| dubbo go与java使用nacos作为注册中心,获取应用metadata的方式不一致导致获取不到provider | P1 | https://github.com/apache/dubbo-go/issues/2543 | | |\r\n\r\n## Codec Protocol\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---- | ----- | ----- | ----- | ---- |\r\n| Rest protocol | P1 | https://github.com/apache/dubbo-go/issues/2513 | | |\r\n| dubbo protocol and dubbo-go-hessian2 can not process (*int32)(nil) corner case | P0 | https://github.com/apache/dubbo-go/issues/2517 | | |\r\n| the default maxMsgLength for getty param | P1 | https://github.com/apache/dubbo-go/issues/2619 | | |\r\n| [Proposal] Unified IDL control for multiple protocols | P1 | https://github.com/apache/dubbo-go/issues/2595 | | |\r\n\r\n### Protocol(triple)\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---- | ----- | ----- | ----- | ---- |\r\n| triple 使用 | P0 | https://github.com/apache/dubbo-go/issues/2755 | zhangcunli&歆帆 | related discussion,https://github.com/apache/dubbo-go/discussions/2756 |\r\n| Triple header/trailer usage pattern proposal | P1 | https://github.com/apache/dubbo-go/issues/2422 | | 这里说明了新 triple 实现的一些细节问题 |\r\n| 在 Triple 协议下,配置最大消息长度无效 | P1 | https://github.com/apache/dubbo-go/issues/2487 | | |\r\n | Reverse package dependency found: triple is replying on server | P1 | https://github.com/apache/dubbo-go/issues/2482 | | |\r\n| protoc-gen-triple 插件与生成代码package路径的讨论 | P1 | https://github.com/apache/dubbo-go/issues/2475 | | |\r\n| [DISCUSS] should server package support configuring more RPC features? | P1 | https://github.com/apache/dubbo-go/issues/2462 | | |\r\n| Triple non-proto mode support | P2 | https://github.com/apache/dubbo-go/issues/2491 | | |\r\n| Move sample code in protocol.triple.internal package to apache/dubbo-go-samples | P1 | https://github.com/apache/dubbo-go/issues/2498 | | |\r\n| Triple needs to support register Non-IDL service for backward compatibility | P1 | https://github.com/apache/dubbo-go/issues/2542 | | |\r\n| Multi Protocols doesn't work on Nacos | P1 | https://github.com/apache/dubbo-go/issues/2581 | | |\r\n| triple request missed http header like scheme, host etc. | P1 | https://github.com/apache/dubbo-go/issues/2642 | | |\r\n| can't go build on protoc-gen-go-triple | P1 | https://github.com/apache/dubbo-go/issues/2649 | | |\r\n\r\n## obersavability\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---- | ----- | ----- | ----- | ---- |\r\n| [Triple] Add XXX filter automatically when XXX is enabled | P1 |https://github.com/apache/dubbo-go/issues/2505 | | |\r\n| dubbo-go 3.2 grafana 大盘 | P1 | https://github.com/apache/dubbo-go/issues/2520 | | |\r\n| dubbo v3 版本已经没有这个api设置日志对象的支持 | P1 | https://github.com/apache/dubbo-go/issues/2526 | P1 | |\r\n| Triple OpenTelemetry support | P1 | https://github.com/apache/dubbo-go/issues/2554 | | |\r\n| 可观测性改进 | P1 | https://github.com/apache/dubbo-go/issues/2315 | | | \r\n\r\n## tools\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---- | ----- | ----- | ----- | ---- |\r\n| java 转 go的proto工具 | P0 | | 何亮、梁嘉嘉、杨泽睿 | dubbo java 海星 已经实现,何亮带着相关筒子继续推进。嘉嘉反馈:等待何亮一些工作完成后继续推进。 |\r\n\r\n## long-term work\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---- | ----- | ----- | ----- | ---- |\r\n| Summarized todos for #2441 | P1 | https://github.com/apache/dubbo-go/issues/2442 | | |\r\n| Dubbo3 api design | P1 | https://github.com/apache/dubbo-go/issues/2441 | | |\r\n| dubb-go and dubbo-java compatiable | P1 | https://github.com/apache/dubbo-go/issues/2578 | | |\r\n| 2024.04.26 weekly | P1 | https://github.com/apache/dubbo-go/issues/2667 | | |\r\n| 2022 年制定的一些长期规划 | P0 | https://github.com/apache/dubbo-go/issues/2136 | Alex | |\r\n| healthcheck的设计和未来版本的讨论 | P1 | https://github.com/apache/dubbo-go/issues/2490 | FinalIT | | |\r\n| Sample and test-case tasks | P1 | https://github.com/apache/dubbo-go/issues/2608 | | |\r\n| Some feature plan and thoughts | P1 | https://github.com/apache/dubbo-go/issues/2610 | | |",
"url": "https://github.com/apache/dubbo-go/discussions/2770",
"createdAt": "2024-12-29T11:56:29Z",
"updatedAt": "2026-02-13T02:15:12Z",
"closed": true,
"closedAt": "2026-02-13T02:15:12Z",
"isAnswered": null,
"author": {
"login": "AlexStocks"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 2771,
"title": "2025-01-05 weekly",
"body": "## RPC Communication\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---- | ----- | ----- | ----- | ---- |\r\n| dubbo-go路由接口的改进 | P1 | https://github.com/apache/dubbo-go/issues/2283 | 文锋 | |\r\n| client can't get attachments which is set from server | P1 | https://github.com/apache/dubbo-go/issues/2641 | | |\r\n| attachment 丢失 | P0 | https://github.com/apache/dubbo-go/issues/2752, https://github.com/apache/dubbo-go/issues/2582 | zhangcunli&文锋&梁嘉嘉 | |\r\n| common.URL,、内存、goroutine 泄漏 | P0 | https://github.com/apache/dubbo-go/issues/2722,https://github.com/apache/dubbo-go/issues/2709,https://github.com/apache/dubbo-go/issues/2699, https://github.com/apache/dubbo-go/issues/2683, https://github.com/apache/dubbo-go/issues/2678 | 吴歆帆&罗颖韬 | doc:https://github.com/apache/dubbo-go/discussions/2750,https://github.com/apache/dubbo-go/discussions/2764 跟 歆帆沟通后,推进相关工作。 |\r\n| v3.2 使用问题 | P0 | https://github.com/apache/dubbo-go/issues/2707 https://github.com/apache/dubbo-go/issues/2703 | 文锋 | |\r\n| data race 问题 | P1 | https://github.com/apache/dubbo-go/issues/2277 | 泽亚 | 泽亚能复现,有空解决下 |\r\n| 超时问题改进 | P1 | https://github.com/apache/dubbo-go/issues/2302 | | |\r\n| 直连问题 | P1 | https://github.com/apache/dubbo-go/issues/2342 | | |\r\n| 接口级别注册时,泛化调用需要请求两次才能正常返回结果 | P2 | https://github.com/apache/dubbo-go/issues/2591 | | |\r\n| Provides group version support for the reflection service | P1 | https://github.com/apache/dubbo-go/issues/2567 | | |\r\n| 服务治理能力优化 | P1 | https://github.com/apache/dubbo-go/issues/2318 | Alex | |\r\n\r\n### Java & Go\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---- | ----- | ----- | ----- | ---- |\r\n| 调用java服务端高版本返回的数据过大时报错 | P1 | https://github.com/apache/dubbo-go/issues/2544 | | |\r\n| Failed to invoke the method com.***.****.XxxxService .No provider is available because can't connect server | P1 | https://github.com/apache/dubbo-go/issues/2607 | | |\r\n| dubbo-go 调用JAVA-DUBBO 时 moniter 的相关问题 | P1 | https://github.com/apache/dubbo-go/issues/2431 | | |\r\n\r\n## Registry\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---- | ----- | ----- | ----- | ---- |\r\n| Same address cannot distinguish different registry center | P1 | https://github.com/apache/dubbo-go/issues/2524 | | | \r\n| dubbo-go@v3.1.0获取不到nacos配置 | P1 | https://github.com/apache/dubbo-go/issues/2580 | | |\r\n| dubbo go与java使用nacos作为注册中心,获取应用metadata的方式不一致导致获取不到provider | P1 | https://github.com/apache/dubbo-go/issues/2543 | | |\r\n\r\n## Codec Protocol\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---- | ----- | ----- | ----- | ---- |\r\n| Rest protocol | P1 | https://github.com/apache/dubbo-go/issues/2513 | | |\r\n| dubbo protocol and dubbo-go-hessian2 can not process (*int32)(nil) corner case | P0 | https://github.com/apache/dubbo-go/issues/2517 | | |\r\n| the default maxMsgLength for getty param | P1 | https://github.com/apache/dubbo-go/issues/2619 | | |\r\n| [Proposal] Unified IDL control for multiple protocols | P1 | https://github.com/apache/dubbo-go/issues/2595 | | |\r\n\r\n### Protocol(triple)\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---- | ----- | ----- | ----- | ---- |\r\n| triple 协议 | P0 | https://github.com/apache/dubbo-go/issues/2263 | 吴歆帆、方泽亚、史凤瑞、叶凯乐 | 【泽亚+凤瑞】在推进连接池 |\r\n| triple 使用 | P0 | https://github.com/apache/dubbo-go/issues/2755 | zhangcunli&歆帆,实际参与人 杨泽睿 | related discussion,https://github.com/apache/dubbo-go/discussions/2756 |\r\n| Triple header/trailer usage pattern proposal | P1 | https://github.com/apache/dubbo-go/issues/2422 | | 这里说明了新 triple 实现的一些细节问题 |\r\n| 在 Triple 协议下,配置最大消息长度无效 | P1 | https://github.com/apache/dubbo-go/issues/2487 | 凯乐 | |\r\n | Reverse package dependency found: triple is replying on server | P1 | https://github.com/apache/dubbo-go/issues/2482 | 泽亚 | |\r\n| protoc-gen-triple 插件与生成代码package路径的讨论 | P1 | https://github.com/apache/dubbo-go/issues/2475 | 泽亚 | |\r\n| [DISCUSS] should server package support configuring more RPC features? | P1 | https://github.com/apache/dubbo-go/issues/2462 | | |\r\n| Triple non-proto mode support | P2 | https://github.com/apache/dubbo-go/issues/2491 | | |\r\n| Move sample code in protocol.triple.internal package to apache/dubbo-go-samples | P1 | https://github.com/apache/dubbo-go/issues/2498 | 泽亚 | |\r\n| Triple needs to support register Non-IDL service for backward compatibility | P1 | https://github.com/apache/dubbo-go/issues/2542 | 泽亚 | |\r\n| Multi Protocols doesn't work on Nacos | P1 | https://github.com/apache/dubbo-go/issues/2581 | 歆帆 | |\r\n| triple request missed http header like scheme, host etc. | P1 | https://github.com/apache/dubbo-go/issues/2642 | 歆帆 | |\r\n| 服务调用时 schema 前缀改进 | P1 | https://github.com/apache/dubbo-go/pull/2484,https://github.com/apache/dubbo-go/issues/2488 | | |\r\n\r\n\r\n## obersavability\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---- | ----- | ----- | ----- | ---- |\r\n| [Triple] Add XXX filter automatically when XXX is enabled | P1 |https://github.com/apache/dubbo-go/issues/2505 | | |\r\n| dubbo-go 3.2 grafana 大盘 | P1 | https://github.com/apache/dubbo-go/issues/2520 | | |\r\n| dubbo v3 版本已经没有这个api设置日志对象的支持 | P1 | https://github.com/apache/dubbo-go/issues/2526 | P1 | |\r\n| Triple OpenTelemetry support | P1 | https://github.com/apache/dubbo-go/issues/2554 | | |\r\n| 可观测性改进 | P1 | https://github.com/apache/dubbo-go/issues/2315 | | | \r\n\r\n## tools\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---- | ----- | ----- | ----- | ---- |\r\n| java 转 go的proto工具 | P0 | | 何亮、梁嘉嘉、杨泽睿 | dubbo java 海星 已经实现,何亮带着相关筒子继续推进。嘉嘉反馈:等待何亮一些工作完成后继续推进,最近联系不上 何亮。 |\r\n\r\n## long-term work\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---- | ----- | ----- | ----- | ---- |\r\n| 易用性改进 | P1 | https://github.com/apache/dubbo-go/issues/2265, https://github.com/apache/dubbo-go/issues/2326 | | |\r\n| Summarized todos for #2441 | P1 | https://github.com/apache/dubbo-go/issues/2442 | | |\r\n| Dubbo3 api design | P1 | https://github.com/apache/dubbo-go/issues/2441 | | |\r\n| dubb-go and dubbo-java compatiable | P1 | https://github.com/apache/dubbo-go/issues/2578 | | |\r\n| 2024.04.26 weekly | P1 | https://github.com/apache/dubbo-go/issues/2667 | | |\r\n| 2022 年制定的一些长期规划 | P0 | https://github.com/apache/dubbo-go/issues/2136 | Alex | |\r\n| healthcheck的设计和未来版本的讨论 | P1 | https://github.com/apache/dubbo-go/issues/2490 | FinalIT | | |\r\n| Sample and test-case tasks | P1 | https://github.com/apache/dubbo-go/issues/2608 | | |\r\n| Some feature plan and thoughts | P1 | https://github.com/apache/dubbo-go/issues/2610 | | |\r\n| 包依赖关系 | P2 | https://github.com/apache/dubbo-go/issues/2377,https://github.com/apache/dubbo-go/issues/2343,嘉嘉: issue:[[#2741](https://github.com/apache/dubbo-go/issues/2741)](https://github.com/apache/dubbo-go/issues/2741) | 张文锋、梁嘉嘉、罗颖韬 | |",
"url": "https://github.com/apache/dubbo-go/discussions/2771",
"createdAt": "2025-01-05T11:58:26Z",
"updatedAt": "2026-02-13T02:12:37Z",
"closed": true,
"closedAt": "2026-02-13T02:12:37Z",
"isAnswered": null,
"author": {
"login": "AlexStocks"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 2773,
"title": "2025-01-12 weekly",
"body": "
RPC Communication
\r\nItem | Priority | Issue/Pr | Owner | Description\r\n-- | -- | -- | -- | --\r\ndubbo-go路由接口的改进 | P1 | #2283 | 文锋 | \r\nclient can't get attachments which is set from server | P1 | #2641 | | \r\nattachment 丢失 | P0 | #2752, #2582 | zhangcunli&文锋&梁嘉嘉 | 嘉嘉尝试复现中\r\ncommon.URL,、内存、goroutine 泄漏 | P0 | https://github.com/apache/dubbo-go/issues/2722,https://github.com/apache/dubbo-go/issues/2709,https://github.com/apache/dubbo-go/issues/2699, #2683, #2678 | 吴歆帆&罗颖韬 | doc:https://github.com/apache/dubbo-go/discussions/2750,https://github.com/apache/dubbo-go/discussions/2764 跟 歆帆沟通后,推进相关工作。\r\nv3.2 使用问题 | P0 | #2707 #2703 | 文锋 | \r\ndata race 问题 | P1 | #2277 | 泽亚 | 泽亚能复现,有空解决下\r\n超时问题改进 | P1 | #2302 | 歆帆 | \r\n接口级别注册时,泛化调用需要请求两次才能正常返回结果 | P2 | #2591 | 凤瑞 | \r\nProvides group version support for the reflection service | P1 | #2567 | | \r\n服务治理能力优化 | P1 | #2318 | AlexStocks | \r\n\r\n2025规划
1.triple稳定性,解决之前被识别到的issue
2.triple重构,triple和grpc的关系,一个是基于grpc-go的实现,另外一个基于connect-rpc。
目标基于connect-rpc去做连接管理。
3.内存泄漏问题的定位与解决,需要找一些用户看有没有遇到对应的问题,帮助定位
4.error分类,consumer调用provider过程中可能会出现多种异常,网络异常、序列化异常、server侧、业务异常、http错误码的映射,参考grpc、connect-rpc的error分类。
5.服务发现,了解应用发现、接口发现,确保服务发现机制正常运行,提升稳定性。
6.xDS,proxyless,参考java侧的文档、成果
## RPC Communication\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| --------------------------------------------------------- | -------- | ------------------------------------------------------------ | ---------------------- | ------------------------------------------------------------ |\r\n| dubbo-go路由接口的改进 | P1 | [[#2283](https://github.com/apache/dubbo-go/issues/2283)](https://github.com/apache/dubbo-go/issues/2283) | 文锋 | |\r\n| client can't get attachments which is set from server | P1 | [[#2641](https://github.com/apache/dubbo-go/issues/2641)](https://github.com/apache/dubbo-go/issues/2641) | | |\r\n| attachment 丢失 | P0 | [[#2752](https://github.com/apache/dubbo-go/issues/2752)](https://github.com/apache/dubbo-go/issues/2752), [[#2582](https://github.com/apache/dubbo-go/issues/2582)](https://github.com/apache/dubbo-go/issues/2582) | zhangcunli&文锋&梁嘉嘉 | 嘉嘉尝试复现中 |\r\n| common.URL,、内存、goroutine 泄漏 | P0 | https://github.com/apache/dubbo-go/issues/2722,https://github.com/apache/dubbo-go/issues/2709,https://github.com/apache/dubbo-go/issues/2699, [[#2683](https://github.com/apache/dubbo-go/issues/2683)](https://github.com/apache/dubbo-go/issues/2683), [[#2678](https://github.com/apache/dubbo-go/issues/2678)](https://github.com/apache/dubbo-go/issues/2678) | 吴歆帆&罗颖韬 | doc:https://github.com/apache/dubbo-go/discussions/2750,https://github.com/apache/dubbo-go/discussions/2764 跟 歆帆沟通后,推进相关工作。 |\r\n| v3.2 使用问题 | P0 | [[#2707](https://github.com/apache/dubbo-go/issues/2707)](https://github.com/apache/dubbo-go/issues/2707) [[#2703](https://github.com/apache/dubbo-go/issues/2703)](https://github.com/apache/dubbo-go/issues/2703) | 文锋 | |\r\n| data race 问题 | P1 | [[#2277](https://github.com/apache/dubbo-go/issues/2277)](https://github.com/apache/dubbo-go/issues/2277) | 泽亚 | 泽亚能复现,有空解决下 |\r\n| 超时问题改进 | P1 | [[#2302](https://github.com/apache/dubbo-go/issues/2302)](https://github.com/apache/dubbo-go/issues/2302) | 歆帆 | |\r\n| 接口级别注册时,泛化调用需要请求两次才能正常返回结果 | P2 | [[#2591](https://github.com/apache/dubbo-go/issues/2591)](https://github.com/apache/dubbo-go/issues/2591) | 凤瑞 | |\r\n| Provides group version support for the reflection service | P1 | [[#2567](https://github.com/apache/dubbo-go/issues/2567)](https://github.com/apache/dubbo-go/issues/2567) | | |\r\n| 服务治理能力优化 | P1 | [[#2318](https://github.com/apache/dubbo-go/issues/2318)](https://github.com/apache/dubbo-go/issues/2318) | AlexStocks | |\r\n\r\n### Java & Go\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| 调用java服务端高版本返回的数据过大时报错 | P1 | [[#2544](https://github.com/apache/dubbo-go/issues/2544)](https://github.com/apache/dubbo-go/issues/2544) | | |\r\n| Failed to invoke the method com.***.****.XxxxService .No provider is available because can't connect server | P1 | [[#2607](https://github.com/apache/dubbo-go/issues/2607)](https://github.com/apache/dubbo-go/issues/2607) | | |\r\n| dubbo-go 调用JAVA-DUBBO 时 moniter 的相关问题 | P1 | [[#2431](https://github.com/apache/dubbo-go/issues/2431)](https://github.com/apache/dubbo-go/issues/2431) | | |\r\n\r\n## Registry\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| Same address cannot distinguish different registry center | P1 | [[#2524](https://github.com/apache/dubbo-go/issues/2524)](https://github.com/apache/dubbo-go/issues/2524) | | |\r\n| dubbo-go@v3.1.0获取不到nacos配置 | P1 | [[#2580](https://github.com/apache/dubbo-go/issues/2580)](https://github.com/apache/dubbo-go/issues/2580) | | |\r\n| dubbo go与java使用nacos作为注册中心,获取应用metadata的方式不一致导致获取不到provider | P1 | [[#2543](https://github.com/apache/dubbo-go/issues/2543)](https://github.com/apache/dubbo-go/issues/2543) | | |\r\n\r\n## Codec Protocol\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| Rest protocol | P1 | [[#2513](https://github.com/apache/dubbo-go/issues/2513)](https://github.com/apache/dubbo-go/issues/2513) | | |\r\n| dubbo protocol and dubbo-go-hessian2 can not process (*int32)(nil) corner case | P0 | [[#2517](https://github.com/apache/dubbo-go/issues/2517)](https://github.com/apache/dubbo-go/issues/2517) | | |\r\n| the default maxMsgLength for getty param | P1 | [[#2619](https://github.com/apache/dubbo-go/issues/2619)](https://github.com/apache/dubbo-go/issues/2619) | | |\r\n| [Proposal] Unified IDL control for multiple protocols | P1 | [[#2595](https://github.com/apache/dubbo-go/issues/2595)](https://github.com/apache/dubbo-go/issues/2595) | | |\r\n\r\n### Protocol(triple)\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------------ | ---------------------------------- | ------------------------------------------------------------ |\r\n| triple 协议 | P0 | [[#2263](https://github.com/apache/dubbo-go/issues/2263)](https://github.com/apache/dubbo-go/issues/2263) | 吴歆帆、方泽亚、史凤瑞、叶凯乐 | 【泽亚+凤瑞】在推进连接池 |\r\n| triple 使用 | P0 | [[#2755](https://github.com/apache/dubbo-go/issues/2755)](https://github.com/apache/dubbo-go/issues/2755) | zhangcunli&歆帆,实际参与人 杨泽睿 | related discussion,[[#2756](https://github.com/apache/dubbo-go/discussions/2756)](https://github.com/apache/dubbo-go/discussions/2756) |\r\n| Triple header/trailer usage pattern proposal | P1 | [[#2422](https://github.com/apache/dubbo-go/issues/2422)](https://github.com/apache/dubbo-go/issues/2422) | | 这里说明了新 triple 实现的一些细节问题 |\r\n| 在 Triple 协议下,配置最大消息长度无效 | P1 | [[#2487](https://github.com/apache/dubbo-go/issues/2487)](https://github.com/apache/dubbo-go/issues/2487) | 凯乐 | 正在跟进 |\r\n| Reverse package dependency found: triple is replying on server | P1 | [[#2482](https://github.com/apache/dubbo-go/issues/2482)](https://github.com/apache/dubbo-go/issues/2482) | 泽亚 | 已经解决 |\r\n| protoc-gen-triple 插件与生成代码package路径的讨论 | P1 | [[#2475](https://github.com/apache/dubbo-go/issues/2475)](https://github.com/apache/dubbo-go/issues/2475) | 泽亚 | 已经解决 |\r\n| [DISCUSS] should server package support configuring more RPC features? | P1 | [[#2462](https://github.com/apache/dubbo-go/issues/2462)](https://github.com/apache/dubbo-go/issues/2462) | | |\r\n| Triple non-proto mode support | P2 | [[#2491](https://github.com/apache/dubbo-go/issues/2491)](https://github.com/apache/dubbo-go/issues/2491) | | |\r\n| Move sample code in protocol.triple.internal package to apache/dubbo-go-samples | P1 | [[#2498](https://github.com/apache/dubbo-go/issues/2498)](https://github.com/apache/dubbo-go/issues/2498) | 泽亚 | 跟进中 |\r\n| Triple needs to support register Non-IDL service for backward compatibility | P1 | [[#2542](https://github.com/apache/dubbo-go/issues/2542)](https://github.com/apache/dubbo-go/issues/2542) | 泽亚 | 跟进中 |\r\n| Multi Protocols doesn't work on Nacos | P1 | [[#2581](https://github.com/apache/dubbo-go/issues/2581)](https://github.com/apache/dubbo-go/issues/2581) | 歆帆 | 跟进中 |\r\n| triple request missed http header like scheme, host etc. | P1 | [[#2642](https://github.com/apache/dubbo-go/issues/2642)](https://github.com/apache/dubbo-go/issues/2642) | 歆帆 | 跟进中 |\r\n| 服务调用时 schema 前缀改进 | P1 | https://github.com/apache/dubbo-go/pull/2484,https://github.com/apache/dubbo-go/issues/2488 | | |\r\n\r\n## obersavability\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| --------------------------------------------------------- | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| [Triple] Add XXX filter automatically when XXX is enabled | P1 | [[#2505](https://github.com/apache/dubbo-go/issues/2505)](https://github.com/apache/dubbo-go/issues/2505) | | |\r\n| dubbo-go 3.2 grafana 大盘 | P1 | [[#2520](https://github.com/apache/dubbo-go/issues/2520)](https://github.com/apache/dubbo-go/issues/2520) | | |\r\n| dubbo v3 版本已经没有这个api设置日志对象的支持 | P1 | [[#2526](https://github.com/apache/dubbo-go/issues/2526)](https://github.com/apache/dubbo-go/issues/2526) | P1 | |\r\n| Triple OpenTelemetry support | P1 | [[#2554](https://github.com/apache/dubbo-go/issues/2554)](https://github.com/apache/dubbo-go/issues/2554) | | |\r\n| 可观测性改进 | P1 | [[#2315](https://github.com/apache/dubbo-go/issues/2315)](https://github.com/apache/dubbo-go/issues/2315) | | |\r\n\r\n## tools\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| --------------------- | -------- | -------- | -------------------- | ------------------------------------------------------------ |\r\n| java 转 go的proto工具 | P0 | | 何亮、梁嘉嘉、杨泽睿 | dubbo java 海星 已经实现,何亮带着相关筒子继续推进。嘉嘉反馈:等待何亮一些工作完成后继续推进,最近联系不上 何亮。 |\r\n\r\n## long-term work\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------------ | ---------------------- | ----------- |\r\n| 易用性改进 | P1 | [[#2265](https://github.com/apache/dubbo-go/issues/2265)](https://github.com/apache/dubbo-go/issues/2265), [[#2326](https://github.com/apache/dubbo-go/issues/2326)](https://github.com/apache/dubbo-go/issues/2326) | | |\r\n| Summarized todos for [[#2441](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/apache/dubbo-go/issues/2441) | P1 | [[#2442](https://github.com/apache/dubbo-go/issues/2442)](https://github.com/apache/dubbo-go/issues/2442) | | |\r\n| Dubbo3 api design | P1 | [[#2441](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/apache/dubbo-go/issues/2441) | | |\r\n| dubb-go and dubbo-java compatiable | P1 | [[#2578](https://github.com/apache/dubbo-go/issues/2578)](https://github.com/apache/dubbo-go/issues/2578) | | |\r\n| 2024.04.26 weekly | P1 | [[#2667](https://github.com/apache/dubbo-go/issues/2667)](https://github.com/apache/dubbo-go/issues/2667) | | |\r\n| 2022 年制定的一些长期规划 | P0 | [[#2136](https://github.com/apache/dubbo-go/issues/2136)](https://github.com/apache/dubbo-go/issues/2136) | Alex | |\r\n| healthcheck的设计和未来版本的讨论 | P1 | [[#2490](https://github.com/apache/dubbo-go/issues/2490)](https://github.com/apache/dubbo-go/issues/2490) | FinalT | |\r\n| Sample and test-case tasks | P1 | [[#2608](https://github.com/apache/dubbo-go/issues/2608)](https://github.com/apache/dubbo-go/issues/2608) | | |\r\n| Some feature plan and thoughts | P1 | [[#2610](https://github.com/apache/dubbo-go/issues/2610)](https://github.com/apache/dubbo-go/issues/2610) | | |\r\n| 包依赖关系 | P2 | https://github.com/apache/dubbo-go/issues/2377,https://github.com/apache/dubbo-go/issues/2343,嘉嘉: issue:[[[#2741](https://github.com/apache/dubbo-go/issues/2741)](https://github.com/apache/dubbo-go/discussions/%5B#2741%5D(https://github.com/apache/dubbo-go/issues/2741))]([#2741](https://github.com/apache/dubbo-go/issues/2741)) | 张文锋、梁嘉嘉、罗颖韬 | |\r\n\r\n## 2025规划\r\n\r\n1.triple稳定性,解决之前被识别到的issue\r\n\r\n2.triple重构,triple和grpc的关系,一个是基于grpc-go的实现,另外一个基于**connect-rpc**。\r\n\r\ngrpc-go更像是一个微服务框架,但是我们只用到到了协议的实现,会导致整个依赖很重且没有必要。后续考虑基于connect-rpc去做连接管理,逐步移除掉对grpc-go的依赖。\r\n\r\n3.内存泄漏问题的定位与解决,需要找一些用户看有没有遇到对应的问题,帮助定位\r\n\r\n4.error分类,consumer调用provider过程中可能会出现多种异常,网络异常、序列化异常、server侧、业务异常、http错误码的映射,参考grpc、connect-rpc的error分类。\r\n\r\n5.服务发现,了解应用发现、接口发现,确保服务发现机制正常运行,提升稳定性。\r\n\r\n6.xDS,proxyless,java侧会先行实施,go这边可以参考共享java侧的文档、成果",
"url": "https://github.com/apache/dubbo-go/discussions/2773",
"createdAt": "2025-01-12T13:01:39Z",
"updatedAt": "2026-02-13T02:13:08Z",
"closed": true,
"closedAt": "2026-02-13T02:13:08Z",
"isAnswered": null,
"author": {
"login": "No-SilverBullet"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 2776,
"title": "2025-02-09 weekly",
"body": "Item | Priority | Issue/Pr | Owner | Description\r\n-- | -- | -- | -- | --\r\nv3.2 使用问题 | P0 | #2707 #2703 | 文锋 | \r\ndata race 问题 | P1 | #2277 | 泽亚 | 泽亚能复现,有空解决下\r\n超时问题改进 | P1 | #2302 | 歆帆 | \r\nProvides group version support for the reflection service | P1 | #2567 | | \r\n服务治理能力优化 | P1 | #2318 | AlexStocks | \r\n\r\n## 2025 规划\r\n\r\n1.triple稳定性,解决之前被识别到的issue\r\n2.triple重构,triple和grpc的关系,一个是基于grpc-go的实现,另外一个基于connect-rpc。\r\n目标基于connect-rpc去做连接管理。\r\n3.内存泄漏问题的定位与解决,需要找一些用户看有没有遇到对应的问题,帮助定位\r\n4.error分类,consumer调用provider过程中可能会出现多种异常,网络异常、序列化异常、server侧、业务异常、http错误码的映射,参考grpc、connect-rpc的error分类。\r\n5.服务发现,了解应用发现、接口发现,确保服务发现机制正常运行,提升稳定性。\r\n6.xDS,proxyless,参考java侧的文档、成果\r\n\r\n\r\n## RPC Communication\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------- | -------- | ------ | --------- | -------- |\r\n| dubbo-go路由接口的改进 | P1 | [[#2283](https://github.com/apache/dubbo-go/issues/2283)](https://github.com/apache/dubbo-go/issues/2283) | 文锋 | |\r\n| client can't get attachments which is set from server | P1 | [[#2641](https://github.com/apache/dubbo-go/issues/2641)](https://github.com/apache/dubbo-go/issues/2641) | 嘉嘉 | |\r\n| attachment 丢失 | P0 | [[#2752](https://github.com/apache/dubbo-go/issues/2752)](https://github.com/apache/dubbo-go/issues/2752), [[#2582](https://github.com/apache/dubbo-go/issues/2582)](https://github.com/apache/dubbo-go/issues/2582) | zhangcunli&文锋&梁嘉嘉 | 嘉嘉尝试复现中 |\r\n| common.URL,、内存、goroutine 泄漏 | P0 | https://github.com/apache/dubbo-go/issues/2722,https://github.com/apache/dubbo-go/issues/2709,https://github.com/apache/dubbo-go/issues/2699, [[#2683](https://github.com/apache/dubbo-go/issues/2683)](https://github.com/apache/dubbo-go/issues/2683), [[#2678](https://github.com/apache/dubbo-go/issues/2678)](https://github.com/apache/dubbo-go/issues/2678) | 吴歆帆&罗颖韬 | doc:https://github.com/apache/dubbo-go/discussions/2750,https://github.com/apache/dubbo-go/discussions/2764 跟 歆帆沟通后,推进相关工作。 |\r\n| v3.2 使用问题 | P0 | [[#2707](https://github.com/apache/dubbo-go/issues/2707)](https://github.com/apache/dubbo-go/issues/2707) [[#2703](https://github.com/apache/dubbo-go/issues/2703)](https://github.com/apache/dubbo-go/issues/2703) | 文锋 | |\r\n| data race 问题 | P1 | [[#2277](https://github.com/apache/dubbo-go/issues/2277)](https://github.com/apache/dubbo-go/issues/2277) | 泽亚 | 泽亚能复现,有空解决下 |\r\n| 超时问题改进 | P1 | [[#2302](https://github.com/apache/dubbo-go/issues/2302)](https://github.com/apache/dubbo-go/issues/2302) | 歆帆 | | |\r\n| Provides group version support for the reflection service | P1 | [[#2567](https://github.com/apache/dubbo-go/issues/2567)](https://github.com/apache/dubbo-go/issues/2567) | 泽亚 | |\r\n| 服务治理能力优化 | P1 | [[#2318](https://github.com/apache/dubbo-go/issues/2318)](https://github.com/apache/dubbo-go/issues/2318) | AlexStocks | |\r\n\r\n### Java & Go\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| --- | --- | ----- | ----- | --- |\r\n| 调用java服务端高版本返回的数据过大时报错 | P1 | [[#2544](https://github.com/apache/dubbo-go/issues/2544)](https://github.com/apache/dubbo-go/issues/2544) | | |\r\n| Failed to invoke the method com.***.****.XxxxService .No provider is available because can't connect server | P1 | [[#2607](https://github.com/apache/dubbo-go/issues/2607)](https://github.com/apache/dubbo-go/issues/2607) | | |\r\n| dubbo-go 调用JAVA-DUBBO 时 moniter 的相关问题 | P1 | [[#2431](https://github.com/apache/dubbo-go/issues/2431)](https://github.com/apache/dubbo-go/issues/2431) | | |\r\n\r\n## Registry\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| Same address cannot distinguish different registry center | P1 | [[#2524](https://github.com/apache/dubbo-go/issues/2524)](https://github.com/apache/dubbo-go/issues/2524) | jiajia&fengrui | |\r\n| dubbo-go@v3.1.0获取不到nacos配置 | P1 | [[#2580](https://github.com/apache/dubbo-go/issues/2580)](https://github.com/apache/dubbo-go/issues/2580) | jiajia&fengrui | |\r\n| dubbo go与java使用nacos作为注册中心,获取应用metadata的方式不一致导致获取不到provider | P1 | [[#2543](https://github.com/apache/dubbo-go/issues/2543)](https://github.com/apache/dubbo-go/issues/2543) | jiajia&fengrui | |\r\n\r\n## Codec Protocol\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| Rest protocol | P1 | [[#2513](https://github.com/apache/dubbo-go/issues/2513)](https://github.com/apache/dubbo-go/issues/2513) | | |\r\n| dubbo protocol and dubbo-go-hessian2 can not process (*int32)(nil) corner case | P0 | [[#2517](https://github.com/apache/dubbo-go/issues/2517)](https://github.com/apache/dubbo-go/issues/2517) | | |\r\n| the default maxMsgLength for getty param | P1 | [[#2619](https://github.com/apache/dubbo-go/issues/2619)](https://github.com/apache/dubbo-go/issues/2619) | | |\r\n| [Proposal] Unified IDL control for multiple protocols | P1 | [[#2595](https://github.com/apache/dubbo-go/issues/2595)](https://github.com/apache/dubbo-go/issues/2595) | | |\r\n\r\n### Protocol(triple)\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ----- | --- | ------ | ----- | ----- |\r\n| triple 协议 | P0 | [[#2263](https://github.com/apache/dubbo-go/issues/2263)](https://github.com/apache/dubbo-go/issues/2263) | 吴歆帆、方泽亚、史凤瑞、叶凯乐 | 【泽亚+凤瑞】在推进连接池 |\r\n| triple 使用 | P0 | [[#2755](https://github.com/apache/dubbo-go/issues/2755)](https://github.com/apache/dubbo-go/issues/2755) | zhangcunli&歆帆, 杨泽睿 已经发现根因 | related discussion,[[#2756](https://github.com/apache/dubbo-go/discussions/2756)](https://github.com/apache/dubbo-go/discussions/2756) |\r\n| Triple header/trailer usage pattern proposal | P1 | [[#2422](https://github.com/apache/dubbo-go/issues/2422)](https://github.com/apache/dubbo-go/issues/2422) | | 这里说明了新 triple 实现的一些细节问题 |\r\n| 在 Triple 协议下,配置最大消息长度无效 | P1 | [[#2487](https://github.com/apache/dubbo-go/issues/2487)](https://github.com/apache/dubbo-go/issues/2487) | 凯乐 | 正在跟进 |\r\n| Reverse package dependency found: triple is replying on server | P1 | [[#2482](https://github.com/apache/dubbo-go/issues/2482)](https://github.com/apache/dubbo-go/issues/2482) | 泽亚 | 已经解决 |\r\n| protoc-gen-triple 插件与生成代码package路径的讨论 | P1 | [[#2475](https://github.com/apache/dubbo-go/issues/2475)](https://github.com/apache/dubbo-go/issues/2475) | 泽亚 | 已经解决 |\r\n| [DISCUSS] should server package support configuring more RPC features? | P1 | [[#2462](https://github.com/apache/dubbo-go/issues/2462)](https://github.com/apache/dubbo-go/issues/2462) | | |\r\n| Triple non-proto mode support | P2 | [[#2491](https://github.com/apache/dubbo-go/issues/2491)](https://github.com/apache/dubbo-go/issues/2491) | | |\r\n| Move sample code in protocol.triple.internal package to apache/dubbo-go-samples | P1 | [[#2498](https://github.com/apache/dubbo-go/issues/2498)](https://github.com/apache/dubbo-go/issues/2498) | 泽亚 | 跟进中 |\r\n| Triple needs to support register Non-IDL service for backward compatibility | P1 | [[#2542](https://github.com/apache/dubbo-go/issues/2542)](https://github.com/apache/dubbo-go/issues/2542) | 泽亚 | 跟进中 |\r\n| Multi Protocols doesn't work on Nacos | P1 | [[#2581](https://github.com/apache/dubbo-go/issues/2581)](https://github.com/apache/dubbo-go/issues/2581) | 歆帆 | 跟进中 |\r\n| triple request missed http header like scheme, host etc. | P1 | [[#2642](https://github.com/apache/dubbo-go/issues/2642)](https://github.com/apache/dubbo-go/issues/2642) | 歆帆 | 跟进中 |\r\n| 服务调用时 schema 前缀改进 | P1 | https://github.com/apache/dubbo-go/pull/2484,https://github.com/apache/dubbo-go/issues/2488 | | |\r\n\r\n## obersavability\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| --------------------------------------------------------- | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| [Triple] Add XXX filter automatically when XXX is enabled | P1 | [[#2505](https://github.com/apache/dubbo-go/issues/2505)](https://github.com/apache/dubbo-go/issues/2505) | | |\r\n| dubbo-go 3.2 grafana 大盘 | P1 | [[#2520](https://github.com/apache/dubbo-go/issues/2520)](https://github.com/apache/dubbo-go/issues/2520) | | |\r\n| dubbo v3 版本已经没有这个api设置日志对象的支持 | P1 | [[#2526](https://github.com/apache/dubbo-go/issues/2526)](https://github.com/apache/dubbo-go/issues/2526) | P1 | |\r\n| Triple OpenTelemetry support | P1 | [[#2554](https://github.com/apache/dubbo-go/issues/2554)](https://github.com/apache/dubbo-go/issues/2554) | | |\r\n| 可观测性改进 | P1 | [[#2315](https://github.com/apache/dubbo-go/issues/2315)](https://github.com/apache/dubbo-go/issues/2315) | | |\r\n\r\n## tools\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| --------------------- | -------- | -------- | -------------------- | ------------------------------------------------------------ |\r\n| java 转 go的proto工具 | P0 | | 何亮、梁嘉嘉、杨泽睿 | dubbo java 海星 已经实现,何亮带着相关筒子继续推进。嘉嘉反馈:等待何亮一些工作完成后继续推进,最近联系不上 何亮。 |\r\n\r\n## long-term work\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------------ | ---------------------- | ----------- |\r\n| 易用性改进 | P1 | [[#2265](https://github.com/apache/dubbo-go/issues/2265)](https://github.com/apache/dubbo-go/issues/2265), [[#2326](https://github.com/apache/dubbo-go/issues/2326)](https://github.com/apache/dubbo-go/issues/2326) | | |\r\n| Summarized todos for [[#2441](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/apache/dubbo-go/issues/2441) | P1 | [[#2442](https://github.com/apache/dubbo-go/issues/2442)](https://github.com/apache/dubbo-go/issues/2442) | | |\r\n| Dubbo3 api design | P1 | [[#2441](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/apache/dubbo-go/issues/2441) | | |\r\n| dubb-go and dubbo-java compatiable | P1 | [[#2578](https://github.com/apache/dubbo-go/issues/2578)](https://github.com/apache/dubbo-go/issues/2578) | | |\r\n| 2024.04.26 weekly | P1 | [[#2667](https://github.com/apache/dubbo-go/issues/2667)](https://github.com/apache/dubbo-go/issues/2667) | | |\r\n| 2022 年制定的一些长期规划 | P0 | [[#2136](https://github.com/apache/dubbo-go/issues/2136)](https://github.com/apache/dubbo-go/issues/2136) | Alex | |\r\n| healthcheck的设计和未来版本的讨论 | P1 | [[#2490](https://github.com/apache/dubbo-go/issues/2490)](https://github.com/apache/dubbo-go/issues/2490) | FinalT | |\r\n| Sample and test-case tasks | P1 | [[#2608](https://github.com/apache/dubbo-go/issues/2608)](https://github.com/apache/dubbo-go/issues/2608) | | |\r\n| Some feature plan and thoughts | P1 | [[#2610](https://github.com/apache/dubbo-go/issues/2610)](https://github.com/apache/dubbo-go/issues/2610) | | |\r\n| 包依赖关系 | P2 | https://github.com/apache/dubbo-go/issues/2377,https://github.com/apache/dubbo-go/issues/2343,嘉嘉: issue:[[[#2741](https://github.com/apache/dubbo-go/issues/2741)](https://github.com/apache/dubbo-go/discussions/%5B#2741%5D(https://github.com/apache/dubbo-go/issues/2741))]([#2741](https://github.com/apache/dubbo-go/issues/2741)) | 张文锋、梁嘉嘉、罗颖韬 | |\r\n\r\n## 2025规划\r\n\r\n1.triple稳定性,解决之前被识别到的issue\r\n\r\n2.triple重构,triple和grpc的关系,一个是基于grpc-go的实现,另外一个基于**connect-rpc**。\r\n\r\ngrpc-go更像是一个微服务框架,但是我们只用到到了协议的实现,会导致整个依赖很重且没有必要。后续考虑基于connect-rpc去做连接管理,逐步移除掉对grpc-go的依赖。\r\n\r\n3.内存泄漏问题的定位与解决,需要找一些用户看有没有遇到对应的问题,帮助定位\r\n\r\n4.error分类,consumer调用provider过程中可能会出现多种异常,网络异常、序列化异常、server侧、业务异常、http错误码的映射,参考grpc、connect-rpc的error分类。\r\n\r\n5.服务发现,了解应用发现、接口发现,确保服务发现机制正常运行,提升稳定性。\r\n\r\n6.xDS,proxyless,java侧会先行实施,go这边可以参考共享java侧的文档、成果\r\n",
"url": "https://github.com/apache/dubbo-go/discussions/2776",
"createdAt": "2025-02-09T12:16:12Z",
"updatedAt": "2026-02-13T02:13:14Z",
"closed": true,
"closedAt": "2026-02-13T02:13:14Z",
"isAnswered": null,
"author": {
"login": "AlexStocks"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 2777,
"title": "2025-02-16 weekly",
"body": "## 2025 规划\r\n\r\n1.triple稳定性,解决之前被识别到的issue\r\n2.triple重构,triple和grpc的关系,一个是基于grpc-go的实现,另外一个基于connect-rpc。\r\n目标基于connect-rpc去做连接管理。\r\n3.内存泄漏问题的定位与解决,需要找一些用户看有没有遇到对应的问题,帮助定位\r\n4.error分类,consumer调用provider过程中可能会出现多种异常,网络异常、序列化异常、server侧、业务异常、http错误码的映射,参考grpc、connect-rpc的error分类。\r\n5.服务发现,了解应用发现、接口发现,确保服务发现机制正常运行,提升稳定性。\r\n6.xDS,proxyless,参考java侧的文档、成果\r\n\r\n## RPC Communication\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------- | -------- | ------ | --------- | -------- |\r\n| dubbo-go路由接口的改进 | P1 | issue 2283 | 文锋 | |\r\n| client can't get attachments which is set from server | P1 | issue 2641 | 嘉嘉 | |\r\n| attachment 丢失 | P0 | issue 2752 2582 | zhangcunli&文锋&梁嘉嘉 | 嘉嘉尝试复现中 |\r\n| common.URL,、内存、goroutine 泄漏 | P0 | issue 2722, 2709, 2699, 2683, 2678 | 吴歆帆&罗颖韬 | doc:https://github.com/apache/dubbo-go/discussions/2750,https://github.com/apache/dubbo-go/discussions/2764 跟 歆帆沟通后,推进相关工作。 |\r\n| v3.2 使用问题 | P0 | [[#2707](https://github.com/apache/dubbo-go/issues/2707)](https://github.com/apache/dubbo-go/issues/2707) [[#2703](https://github.com/apache/dubbo-go/issues/2703)](https://github.com/apache/dubbo-go/issues/2703) | 文锋 | |\r\n| data race 问题 | P1 | [[#2277](https://github.com/apache/dubbo-go/issues/2277)](https://github.com/apache/dubbo-go/issues/2277) | 泽亚 | 泽亚能复现,有空解决下 |\r\n| 超时问题改进 | P1 | [[#2302](https://github.com/apache/dubbo-go/issues/2302)](https://github.com/apache/dubbo-go/issues/2302) | 歆帆 | | |\r\n| Provides group version support for the reflection service | P1 | [[#2567](https://github.com/apache/dubbo-go/issues/2567)](https://github.com/apache/dubbo-go/issues/2567) | 泽亚 | |\r\n\r\n## Registry\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| Same address cannot distinguish different registry center | P1 | https://github.com/apache/dubbo-go/issues/2524 | fengrui | |\r\n\r\n## Codec Protocol\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| Rest protocol | P1 | [[#2513](https://github.com/apache/dubbo-go/issues/2513)](https://github.com/apache/dubbo-go/issues/2513) | | |\r\n| dubbo protocol and dubbo-go-hessian2 can not process (*int32)(nil) corner case | P0 | [[#2517](https://github.com/apache/dubbo-go/issues/2517)](https://github.com/apache/dubbo-go/issues/2517) | | |\r\n| the default maxMsgLength for getty param | P1 | [[#2619](https://github.com/apache/dubbo-go/issues/2619)](https://github.com/apache/dubbo-go/issues/2619) | | |\r\n| [Proposal] Unified IDL control for multiple protocols | P1 | [[#2595](https://github.com/apache/dubbo-go/issues/2595)](https://github.com/apache/dubbo-go/issues/2595) | | |\r\n\r\n### Protocol(triple)\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ----- | --- | ------ | ----- | ----- |\r\n| triple 协议 | P0 | https://github.com/apache/dubbo-go/issues/2263 | 吴歆帆、方泽亚、史凤瑞、叶凯乐 | 【泽亚+凤瑞】在推进连接池 |\r\n| Triple header/trailer usage pattern proposal | P1 | https://github.com/apache/dubbo-go/issues/2422 | xinfan | 这里说明了新 triple 实现的一些细节问题 |\r\n| 在 Triple 协议下,配置最大消息长度无效 | P1 | https://github.com/apache/dubbo-go/issues/2487 | 凤瑞 | 正在跟进 | |\r\n| Triple non-proto mode support | P2 | https://github.com/apache/dubbo-go/issues/2491 | | |\r\n| Move sample code in protocol.triple.internal package to apache/dubbo-go-samples | P1 | https://github.com/apache/dubbo-go/issues/2498 | 泽亚 | 跟进中 |\r\n| Multi Protocols doesn't work on Nacos | P1 | https://github.com/apache/dubbo-go/issues/2581 | 歆帆 | 跟进中 |\r\n| 服务调用时 schema 前缀改进 | P1 | https://github.com/apache/dubbo-go/pull/2484,https://github.com/apache/dubbo-go/issues/2488 | | |\r\n\r\n## obersavability\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| --------------------------------------------------------- | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| [Triple] Add XXX filter automatically when XXX is enabled | P1 | [[#2505](https://github.com/apache/dubbo-go/issues/2505)](https://github.com/apache/dubbo-go/issues/2505) | | |\r\n| dubbo-go 3.2 grafana 大盘 | P1 | [[#2520](https://github.com/apache/dubbo-go/issues/2520)](https://github.com/apache/dubbo-go/issues/2520) | | |\r\n| dubbo v3 版本已经没有这个api设置日志对象的支持 | P1 | [[#2526](https://github.com/apache/dubbo-go/issues/2526)](https://github.com/apache/dubbo-go/issues/2526) | P1 | |\r\n| Triple OpenTelemetry support | P1 | [[#2554](https://github.com/apache/dubbo-go/issues/2554)](https://github.com/apache/dubbo-go/issues/2554) | | |\r\n| 可观测性改进 | P1 | [[#2315](https://github.com/apache/dubbo-go/issues/2315)](https://github.com/apache/dubbo-go/issues/2315) | | |\r\n\r\n## long-term work\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------------ | ---------------------- | ----------- |\r\n| 易用性改进 | P1 | [[#2265](https://github.com/apache/dubbo-go/issues/2265)](https://github.com/apache/dubbo-go/issues/2265), [[#2326](https://github.com/apache/dubbo-go/issues/2326)](https://github.com/apache/dubbo-go/issues/2326) | | |\r\n| Summarized todos for [[#2441](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/apache/dubbo-go/issues/2441) | P1 | [[#2442](https://github.com/apache/dubbo-go/issues/2442)](https://github.com/apache/dubbo-go/issues/2442) | | |\r\n| Dubbo3 api design | P1 | [[#2441](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/apache/dubbo-go/issues/2441) | | |\r\n| dubb-go and dubbo-java compatiable | P1 | [[#2578](https://github.com/apache/dubbo-go/issues/2578)](https://github.com/apache/dubbo-go/issues/2578) | | |\r\n| 2024.04.26 weekly | P1 | [[#2667](https://github.com/apache/dubbo-go/issues/2667)](https://github.com/apache/dubbo-go/issues/2667) | | |\r\n| 2022 年制定的一些长期规划 | P0 | [[#2136](https://github.com/apache/dubbo-go/issues/2136)](https://github.com/apache/dubbo-go/issues/2136) | Alex | |\r\n| healthcheck的设计和未来版本的讨论 | P1 | [[#2490](https://github.com/apache/dubbo-go/issues/2490)](https://github.com/apache/dubbo-go/issues/2490) | FinalT | |\r\n| Sample and test-case tasks | P1 | [[#2608](https://github.com/apache/dubbo-go/issues/2608)](https://github.com/apache/dubbo-go/issues/2608) | | |\r\n| Some feature plan and thoughts | P1 | [[#2610](https://github.com/apache/dubbo-go/issues/2610)](https://github.com/apache/dubbo-go/issues/2610) | | |\r\n| 包依赖关系 | P2 | https://github.com/apache/dubbo-go/issues/2377,https://github.com/apache/dubbo-go/issues/2343,嘉嘉: issue:[[[#2741](https://github.com/apache/dubbo-go/issues/2741)](https://github.com/apache/dubbo-go/discussions/%5B#2741%5D(https://github.com/apache/dubbo-go/issues/2741))]([#2741](https://github.com/apache/dubbo-go/issues/2741)) | 张文锋、梁嘉嘉、罗颖韬 | |\r\n",
"url": "https://github.com/apache/dubbo-go/discussions/2777",
"createdAt": "2025-02-16T11:30:48Z",
"updatedAt": "2026-02-13T02:13:23Z",
"closed": true,
"closedAt": "2026-02-13T02:13:23Z",
"isAnswered": null,
"author": {
"login": "AlexStocks"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 2780,
"title": "2025-02-23 weekly",
"body": "## 2025 规划\r\n\r\n1.triple稳定性,解决之前被识别到的issue\r\n2.triple重构,triple和grpc的关系,一个是基于grpc-go的实现,另外一个基于connect-rpc。\r\n目标基于connect-rpc去做连接管理。\r\n3.内存泄漏问题的定位与解决,需要找一些用户看有没有遇到对应的问题,帮助定位\r\n4.error分类,consumer调用provider过程中可能会出现多种异常,网络异常、序列化异常、server侧、业务异常、http错误码的映射,参考grpc、connect-rpc的error分类。\r\n5.服务发现,了解应用发现、接口发现,确保服务发现机制正常运行,提升稳定性。\r\n6.xDS,proxyless,参考java侧的文档、成果\r\n\r\n## RPC Communication\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ----------------------------------------------------- | -------- | --------------------------------------------------------- | ---------------------- | ------------------------------------------------------------ |\r\n| client can't get attachments which is set from server | P1 | issue 2641 | 嘉嘉 | |\r\n| attachment 丢失 | P0 | issue 2752 2582 | zhangcunli&文锋&梁嘉嘉 | 嘉嘉尝试复现中 |\r\n| common.URL,、内存、goroutine 泄漏 | P0 | issue 2722, 2709, 2683, 2678 | 吴歆帆&罗颖韬 | doc:https://github.com/apache/dubbo-go/discussions/2750,https://github.com/apache/dubbo-go/discussions/2764 跟 歆帆沟通后,推进相关工作。 |\r\n| data race 问题 | P1 | [2277](https://github.com/apache/dubbo-go/issues/2277) | 泽亚 | 泽亚能复现,有空解决下 |\r\n| 超时问题改进 | P1 | [#2302](https://github.com/apache/dubbo-go/issues/2302) | 歆帆 | |\r\n| jsonRpc Protocol in dubbogo | P1 | [2779](https://github.com/apache/dubbo-go/issues/2779) | 凤瑞 | 待和用户沟通解决 |\r\n\r\n## Registry\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| --------------------------------------------------------- | -------- | ---------------------------------------------- | ------- | ----------- |\r\n| Same address cannot distinguish different registry center | P1 | https://github.com/apache/dubbo-go/issues/2524 | fengrui | |\r\n\r\n## Codec Protocol\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------------ | ------ | ----------- |\r\n| Rest protocol | P1 | [[#2513](https://github.com/apache/dubbo-go/issues/2513)](https://github.com/apache/dubbo-go/issues/2513) | | |\r\n| dubbo protocol and dubbo-go-hessian2 can not process (*int32)(nil) corner case | P0 | [[#2517](https://github.com/apache/dubbo-go/issues/2517)](https://github.com/apache/dubbo-go/issues/2517) | shunli | |\r\n| the default maxMsgLength for getty param | P1 | [[#2619](https://github.com/apache/dubbo-go/issues/2619)](https://github.com/apache/dubbo-go/issues/2619) | | |\r\n| [Proposal] Unified IDL control for multiple protocols | P1 | [[#2595](https://github.com/apache/dubbo-go/issues/2595)](https://github.com/apache/dubbo-go/issues/2595) | | |\r\n\r\n### Protocol(triple)\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------------ | ------------------------------ | ------------------------------------------------------------ |\r\n| triple 协议 | P0 | https://github.com/apache/dubbo-go/issues/2263 | 吴歆帆、方泽亚、史凤瑞、叶凯乐 | PR https://github.com/apache/dubbo-go/issues/2263, 需要加测试 |\r\n| Triple header/trailer usage pattern proposal | P1 | https://github.com/apache/dubbo-go/issues/2422 | xinfan | 这里说明了新 triple 实现的一些细节问题 |\r\n| Triple non-proto mode support | P2 | https://github.com/apache/dubbo-go/issues/2491 | | |\r\n| Move sample code in protocol.triple.internal package to apache/dubbo-go-samples | P1 | https://github.com/apache/dubbo-go/issues/2498 | 泽亚 | 跟进中 |\r\n| Multi Protocols doesn't work on Nacos | P1 | https://github.com/apache/dubbo-go/issues/2581 | 歆帆 | 跟进中 |\r\n| 服务调用时 schema 前缀改进 | P1 | https://github.com/apache/dubbo-go/pull/2484,https://github.com/apache/dubbo-go/issues/2488 | | |\r\n\r\n## obersavability\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| --------------------------------------------------------- | -------- | ------------------------------------------------------------ | ----- | ----------- |\r\n| [Triple] Add XXX filter automatically when XXX is enabled | P1 | [[#2505](https://github.com/apache/dubbo-go/issues/2505)](https://github.com/apache/dubbo-go/issues/2505) | | |\r\n| dubbo-go 3.2 grafana 大盘 | P1 | [[#2520](https://github.com/apache/dubbo-go/issues/2520)](https://github.com/apache/dubbo-go/issues/2520) | | |\r\n| dubbo v3 版本已经没有这个api设置日志对象的支持 | P1 | [[#2526](https://github.com/apache/dubbo-go/issues/2526)](https://github.com/apache/dubbo-go/issues/2526) | P1 | |\r\n| Triple OpenTelemetry support | P1 | [[#2554](https://github.com/apache/dubbo-go/issues/2554)](https://github.com/apache/dubbo-go/issues/2554) | | |\r\n| 可观测性改进 | P1 | [[#2315](https://github.com/apache/dubbo-go/issues/2315)](https://github.com/apache/dubbo-go/issues/2315) | | |\r\n\r\n## long-term work\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------------ | ---------------------- | ----------- |\r\n| 易用性改进 | P1 | [[#2265](https://github.com/apache/dubbo-go/issues/2265)](https://github.com/apache/dubbo-go/issues/2265), [[#2326](https://github.com/apache/dubbo-go/issues/2326)](https://github.com/apache/dubbo-go/issues/2326) | | |\r\n| Summarized todos for [[#2441](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/apache/dubbo-go/issues/2441) | P1 | [[#2442](https://github.com/apache/dubbo-go/issues/2442)](https://github.com/apache/dubbo-go/issues/2442) | | |\r\n| Dubbo3 api design | P1 | [[#2441](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/apache/dubbo-go/issues/2441) | | |\r\n| dubb-go and dubbo-java compatiable | P1 | [[#2578](https://github.com/apache/dubbo-go/issues/2578)](https://github.com/apache/dubbo-go/issues/2578) | | |\r\n| 2024.04.26 weekly | P1 | [[#2667](https://github.com/apache/dubbo-go/issues/2667)](https://github.com/apache/dubbo-go/issues/2667) | | |\r\n| 2022 年制定的一些长期规划 | P0 | [[#2136](https://github.com/apache/dubbo-go/issues/2136)](https://github.com/apache/dubbo-go/issues/2136) | Alex | |\r\n| healthcheck的设计和未来版本的讨论 | P1 | [[#2490](https://github.com/apache/dubbo-go/issues/2490)](https://github.com/apache/dubbo-go/issues/2490) | FinalT | |\r\n| Sample and test-case tasks | P1 | [[#2608](https://github.com/apache/dubbo-go/issues/2608)](https://github.com/apache/dubbo-go/issues/2608) | | |\r\n| Some feature plan and thoughts | P1 | [[#2610](https://github.com/apache/dubbo-go/issues/2610)](https://github.com/apache/dubbo-go/issues/2610) | | |\r\n| 包依赖关系 | P2 | https://github.com/apache/dubbo-go/issues/2377,https://github.com/apache/dubbo-go/issues/2343,嘉嘉: issue:[[[#2741](https://github.com/apache/dubbo-go/issues/2741)](https://github.com/apache/dubbo-go/discussions/%5B#2741%5D(https://github.com/apache/dubbo-go/issues/2741))]([#2741](https://github.com/apache/dubbo-go/issues/2741)) | 张文锋、梁嘉嘉、罗颖韬 | |",
"url": "https://github.com/apache/dubbo-go/discussions/2780",
"createdAt": "2025-02-23T12:57:51Z",
"updatedAt": "2026-02-13T02:14:22Z",
"closed": true,
"closedAt": "2026-02-13T02:14:22Z",
"isAnswered": null,
"author": {
"login": "FoghostCn"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 2781,
"title": "AI 网关",
"body": "ref link https://github.com/apache/dubbo-go/discussions\r\n\r\n\r\n一、AI网关的本质与定位\r\n\r\n 继承API网关\r\n AI网关本质是API网关的演进,复用API网关的基础能力(如安全、限流、灰度、监控等),但针对大模型场景进行增强。\r\n 分类视角:按研发、供应、消费三场景划分能力:\r\n 研发场景:API First(文档驱动开发)、SDK生成、开发者门户集成。\r\n 供应场景:API安全(身份验证/加密)、灰度发布、缓存加速、流量治理。\r\n 消费场景:调用审计、配额限流、后端保护、服务熔断。\r\n\r\n 演进方向\r\n 面向大模型场景新增核心能力:\r\n 研发侧:思维链生成(从API文档到Agent)、JSON Schema结构化响应。\r\n 供应侧:多模型灵活切换(兜底重试)、内容安全(过滤有害内容)、语义化缓存(降低推理成本)、API Key均衡负载。\r\n 消费侧:Token配额管理(按计算量限流)、调用成本审计、流量灰度测试。\r\n\r\n二、AI网关的关键价值\r\n\r\n 架构解耦与性能优化\r\n 分离职责:网关专注流量管理(安全/限流/缓存),大模型专注推理,避免性能瓶颈。\r\n 减少负载:通过前置处理(如缓存、限流)降低大模型服务压力,提升并发能力。\r\n\r\n 统一安全与合规\r\n 入口防护:统一拦截恶意请求、数据脱敏,防止敏感信息泄露。\r\n 内容审核:过滤AI生成的不合规内容(如暴力/偏见言论)。\r\n\r\n 可观测性与成本控制\r\n 全链路监控:追踪API调用链路(延迟/成功率/错误率),支持故障快速定位。\r\n 成本优化:通过语义化缓存(命中率提升显著)和Token配额管理降低大模型调用成本。\r\n",
"url": "https://github.com/apache/dubbo-go/discussions/2781",
"createdAt": "2025-02-24T04:42:48Z",
"updatedAt": "2025-03-02T09:33:44Z",
"closed": true,
"closedAt": "2025-03-02T09:33:44Z",
"isAnswered": null,
"author": {
"login": "AlexStocks"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 2786,
"title": "2025-03-02 weekly",
"body": "2025 规划
1.triple稳定性,解决之前被识别到的issue\r\n2.triple重构,triple和grpc的关系,一个是基于grpc-go的实现,另外一个基于connect-rpc。\r\n目标基于connect-rpc去做连接管理。\r\n3.内存泄漏问题的定位与解决,需要找一些用户看有没有遇到对应的问题,帮助定位\r\n4.error分类,consumer调用provider过程中可能会出现多种异常,网络异常、序列化异常、server侧、业务异常、http错误码的映射,参考grpc、connect-rpc的error分类。\r\n5.服务发现,了解应用发现、接口发现,确保服务发现机制正常运行,提升稳定性。\r\n6.xDS,proxyless,参考java侧的文档、成果
Ecosystem
\r\nItem | Link\r\n-- | --\r\npixiu | https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions/24\r\npixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples\r\ndubbogo samples | https://github.com/apache/dubbo-go-samples/issues\r\n\r\n## 2025 规划\r\n\r\n1.triple稳定性,解决之前被识别到的issue\r\n2.triple重构,triple和grpc的关系,一个是基于grpc-go的实现,另外一个基于connect-rpc。\r\n目标基于connect-rpc去做连接管理。\r\n3.内存泄漏问题的定位与解决,需要找一些用户看有没有遇到对应的问题,帮助定位\r\n4.error分类,consumer调用provider过程中可能会出现多种异常,网络异常、序列化异常、server侧、业务异常、http错误码的映射,参考grpc、connect-rpc的error分类。\r\n5.服务发现,了解应用发现、接口发现,确保服务发现机制正常运行,提升稳定性。\r\n6.xDS,proxyless,参考java侧的文档、成果\r\n\r\n## Ecosystem\r\n\r\n| Item | Link |\r\n| --------------- | ------------------------------------------------------------ |\r\n| pixiu | https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions/24 |\r\n| pixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples |\r\n| dubbogo samples | https://github.com/apache/dubbo-go-samples/issues |\r\n\r\n## RPC Communication\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ----------------------------------------------------- | -------- | ------------------------------------------------------- | ---------------------- | ------------------------------------------------------------ |\r\n| client can't get attachments which is set from server | P1 | issue 2641 | 嘉嘉 | 嘉嘉尝试复现中 |\r\n| attachment 丢失 | P1 | issue 2582 | zhangcunli&文锋&梁嘉嘉 | 嘉嘉尝试复现中 |\r\n| common.URL,、内存、goroutine 泄漏 | P0 | issue 2683, 2678 | 吴歆帆&罗颖韬 | doc:https://github.com/apache/dubbo-go/discussions/2750,https://github.com/apache/dubbo-go/discussions/2764 跟 歆帆沟通后,推进相关工作。 |\r\n| 超时问题改进 | P1 | [[#2302](https://github.com/apache/dubbo-go/issues/2302)](https://github.com/apache/dubbo-go/issues/2302) | 歆帆 | |\r\n| jsonRpc Protocol in dubbogo | P1 | [[2779](https://github.com/apache/dubbo-go/issues/2779)](https://github.com/apache/dubbo-go/issues/2779) | 凤瑞 | 待和用户沟通解决 |\r\n\r\n## Codec Protocol\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ----------------------------------------------------- | -------- | ------------------------------------------------------------ | ----- | ----------- |\r\n| Rest protocol | P1 | [[[#2513](https://github.com/apache/dubbo-go/issues/2513)](https://github.com/apache/dubbo-go/issues/2513)](https://github.com/apache/dubbo-go/issues/2513) | | |\r\n| | | | | |\r\n| the default maxMsgLength for getty param | P1 | [[[#2619](https://github.com/apache/dubbo-go/issues/2619)](https://github.com/apache/dubbo-go/issues/2619)](https://github.com/apache/dubbo-go/issues/2619) | | |\r\n| [Proposal] Unified IDL control for multiple protocols | P1 | [[[#2595](https://github.com/apache/dubbo-go/issues/2595)](https://github.com/apache/dubbo-go/issues/2595)](https://github.com/apache/dubbo-go/issues/2595) | | |\r\n\r\n### Protocol(triple)\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------------ | ------------------------------ | ------------------------------------------------------------ |\r\n| triple 协议 | P0 | https://github.com/apache/dubbo-go/issues/2263 | 吴歆帆、方泽亚、史凤瑞、叶凯乐 | PR https://github.com/apache/dubbo-go/issues/2263, 增加一个对比 |\r\n| Triple header/trailer usage pattern proposal | P1 | https://github.com/apache/dubbo-go/issues/2422 | xinfan | 这里说明了新 triple 实现的一些细节问题 |\r\n| Triple non-proto mode support | P2 | https://github.com/apache/dubbo-go/issues/2491 | | |\r\n| Move sample code in protocol.triple.internal package to apache/dubbo-go-samples | P1 | https://github.com/apache/dubbo-go/issues/2498 | 泽亚 | 跟进中 |\r\n| Multi Protocols doesn't work on Nacos | P1 | https://github.com/apache/dubbo-go/issues/2581 | 歆帆 | 跟进中 |\r\n| 服务调用时 schema 前缀改进 | P1 | https://github.com/apache/dubbo-go/pull/2484,https://github.com/apache/dubbo-go/issues/2488 | | |\r\n\r\n## obersavability\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| --------------------------------------------------------- | -------- | ------------------------------------------------------------ | ----- | ----------- |\r\n| [Triple] Add XXX filter automatically when XXX is enabled | P1 | [[[#2505](https://github.com/apache/dubbo-go/issues/2505)](https://github.com/apache/dubbo-go/issues/2505)](https://github.com/apache/dubbo-go/issues/2505) | | |\r\n| dubbo-go 3.2 grafana 大盘 | P1 | [[[#2520](https://github.com/apache/dubbo-go/issues/2520)](https://github.com/apache/dubbo-go/issues/2520)](https://github.com/apache/dubbo-go/issues/2520) | | |\r\n| dubbo v3 版本已经没有这个api设置日志对象的支持 | P1 | [[[#2526](https://github.com/apache/dubbo-go/issues/2526)](https://github.com/apache/dubbo-go/issues/2526)](https://github.com/apache/dubbo-go/issues/2526) | P1 | |\r\n| Triple OpenTelemetry support | P1 | [[[#2554](https://github.com/apache/dubbo-go/issues/2554)](https://github.com/apache/dubbo-go/issues/2554)](https://github.com/apache/dubbo-go/issues/2554) | | |\r\n| 可观测性改进 | P1 | [[[#2315](https://github.com/apache/dubbo-go/issues/2315)](https://github.com/apache/dubbo-go/issues/2315)](https://github.com/apache/dubbo-go/issues/2315) | | |\r\n\r\n## long-term work\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------------ | ---------------------- | ----------- |\r\n| 易用性改进 | P1 | [[[#2265](https://github.com/apache/dubbo-go/issues/2265)](https://github.com/apache/dubbo-go/issues/2265)](https://github.com/apache/dubbo-go/issues/2265), [[[#2326](https://github.com/apache/dubbo-go/issues/2326)](https://github.com/apache/dubbo-go/issues/2326)](https://github.com/apache/dubbo-go/issues/2326) | | |\r\n| Summarized todos for [[[#2441](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/apache/dubbo-go/issues/2441) | P1 | [[[#2442](https://github.com/apache/dubbo-go/issues/2442)](https://github.com/apache/dubbo-go/issues/2442)](https://github.com/apache/dubbo-go/issues/2442) | | |\r\n| Dubbo3 api design | P1 | [[[#2441](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/apache/dubbo-go/issues/2441) | | |\r\n| dubb-go and dubbo-java compatiable | P1 | [[[#2578](https://github.com/apache/dubbo-go/issues/2578)](https://github.com/apache/dubbo-go/issues/2578)](https://github.com/apache/dubbo-go/issues/2578) | | |\r\n| 2024.04.26 weekly | P1 | [[[#2667](https://github.com/apache/dubbo-go/issues/2667)](https://github.com/apache/dubbo-go/issues/2667)](https://github.com/apache/dubbo-go/issues/2667) | | |\r\n| 2022 年制定的一些长期规划 | P0 | [[[#2136](https://github.com/apache/dubbo-go/issues/2136)](https://github.com/apache/dubbo-go/issues/2136)](https://github.com/apache/dubbo-go/issues/2136) | Alex | |\r\n| healthcheck的设计和未来版本的讨论 | P1 | [[[#2490](https://github.com/apache/dubbo-go/issues/2490)](https://github.com/apache/dubbo-go/issues/2490)](https://github.com/apache/dubbo-go/issues/2490) | FinalT | |\r\n| Sample and test-case tasks | P1 | [[[#2608](https://github.com/apache/dubbo-go/issues/2608)](https://github.com/apache/dubbo-go/issues/2608)](https://github.com/apache/dubbo-go/issues/2608) | | |\r\n| Some feature plan and thoughts | P1 | [[[#2610](https://github.com/apache/dubbo-go/issues/2610)](https://github.com/apache/dubbo-go/issues/2610)](https://github.com/apache/dubbo-go/issues/2610) | | |\r\n| 包依赖关系 | P2 | https://github.com/apache/dubbo-go/issues/2377,https://github.com/apache/dubbo-go/issues/2343,嘉嘉: issue:[[[[#2741](https://github.com/apache/dubbo-go/issues/2741)](https://github.com/apache/dubbo-go/discussions/%5B#2741%5D(https://github.com/apache/dubbo-go/issues/2741))](https://github.com/apache/dubbo-go/discussions/%5B[#2741](https://github.com/apache/dubbo-go/issues/2741)%5D(https://github.com/apache/dubbo-go/issues/2741))]([#2741](https://github.com/apache/dubbo-go/issues/2741)) | 张文锋、梁嘉嘉、罗颖韬 | |",
"url": "https://github.com/apache/dubbo-go/discussions/2786",
"createdAt": "2025-03-02T09:41:44Z",
"updatedAt": "2026-02-13T02:14:28Z",
"closed": true,
"closedAt": "2026-02-13T02:14:28Z",
"isAnswered": null,
"author": {
"login": "AlexStocks"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 2800,
"title": "2025-03-16 weekly",
"body": "| Item| Link |\r\n| --- | --- |\r\n| pixiu | https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions/25 | \r\n| pixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples | \r\n| dubbogo samples | https://github.com/apache/dubbo-go-samples/issues | \r\n| ospp 2025 | https://github.com/apache/dubbo-go/issues/2801 |\r\n\r\n## 2025 规划\r\n\r\n1.triple稳定性,解决之前被识别到的issue\r\n2.triple重构,triple和grpc的关系,一个是基于grpc-go的实现,另外一个基于connect-rpc。\r\n目标基于connect-rpc去做连接管理。\r\n3.内存泄漏问题的定位与解决,需要找一些用户看有没有遇到对应的问题,帮助定位\r\n4.error分类,consumer调用provider过程中可能会出现多种异常,网络异常、序列化异常、server侧、业务异常、http错误码的映射,参考grpc、connect-rpc的error分类。\r\n5.服务发现,了解应用发现、接口发现,确保服务发现机制正常运行,提升稳定性。\r\n6.xDS,proxyless,参考java侧的文档、成果\r\n\r\n## Ecosystem\r\n\r\n| Item| Link |\r\n| --- | --- |\r\n| pixiu | https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions/24 |\r\n| pixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples |\r\n| dubbogo samples | https://github.com/apache/dubbo-go-samples/issues |\r\n\r\n## RPC Communication\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| --- | --- | --- | --- | --- |\r\n| client can't get attachments which is set from server | P1 | https://github.com/apache/dubbo-go/issues/2641 | 嘉嘉、凤瑞 | |\r\n| attachment 丢失 | P1 | issue 2582 | | |\r\n| common.URL,、内存、goroutine 泄漏 | P0 | issue 2683, 2678 | 吴歆帆&罗颖韬 | doc:https://github.com/apache/dubbo-go/discussions/2750,https://github.com/apache/dubbo-go/discussions/2764 跟 歆帆沟通后,推进相关工作。 |\r\n\r\n## Codec Protocol\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| --- | --- | --- | --- | --- |\r\n| Rest protocol | P1 | [[[#2513](https://github.com/apache/dubbo-go/issues/2513)](https://github.com/apache/dubbo-go/issues/2513)](https://github.com/apache/dubbo-go/issues/2513) | | |\r\n| | | | | |\r\n| the default maxMsgLength for getty param | P1 | [[[#2619](https://github.com/apache/dubbo-go/issues/2619)](https://github.com/apache/dubbo-go/issues/2619)](https://github.com/apache/dubbo-go/issues/2619) | | |\r\n| [Proposal] Unified IDL control for multiple protocols | P1 | [[[#2595](https://github.com/apache/dubbo-go/issues/2595)](https://github.com/apache/dubbo-go/issues/2595)](https://github.com/apache/dubbo-go/issues/2595) | | |\r\n\r\n### Protocol(triple)\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| --- | --- | --- | --- | --- |\r\n| Triple header/trailer usage pattern proposal | P1 | https://github.com/apache/dubbo-go/issues/2422 | xinfan | 这里说明了新 triple 实现的一些细节问题,后续整理到 discussion |\r\n| Triple non-proto mode support | P2 | https://github.com/apache/dubbo-go/issues/2491 | | |\r\n| Multi Protocols doesn't work on Nacos | P1 | https://github.com/apache/dubbo-go/issues/2581 | 歆帆 | wuxiaoyu 跟进|\r\n\r\n\r\n## obersavability\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| --- | --- | --- | --- | --- |\r\n| [Triple] Add XXX filter automatically when XXX is enabled | P1 | [[[#2505](https://github.com/apache/dubbo-go/issues/2505)](https://github.com/apache/dubbo-go/issues/2505)](https://github.com/apache/dubbo-go/issues/2505) | | |\r\n| dubbo-go 3.2 grafana 大盘 | P1 | [[[#2520](https://github.com/apache/dubbo-go/issues/2520)](https://github.com/apache/dubbo-go/issues/2520)](https://github.com/apache/dubbo-go/issues/2520) | | |\r\n| dubbo v3 版本已经没有这个api设置日志对象的支持 | P1 | [[[#2526](https://github.com/apache/dubbo-go/issues/2526)](https://github.com/apache/dubbo-go/issues/2526)](https://github.com/apache/dubbo-go/issues/2526) | P1 | |\r\n| Triple OpenTelemetry support | P1 | [[[#2554](https://github.com/apache/dubbo-go/issues/2554)](https://github.com/apache/dubbo-go/issues/2554)](https://github.com/apache/dubbo-go/issues/2554) | | |\r\n| 可观测性改进 | P1 | [[[#2315](https://github.com/apache/dubbo-go/issues/2315)](https://github.com/apache/dubbo-go/issues/2315)](https://github.com/apache/dubbo-go/issues/2315) | | |\r\n\r\n## long-term work\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| --- | --- | --- | --- | --- |\r\n| 易用性改进 | P1 | [[[#2265](https://github.com/apache/dubbo-go/issues/2265)](https://github.com/apache/dubbo-go/issues/2265)](https://github.com/apache/dubbo-go/issues/2265), [[[#2326](https://github.com/apache/dubbo-go/issues/2326)](https://github.com/apache/dubbo-go/issues/2326)](https://github.com/apache/dubbo-go/issues/2326) | | |\r\n| Summarized todos for [[[#2441](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/apache/dubbo-go/issues/2441) | P1 | [[[#2442](https://github.com/apache/dubbo-go/issues/2442)](https://github.com/apache/dubbo-go/issues/2442)](https://github.com/apache/dubbo-go/issues/2442) | | |\r\n| Dubbo3 api design | P1 | [[[#2441](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/apache/dubbo-go/issues/2441) | | |\r\n| dubb-go and dubbo-java compatiable | P1 | [[[#2578](https://github.com/apache/dubbo-go/issues/2578)](https://github.com/apache/dubbo-go/issues/2578)](https://github.com/apache/dubbo-go/issues/2578) | | |\r\n| 2024.04.26 weekly | P1 | [[[#2667](https://github.com/apache/dubbo-go/issues/2667)](https://github.com/apache/dubbo-go/issues/2667)](https://github.com/apache/dubbo-go/issues/2667) | | |\r\n| 2022 年制定的一些长期规划 | P0 | [[[#2136](https://github.com/apache/dubbo-go/issues/2136)](https://github.com/apache/dubbo-go/issues/2136)](https://github.com/apache/dubbo-go/issues/2136) | Alex | |\r\n| healthcheck的设计和未来版本的讨论 | P1 | [[[#2490](https://github.com/apache/dubbo-go/issues/2490)](https://github.com/apache/dubbo-go/issues/2490)](https://github.com/apache/dubbo-go/issues/2490) | FinalT | |\r\n| Sample and test-case tasks | P1 | [[[#2608](https://github.com/apache/dubbo-go/issues/2608)](https://github.com/apache/dubbo-go/issues/2608)](https://github.com/apache/dubbo-go/issues/2608) | | |\r\n| Some feature plan and thoughts | P1 | [[[#2610](https://github.com/apache/dubbo-go/issues/2610)](https://github.com/apache/dubbo-go/issues/2610)](https://github.com/apache/dubbo-go/issues/2610) | | |\r\n| 包依赖关系 | P2 | https://github.com/apache/dubbo-go/issues/2377,https://github.com/apache/dubbo-go/issues/2343,嘉嘉: issue:[[[[#2741](https://github.com/apache/dubbo-go/issues/2741)](https://github.com/apache/dubbo-go/discussions/%5B#2741%5D(https://github.com/apache/dubbo-go/issues/2741))](https://github.com/apache/dubbo-go/discussions/%5B[#2741](https://github.com/apache/dubbo-go/issues/2741)%5D(https://github.com/apache/dubbo-go/issues/2741))]([#2741](https://github.com/apache/dubbo-go/issues/2741)) | 张文锋、梁嘉嘉、罗颖韬 | |\r\n",
"url": "https://github.com/apache/dubbo-go/discussions/2800",
"createdAt": "2025-03-16T12:02:36Z",
"updatedAt": "2026-02-13T02:13:56Z",
"closed": true,
"closedAt": "2026-02-13T02:13:56Z",
"isAnswered": null,
"author": {
"login": "AlexStocks"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 2804,
"title": "Java 泛化调用 dubbo-go",
"body": "Java 泛化调用 dubbo-go ,dubbo go 为可变形参\r\n举例:\r\n```go\r\ntype HelloService interface {\r\n\tHello(ctx context.Context, req *model.HelloReq) (*model.HelloResp, error)\r\n\tMultiArgs(ctx context.Context, args ...string) (*model.HelloResp, error)\r\n}\r\n```\r\n当 Java 客户端使用非泛化调用的时候,multiArgs 便是 Java 多方法重载,字符串可以传递 1~n 个,但是 Java 客户端使用非泛化调用的时候,该怎么传参?",
"url": "https://github.com/apache/dubbo-go/discussions/2804",
"createdAt": "2025-03-18T03:52:26Z",
"updatedAt": "2026-04-14T08:23:30Z",
"closed": true,
"closedAt": "2026-03-16T12:31:23Z",
"isAnswered": true,
"author": {
"login": "amosnothing"
},
"category": {
"name": "Q&A"
},
"answer": {
"id": "DC_kwDOCJS8R84A-y0s",
"url": "https://github.com/apache/dubbo-go/discussions/2804#discussioncomment-16461100",
"body": "您好,框架现已支持 Java 泛化调用 Go variadic 方法,两种传参方式均可:\r\n\r\n 1. 离散传参:`args: [\"a\", \"b\"]`\r\n 2. 数组传参:`args: [[\"a\", \"b\"]]`(推荐,与 Java varargs 语义一致)\r\n 后续还会对框架该部分进行升级优化\r\n
\r\n",
"author": {
"login": "mochengqian"
}
},
"comments": [
{
"id": "DC_kwDOCJS8R84A9pBn",
"url": "https://github.com/apache/dubbo-go/discussions/2804#discussioncomment-16158823",
"body": "will be discussed in https://github.com/apache/dubbo-go/issues/3259",
"createdAt": "2026-03-16T12:31:23Z",
"updatedAt": "2026-03-16T12:31:23Z",
"author": {
"login": "Alanxtl"
},
"replies": []
},
{
"id": "DC_kwDOCJS8R84A-y0s",
"url": "https://github.com/apache/dubbo-go/discussions/2804#discussioncomment-16461100",
"body": "您好,框架现已支持 Java 泛化调用 Go variadic 方法,两种传参方式均可:\r\n\r\n 1. 离散传参:`args: [\"a\", \"b\"]`\r\n 2. 数组传参:`args: [[\"a\", \"b\"]]`(推荐,与 Java varargs 语义一致)\r\n 后续还会对框架该部分进行升级优化\r\n
\r\n",
"createdAt": "2026-04-06T06:21:01Z",
"updatedAt": "2026-04-06T06:21:01Z",
"author": {
"login": "mochengqian"
},
"replies": []
},
{
"id": "DC_kwDOCJS8R84A-4gl",
"url": "https://github.com/apache/dubbo-go/discussions/2804#discussioncomment-16484389",
"body": "NEW FEATURE IN https://github.com/apache/dubbo-go/pull/3284",
"createdAt": "2026-04-08T05:17:15Z",
"updatedAt": "2026-04-08T05:17:15Z",
"author": {
"login": "Alanxtl"
},
"replies": []
},
{
"id": "DC_kwDOCJS8R84A_JhD",
"url": "https://github.com/apache/dubbo-go/discussions/2804#discussioncomment-16554051",
"body": "close via https://github.com/apache/dubbo-go/issues/3259",
"createdAt": "2026-04-14T08:23:29Z",
"updatedAt": "2026-04-14T08:23:29Z",
"author": {
"login": "Alanxtl"
},
"replies": []
}
]
},
{
"number": 2815,
"title": "2025-03-20 weekly",
"body": "Item | Link\r\n-- | --\r\npixiu | https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions/25\r\npixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples\r\ndubbogo samples | https://github.com/apache/dubbo-go-samples/issues\r\nospp 2025 | https://github.com/apache/dubbo-go/issues/2801\r\n\r\n\r\n\r\n## 2025 规划\r\n\r\n1.triple稳定性,解决之前被识别到的issue\r\n2.triple重构,triple和grpc的关系,一个是基于grpc-go的实现,另外一个基于connect-rpc。\r\n目标基于connect-rpc去做连接管理。\r\n3.内存泄漏问题的定位与解决,需要找一些用户看有没有遇到对应的问题,帮助定位\r\n4.error分类,consumer调用provider过程中可能会出现多种异常,网络异常、序列化异常、server侧、业务异常、http错误码的映射,参考grpc、connect-rpc的error分类。\r\n5.服务发现,了解应用发现、接口发现,确保服务发现机制正常运行,提升稳定性。\r\n6.xDS,proxyless,参考java侧的文档、成果\r\n7.AI agent以及gateway探索\r\n\r\n## Ecosystem\r\n\r\n| Item | Link |\r\n| --------------- | ------------------------------------------------------------ |\r\n| pixiu | https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions/24 |\r\n| pixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples |\r\n| dubbogo samples | https://github.com/apache/dubbo-go-samples/issues |\r\n\r\n## RPC Communication\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ----------------------------------------------------- | -------- | ---------------------------------------------- | ------------- | ------------------------------------------------------------ |\r\n| client can't get attachments which is set from server | P1 | https://github.com/apache/dubbo-go/issues/2641 | 嘉嘉、凤瑞 | |\r\n| attachment 丢失 | P1 | https://github.com/apache/dubbo-go/issues/2582 | 凤瑞 | |\r\n| common.URL,、内存、goroutine 泄漏 | P0 | issue 2683, 2678 | 吴歆帆&罗颖韬 | doc:https://github.com/apache/dubbo-go/discussions/2750,https://github.com/apache/dubbo-go/discussions/2764 跟 歆帆沟通后,推进相关工作。 |\r\n\r\n## Codec Protocol\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ----------------------------------------------------- | -------- | ------------------------------------------------------------ | ------ | ----------- |\r\n| Rest protocol | P1 | [[[[#2513](https://github.com/apache/dubbo-go/issues/2513)](https://github.com/apache/dubbo-go/issues/2513)](https://github.com/apache/dubbo-go/issues/2513)](https://github.com/apache/dubbo-go/issues/2513) | | |\r\n| | | | | |\r\n| the default maxMsgLength for getty param | P1 | [[[[#2619](https://github.com/apache/dubbo-go/issues/2619)](https://github.com/apache/dubbo-go/issues/2619)](https://github.com/apache/dubbo-go/issues/2619)](https://github.com/apache/dubbo-go/issues/2619) | 吴歆帆 | |\r\n| [Proposal] Unified IDL control for multiple protocols | P1 | [[[[#2595](https://github.com/apache/dubbo-go/issues/2595)](https://github.com/apache/dubbo-go/issues/2595)](https://github.com/apache/dubbo-go/issues/2595)](https://github.com/apache/dubbo-go/issues/2595) | | |\r\n\r\n### Protocol(triple)\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| -------------------------------------------- | -------- | ---------------------------------------------- | ----- | ------------------------------------------------------------ |\r\n| Triple header/trailer usage pattern proposal | P1 | https://github.com/apache/dubbo-go/issues/2422 | 歆帆 | 这里说明了新 triple 实现的一些细节问题,后续整理到 discussion |\r\n| Triple non-proto mode support | P2 | https://github.com/apache/dubbo-go/issues/2491 | 泽亚 | |\r\n| Multi Protocols doesn't work on Nacos | P1 | https://github.com/apache/dubbo-go/issues/2581 | 歆帆 | wuxiaoyu 跟进 |\r\n\r\n\r\n## obersavability\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| --------------------------------------------------------- | -------- | ------------------------------------------------------------ | ----- | ----------- |\r\n| [Triple] Add XXX filter automatically when XXX is enabled | P1 | [[[[#2505](https://github.com/apache/dubbo-go/issues/2505)](https://github.com/apache/dubbo-go/issues/2505)](https://github.com/apache/dubbo-go/issues/2505)](https://github.com/apache/dubbo-go/issues/2505) | | |\r\n| dubbo-go 3.2 grafana 大盘 | P1 | [[[[#2520](https://github.com/apache/dubbo-go/issues/2520)](https://github.com/apache/dubbo-go/issues/2520)](https://github.com/apache/dubbo-go/issues/2520)](https://github.com/apache/dubbo-go/issues/2520) | | |\r\n| dubbo v3 版本已经没有这个api设置日志对象的支持 | P1 | [[[[#2526](https://github.com/apache/dubbo-go/issues/2526)](https://github.com/apache/dubbo-go/issues/2526)](https://github.com/apache/dubbo-go/issues/2526)](https://github.com/apache/dubbo-go/issues/2526) | P1 | |\r\n| Triple OpenTelemetry support | P1 | [[[[#2554](https://github.com/apache/dubbo-go/issues/2554)](https://github.com/apache/dubbo-go/issues/2554)](https://github.com/apache/dubbo-go/issues/2554)](https://github.com/apache/dubbo-go/issues/2554) | | |\r\n| 可观测性改进 | P1 | [[[[#2315](https://github.com/apache/dubbo-go/issues/2315)](https://github.com/apache/dubbo-go/issues/2315)](https://github.com/apache/dubbo-go/issues/2315)](https://github.com/apache/dubbo-go/issues/2315) | | |\r\n\r\n## long-term work\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------------ | ---------------------- | ----------- |\r\n| 易用性改进 | P1 | [[[[#2265](https://github.com/apache/dubbo-go/issues/2265)](https://github.com/apache/dubbo-go/issues/2265)](https://github.com/apache/dubbo-go/issues/2265)](https://github.com/apache/dubbo-go/issues/2265), [[[[#2326](https://github.com/apache/dubbo-go/issues/2326)](https://github.com/apache/dubbo-go/issues/2326)](https://github.com/apache/dubbo-go/issues/2326)](https://github.com/apache/dubbo-go/issues/2326) | | |\r\n| Summarized todos for [[[[#2441](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/apache/dubbo-go/issues/2441) | P1 | [[[[#2442](https://github.com/apache/dubbo-go/issues/2442)](https://github.com/apache/dubbo-go/issues/2442)](https://github.com/apache/dubbo-go/issues/2442)](https://github.com/apache/dubbo-go/issues/2442) | | |\r\n| Dubbo3 api design | P1 | [[[[#2441](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/apache/dubbo-go/issues/2441) | | |\r\n| dubb-go and dubbo-java compatiable | P1 | [[[[#2578](https://github.com/apache/dubbo-go/issues/2578)](https://github.com/apache/dubbo-go/issues/2578)](https://github.com/apache/dubbo-go/issues/2578)](https://github.com/apache/dubbo-go/issues/2578) | | |\r\n| 2024.04.26 weekly | P1 | [[[[#2667](https://github.com/apache/dubbo-go/issues/2667)](https://github.com/apache/dubbo-go/issues/2667)](https://github.com/apache/dubbo-go/issues/2667)](https://github.com/apache/dubbo-go/issues/2667) | | |\r\n| 2022 年制定的一些长期规划 | P0 | [[[[#2136](https://github.com/apache/dubbo-go/issues/2136)](https://github.com/apache/dubbo-go/issues/2136)](https://github.com/apache/dubbo-go/issues/2136)](https://github.com/apache/dubbo-go/issues/2136) | Alex | |\r\n| healthcheck的设计和未来版本的讨论 | P1 | [[[[#2490](https://github.com/apache/dubbo-go/issues/2490)](https://github.com/apache/dubbo-go/issues/2490)](https://github.com/apache/dubbo-go/issues/2490)](https://github.com/apache/dubbo-go/issues/2490) | FinalT | |\r\n| Sample and test-case tasks | P1 | [[[[#2608](https://github.com/apache/dubbo-go/issues/2608)](https://github.com/apache/dubbo-go/issues/2608)](https://github.com/apache/dubbo-go/issues/2608)](https://github.com/apache/dubbo-go/issues/2608) | | |\r\n| Some feature plan and thoughts | P1 | [[[[#2610](https://github.com/apache/dubbo-go/issues/2610)](https://github.com/apache/dubbo-go/issues/2610)](https://github.com/apache/dubbo-go/issues/2610)](https://github.com/apache/dubbo-go/issues/2610) | | |\r\n| 包依赖关系 | P2 | https://github.com/apache/dubbo-go/issues/2377,https://github.com/apache/dubbo-go/issues/2343,嘉嘉: issue:[[[[[#2741](https://github.com/apache/dubbo-go/issues/2741)](https://github.com/apache/dubbo-go/discussions/%5B#2741%5D(https://github.com/apache/dubbo-go/issues/2741))](https://github.com/apache/dubbo-go/discussions/%5B[#2741](https://github.com/apache/dubbo-go/issues/2741)%5D(https://github.com/apache/dubbo-go/issues/2741))](https://github.com/apache/dubbo-go/discussions/%5B[[#2741](https://github.com/apache/dubbo-go/issues/2741)](https://github.com/apache/dubbo-go/issues/2741)%5D(https://github.com/apache/dubbo-go/issues/2741))]([#2741](https://github.com/apache/dubbo-go/issues/2741)) | 张文锋、梁嘉嘉、罗颖韬 | |",
"url": "https://github.com/apache/dubbo-go/discussions/2815",
"createdAt": "2025-03-30T12:53:49Z",
"updatedAt": "2026-02-13T02:13:37Z",
"closed": true,
"closedAt": "2026-02-13T02:13:37Z",
"isAnswered": null,
"author": {
"login": "No-SilverBullet"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 2844,
"title": "2025-04-20 weekly",
"body": "| Item | Link |\r\n| --- | ---- |\r\n| triple | https://github.com/dubbogo/triple |\r\n| gost | https://github.com/dubbogo/gost |\r\n| hessian2 | https://github.com/apache/dubbo-go-hessian2 |\r\n| pixiu | https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions |\r\n| pixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples |\r\n| dubbogo samples | https://github.com/apache/dubbo-go-samples/issues |\r\n| ospp 2025 | [#2801](https://github.com/apache/dubbo-go/issues/2801) |\r\n\r\n## 2025 规划\r\n\r\n1.triple稳定性,解决之前被识别到的issue。\r\n2.内存泄漏问题的定位与解决,需要找一些用户看有没有遇到对应的问题,帮助定位。\r\n3.error分类,consumer调用provider过程中可能会出现多种异常,网络异常、序列化异常、server侧、业务异常、http错误码的映射,参考grpc、connect-rpc的error分类。\r\n4.服务发现,了解应用发现、接口发现,确保服务发现机制正常运行,提升稳定性。\r\n5.xDS,proxyless,参考java侧的文档、成果。\r\n6.AI agent以及gateway探索。\r\n7.提供配置文件手册,丰富文档。\r\n\r\n## Ecosystem\r\n\r\n| Item | Link |\r\n| ------- | ---- |\r\n| pixiu | [dubbo-go-pixiu/dubbo-go-pixiu.github.io#24](https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions/24) |\r\n| pixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples |\r\n| dubbogo samples | https://github.com/apache/dubbo-go-samples/issues |\r\n\r\n## RPC Communication\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---- | -------- | ------- | ------ | ---- |\r\n| [Performance Tuning]Use NotifyAll instead of Notify one after one on address notification. | P1 | [2030 ]( https://github.com/apache/dubbo-go/issues/2030) | | |\r\n| client can't get attachments which is set from server | P1 | [#2641](https://github.com/apache/dubbo-go/issues/2641) | 嘉嘉、凤瑞 | |\r\n| attachment 丢失 | P1 | [#2582](https://github.com/apache/dubbo-go/issues/2582) | 凤瑞 | |\r\n| common.URL,、内存、goroutine 泄漏 | P0 | issue 2683, 2678 | 吴歆帆、罗颖韬 | doc:https://github.com/apache/dubbo-go/discussions/2750,https://github.com/apache/dubbo-go/discussions/2764 跟 歆帆沟通后,推进相关工作。 |\r\n| [Enhancement] multi registry center address verification | P1 | [#2094](https://github.com/apache/dubbo-go/issues/2094) | | |\r\n| 验证一下是否解决 | P0 | [#2078](https://github.com/apache/dubbo-go/issues/2078) | 泽睿 | |\r\n| 应用级服务发现在分组订阅、泛化下测试 | P1 | [#2077](https://github.com/apache/dubbo-go/issues/2077) | | |\r\n| feat: Introducing informer mechanism into the k8s registry | P0 | [#2065](https://github.com/apache/dubbo-go/issues/2065) | 吴歆帆 | k8s |\r\n| 使用 Nacos 同一命名空间时,如果通过应用级服务发现调用其他服务接口,无法同时做到提供使用接口级服务发现的 service | P1 | [#2044](https://github.com/apache/dubbo-go/issues/2044) | | nacos问题 |\r\n| Expose readiness and liveness apis so the process's status can be detected by the scheduling cluster like K8S. | P1 | [#2039](https://github.com/apache/dubbo-go/issues/2039) | | k8s |\r\n| duboo go从配置中心拉取配置出现error,但不影响使用 | P1 | [#2015](https://github.com/apache/dubbo-go/issues/2015) | | nacos问题 |\r\n| Support offline gracefully without registry notification. | P1 | [#1977](https://github.com/apache/dubbo-go/issues/1977) | | |\r\n| bug: nacos-go-sdk stdout redirect | P1 | [#1960](https://github.com/apache/dubbo-go/issues/1960) | | nacos问题 |\r\n| Prompt [i/0 timeout] after calling the service multiple times | P1 | [#1868](https://github.com/apache/dubbo-go/issues/1868) | | |\r\n| 希望dubbogo可以处理java端dubbo框架的token验证 | P1 | [#1711](https://github.com/apache/dubbo-go/issues/1711) | | |\r\n| Imp: delete a service provider when using k8s hpa | P1 | [#1141](https://github.com/apache/dubbo-go/issues/1141) | | k8s |\r\n| [Enhancement] registry type support all | P1 | [2095](https://github.com/apache/dubbo-go/issues/2095) | | |\r\n\r\n## Codec Protocol\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ----- | -------- | ---- | ------ | --- |\r\n| Rest protocol | P1 | [[[[#2513](https://github.com/apache/dubbo-go/issues/2513)](https://github.com/[/issues/2513](https://github.com/apache/dubbo-go/issues/2513))](https://github.com/[/issues/2513](https://github.com/apache/dubbo-go/issues/2513))]([#2513](https://github.com/apache/dubbo-go/issues/2513)) | | |\r\n| the default maxMsgLength for getty param | P1 | [[[[#2619](https://github.com/apache/dubbo-go/issues/2619)](https://github.com/[/issues/2619](https://github.com/apache/dubbo-go/issues/2619))](https://github.com/[/issues/2619](https://github.com/apache/dubbo-go/issues/2619))]([#2619](https://github.com/apache/dubbo-go/issues/2619)) | 吴歆帆 | |\r\n| [Proposal] Unified IDL control for multiple protocols | P1 | [[[[#2595](https://github.com/apache/dubbo-go/issues/2595)](https://github.com/[/issues/2595](https://github.com/apache/dubbo-go/issues/2595))](https://github.com/[/issues/2595](https://github.com/apache/dubbo-go/issues/2595))]([#2595](https://github.com/apache/dubbo-go/issues/2595)) | | |\r\n\r\n### Protocol(triple)\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ----- | -------- | ------- | ----- | ----- |\r\n| Multi Protocols doesn't work on Nacos | P1 | [#2581](https://github.com/apache/dubbo-go/issues/2581) | 凤瑞 | wuxiaoyu 跟进 |\r\n\r\n## obersavability\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| - | -------- | ---- | ----- | --- |\r\n| [Triple] Add XXX filter automatically when XXX is enabled | P1 | [[[[#2505](https://github.com/apache/dubbo-go/issues/2505)](https://github.com/[/issues/2505](https://github.com/apache/dubbo-go/issues/2505))](https://github.com/[/issues/2505](https://github.com/apache/dubbo-go/issues/2505))]([#2505](https://github.com/apache/dubbo-go/issues/2505)) | | |\r\n| dubbo-go 3.2 grafana 大盘 | P1 | [[[[#2520](https://github.com/apache/dubbo-go/issues/2520)](https://github.com/[/issues/2520](https://github.com/apache/dubbo-go/issues/2520))](https://github.com/[/issues/2520](https://github.com/apache/dubbo-go/issues/2520))]([#2520](https://github.com/apache/dubbo-go/issues/2520)) | | |\r\n| dubbo v3 版本已经没有这个api设置日志对象的支持 | P1 | [[[[#2526](https://github.com/apache/dubbo-go/issues/2526)](https://github.com/[/issues/2526](https://github.com/apache/dubbo-go/issues/2526))](https://github.com/[/issues/2526](https://github.com/apache/dubbo-go/issues/2526))]([#2526](https://github.com/apache/dubbo-go/issues/2526)) | | |\r\n| Triple OpenTelemetry support | P1 | [[[[#2554](https://github.com/apache/dubbo-go/issues/2554)](https://github.com/[/issues/2554](https://github.com/apache/dubbo-go/issues/2554))](https://github.com/[/issues/2554](https://github.com/apache/dubbo-go/issues/2554))]([#2554](https://github.com/apache/dubbo-go/issues/2554)) | | |\r\n| 可观测性改进 | P1 | [[[[#2315](https://github.com/apache/dubbo-go/issues/2315)](https://github.com/[/issues/2315](https://github.com/apache/dubbo-go/issues/2315))](https://github.com/[/issues/2315](https://github.com/apache/dubbo-go/issues/2315))]([#2315](https://github.com/apache/dubbo-go/issues/2315)) | | |\r\n| log重复初始化 | P0 | https://github.com/apache/dubbo-go/issues/2148 | Tom | |\r\n\r\n# tools\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| -------- | -------- | ------- | ----- | --- |\r\n| Dubbogo-cli 工具的文档和代码迁移 | P1 | [#1799](https://github.com/apache/dubbo-go/issues/1799) | | |\r\n\r\n# doc\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| -------- | -------- | ------- | ----- | --- |\r\n| If we need a code style? | P2 | [1755 ]( https://github.com/apache/dubbo-go/issues/1755) | | |\r\n| dubbo-go文档 | P2 | [ 2137]( https://github.com/apache/dubbo-go/issues/2137) | | |\r\n| Dubbo Go 文档结构优化设想 | P2 | [ 2153]( https://github.com/apache/dubbo-go/issues/2153) | | |\r\n\r\n## long-term work\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---- | -------- | ---- | ------ | --- |\r\n| 易用性改进 | P1 | [[[[#2265](https://github.com/apache/dubbo-go/issues/2265)](https://github.com/[/issues/2265](https://github.com/apache/dubbo-go/issues/2265))](https://github.com/[/issues/2265](https://github.com/apache/dubbo-go/issues/2265))]([#2265](https://github.com/apache/dubbo-go/issues/2265)), [[[[#2326](https://github.com/apache/dubbo-go/issues/2326)](https://github.com/[/issues/2326](https://github.com/apache/dubbo-go/issues/2326))](https://github.com/[/issues/2326](https://github.com/apache/dubbo-go/issues/2326))]([#2326](https://github.com/apache/dubbo-go/issues/2326)) | | |\r\n| Summarized todos for [[[[#2441](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/[/issues/2441](https://github.com/apache/dubbo-go/issues/2441))](https://github.com/[/issues/2441](https://github.com/apache/dubbo-go/issues/2441))]([#2441](https://github.com/apache/dubbo-go/issues/2441)) | P1 | [[[[#2442](https://github.com/apache/dubbo-go/issues/2442)](https://github.com/[/issues/2442](https://github.com/apache/dubbo-go/issues/2442))](https://github.com/[/issues/2442](https://github.com/apache/dubbo-go/issues/2442))]([#2442](https://github.com/apache/dubbo-go/issues/2442)) | | |\r\n| Dubbo3 api design | P1 | [[[[#2441](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/[/issues/2441](https://github.com/apache/dubbo-go/issues/2441))](https://github.com/[/issues/2441](https://github.com/apache/dubbo-go/issues/2441))]([#2441](https://github.com/apache/dubbo-go/issues/2441)) | | |\r\n| dubb-go and dubbo-java compatiable | P1 | [[[[#2578](https://github.com/apache/dubbo-go/issues/2578)](https://github.com/[/issues/2578](https://github.com/apache/dubbo-go/issues/2578))](https://github.com/[/issues/2578](https://github.com/apache/dubbo-go/issues/2578))]([#2578](https://github.com/apache/dubbo-go/issues/2578)) | | |\r\n| 2024.04.26 weekly | P1 | [[[[#2667](https://github.com/apache/dubbo-go/issues/2667)](https://github.com/[/issues/2667](https://github.com/apache/dubbo-go/issues/2667))](https://github.com/[/issues/2667](https://github.com/apache/dubbo-go/issues/2667))]([#2667](https://github.com/apache/dubbo-go/issues/2667)) | | |\r\n| 2022 年制定的一些长期规划 | P0 | [[[[#2136](https://github.com/apache/dubbo-go/issues/2136)](https://github.com/[/issues/2136](https://github.com/apache/dubbo-go/issues/2136))](https://github.com/[/issues/2136](https://github.com/apache/dubbo-go/issues/2136))]([#2136](https://github.com/apache/dubbo-go/issues/2136)) | Alex | |\r\n| healthcheck的设计和未来版本的讨论 | P1 | [[[[#2490](https://github.com/apache/dubbo-go/issues/2490)](https://github.com/[/issues/2490](https://github.com/apache/dubbo-go/issues/2490))](https://github.com/[/issues/2490](https://github.com/apache/dubbo-go/issues/2490))]([#2490](https://github.com/apache/dubbo-go/issues/2490)) | FinalT | |\r\n| Sample and test-case tasks | P1 | [[[[#2608](https://github.com/apache/dubbo-go/issues/2608)](https://github.com/[/issues/2608](https://github.com/apache/dubbo-go/issues/2608))](https://github.com/[/issues/2608](https://github.com/apache/dubbo-go/issues/2608))]([#2608](https://github.com/apache/dubbo-go/issues/2608)) | | |\r\n| Some feature plan and thoughts | P1 | [[[[#2610](https://github.com/apache/dubbo-go/issues/2610)](https://github.com/[/issues/2610](https://github.com/apache/dubbo-go/issues/2610))](https://github.com/[/issues/2610](https://github.com/apache/dubbo-go/issues/2610))]([#2610](https://github.com/apache/dubbo-go/issues/2610)) | | |\r\n| 包依赖关系 | P2 | https://github.com/apache/dubbo-go/issues/2377,https://github.com/apache/dubbo-go/issues/2343,嘉嘉: issue:[[[[[#2741](https://github.com/apache/dubbo-go/issues/2741)](https://github.com/apache/dubbo-go/discussions/%5B#2741%5D(https://github.com/[/issues/2741](https://github.com/apache/dubbo-go/issues/2741)))](https://github.com/apache/dubbo-go/discussions/%5B[#2741](https://github.com/apache/dubbo-go/issues/2741)%5D(https://github.com/[/issues/2741](https://github.com/apache/dubbo-go/issues/2741)))](https://github.com/apache/dubbo-go/discussions/%5B[[#2741](https://github.com/apache/dubbo-go/issues/2741)](https://github.com/[/issues/2741](https://github.com/apache/dubbo-go/issues/2741))%5D(https://github.com/[/issues/2741](https://github.com/apache/dubbo-go/issues/2741)))]([#2741](https://github.com/apache/dubbo-go/issues/2741)) | 张文锋、梁嘉嘉、罗颖韬 | |\r\n\r\n",
"url": "https://github.com/apache/dubbo-go/discussions/2844",
"createdAt": "2025-04-20T11:51:26Z",
"updatedAt": "2026-02-13T02:13:48Z",
"closed": true,
"closedAt": "2026-02-13T02:13:48Z",
"isAnswered": null,
"author": {
"login": "AlexStocks"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 2845,
"title": "2025-04-27 weekly",
"body": "| Item | Link |\r\n| --- | ---- |\r\n| triple | https://github.com/dubbogo/triple |\r\n| gost | https://github.com/dubbogo/gost |\r\n| hessian2 | https://github.com/apache/dubbo-go-hessian2 |\r\n| pixiu | https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions |\r\n| pixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples |\r\n| dubbogo samples | https://github.com/apache/dubbo-go-samples/issues |\r\n| ospp 2025 | [#2801](https://github.com/apache/dubbo-go/issues/2801) |\r\n\r\n## 2025 规划\r\n\r\n1.triple稳定性,解决之前被识别到的issue。\r\n2.内存泄漏问题的定位与解决,需要找一些用户看有没有遇到对应的问题,帮助定位。\r\n3.error分类,consumer调用provider过程中可能会出现多种异常,网络异常、序列化异常、server侧、业务异常、http错误码的映射,参考grpc、connect-rpc的error分类。\r\n4.服务发现,了解应用发现、接口发现,确保服务发现机制正常运行,提升稳定性。\r\n5.xDS,proxyless,参考java侧的文档、成果。\r\n6.AI agent以及gateway探索。\r\n7.提供配置文件手册,丰富文档。\r\n\r\n## Ecosystem\r\n\r\n| Item | Link |\r\n| ------- | ---- |\r\n| pixiu | [dubbo-go-pixiu/dubbo-go-pixiu.github.io#24](https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions/24) |\r\n| pixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples |\r\n| dubbogo samples | https://github.com/apache/dubbo-go-samples/issues |\r\n\r\n## RPC Communication\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---- | -------- | ------- | ------ | ---- |\r\n| [Performance Tuning]Use NotifyAll instead of Notify one after one on address notification. | P1 | [2030 ]( https://github.com/apache/dubbo-go/issues/2030) | | |\r\n| client can't get attachments which is set from server | P1 | [#2641](https://github.com/apache/dubbo-go/issues/2641) | 嘉嘉、凤瑞 | |\r\n| attachment 丢失 | P1 | [#2582](https://github.com/apache/dubbo-go/issues/2582) | 凤瑞 | |\r\n| common.URL,、内存、goroutine 泄漏 | P0 | issue 2683, 2678 | 吴歆帆、罗颖韬 | doc:https://github.com/apache/dubbo-go/discussions/2750,https://github.com/apache/dubbo-go/discussions/2764 跟 歆帆沟通后,推进相关工作。 |\r\n| [Enhancement] multi registry center address verification | P1 | [#2094](https://github.com/apache/dubbo-go/issues/2094) | | |\r\n| 验证一下是否解决 | P0 | [#2078](https://github.com/apache/dubbo-go/issues/2078) | 泽睿 | |\r\n| 应用级服务发现在分组订阅、泛化下测试 | P1 | [#2077](https://github.com/apache/dubbo-go/issues/2077) | | |\r\n| feat: Introducing informer mechanism into the k8s registry | P0 | [#2065](https://github.com/apache/dubbo-go/issues/2065) | 吴歆帆 | k8s |\r\n| 使用 Nacos 同一命名空间时,如果通过应用级服务发现调用其他服务接口,无法同时做到提供使用接口级服务发现的 service | P1 | [#2044](https://github.com/apache/dubbo-go/issues/2044) | | nacos问题 |\r\n| Expose readiness and liveness apis so the process's status can be detected by the scheduling cluster like K8S. | P1 | [#2039](https://github.com/apache/dubbo-go/issues/2039) | | k8s |\r\n| duboo go从配置中心拉取配置出现error,但不影响使用 | P1 | [#2015](https://github.com/apache/dubbo-go/issues/2015) | | nacos问题 |\r\n| Support offline gracefully without registry notification. | P1 | [#1977](https://github.com/apache/dubbo-go/issues/1977) | | |\r\n| bug: nacos-go-sdk stdout redirect | P1 | [#1960](https://github.com/apache/dubbo-go/issues/1960) | | nacos问题 |\r\n| Prompt [i/0 timeout] after calling the service multiple times | P1 | [#1868](https://github.com/apache/dubbo-go/issues/1868) | | |\r\n| 希望dubbogo可以处理java端dubbo框架的token验证 | P1 | [#1711](https://github.com/apache/dubbo-go/issues/1711) | | |\r\n| Imp: delete a service provider when using k8s hpa | P1 | [#1141](https://github.com/apache/dubbo-go/issues/1141) | | k8s |\r\n| [Enhancement] registry type support all | P1 | [2095](https://github.com/apache/dubbo-go/issues/2095) | | |\r\n\r\n## Codec Protocol\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ----- | -------- | ---- | ------ | --- |\r\n| Rest protocol | P1 | [[[[#2513](https://github.com/apache/dubbo-go/issues/2513)](https://github.com/[/issues/2513](https://github.com/apache/dubbo-go/issues/2513))](https://github.com/[/issues/2513](https://github.com/apache/dubbo-go/issues/2513))]([#2513](https://github.com/apache/dubbo-go/issues/2513)) | | |\r\n| the default maxMsgLength for getty param | P1 | [[[[#2619](https://github.com/apache/dubbo-go/issues/2619)](https://github.com/[/issues/2619](https://github.com/apache/dubbo-go/issues/2619))](https://github.com/[/issues/2619](https://github.com/apache/dubbo-go/issues/2619))]([#2619](https://github.com/apache/dubbo-go/issues/2619)) | 吴歆帆 | |\r\n| [Proposal] Unified IDL control for multiple protocols | P1 | [[[[#2595](https://github.com/apache/dubbo-go/issues/2595)](https://github.com/[/issues/2595](https://github.com/apache/dubbo-go/issues/2595))](https://github.com/[/issues/2595](https://github.com/apache/dubbo-go/issues/2595))]([#2595](https://github.com/apache/dubbo-go/issues/2595)) | | |\r\n\r\n### Protocol(triple)\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ----- | -------- | ------- | ----- | ----- |\r\n| Multi Protocols doesn't work on Nacos | P1 | [#2581](https://github.com/apache/dubbo-go/issues/2581) | 凤瑞 | wuxiaoyu 跟进 |\r\n\r\n## obersavability\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| - | -------- | ---- | ----- | --- |\r\n| [Triple] Add XXX filter automatically when XXX is enabled | P1 | [[[[#2505](https://github.com/apache/dubbo-go/issues/2505)](https://github.com/[/issues/2505](https://github.com/apache/dubbo-go/issues/2505))](https://github.com/[/issues/2505](https://github.com/apache/dubbo-go/issues/2505))]([#2505](https://github.com/apache/dubbo-go/issues/2505)) | | |\r\n| dubbo-go 3.2 grafana 大盘 | P1 | [[[[#2520](https://github.com/apache/dubbo-go/issues/2520)](https://github.com/[/issues/2520](https://github.com/apache/dubbo-go/issues/2520))](https://github.com/[/issues/2520](https://github.com/apache/dubbo-go/issues/2520))]([#2520](https://github.com/apache/dubbo-go/issues/2520)) | | |\r\n| dubbo v3 版本已经没有这个api设置日志对象的支持 | P1 | [[[[#2526](https://github.com/apache/dubbo-go/issues/2526)](https://github.com/[/issues/2526](https://github.com/apache/dubbo-go/issues/2526))](https://github.com/[/issues/2526](https://github.com/apache/dubbo-go/issues/2526))]([#2526](https://github.com/apache/dubbo-go/issues/2526)) | | |\r\n| Triple OpenTelemetry support | P1 | [[[[#2554](https://github.com/apache/dubbo-go/issues/2554)](https://github.com/[/issues/2554](https://github.com/apache/dubbo-go/issues/2554))](https://github.com/[/issues/2554](https://github.com/apache/dubbo-go/issues/2554))]([#2554](https://github.com/apache/dubbo-go/issues/2554)) | | |\r\n| 可观测性改进 | P1 | [[[[#2315](https://github.com/apache/dubbo-go/issues/2315)](https://github.com/[/issues/2315](https://github.com/apache/dubbo-go/issues/2315))](https://github.com/[/issues/2315](https://github.com/apache/dubbo-go/issues/2315))]([#2315](https://github.com/apache/dubbo-go/issues/2315)) | | |\r\n| log重复初始化 | P0 | https://github.com/apache/dubbo-go/issues/2148 | Tom | |\r\n\r\n# tools\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| -------- | -------- | ------- | ----- | --- |\r\n| Dubbogo-cli 工具的文档和代码迁移 | P1 | [#1799](https://github.com/apache/dubbo-go/issues/1799) | | |\r\n\r\n# doc\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| -------- | -------- | ------- | ----- | --- |\r\n| If we need a code style? | P2 | [1755 ]( https://github.com/apache/dubbo-go/issues/1755) | | |\r\n| dubbo-go文档 | P2 | [ 2137]( https://github.com/apache/dubbo-go/issues/2137) | | |\r\n| Dubbo Go 文档结构优化设想 | P2 | [ 2153]( https://github.com/apache/dubbo-go/issues/2153) | | |\r\n\r\n## long-term work\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---- | -------- | ---- | ------ | --- |\r\n| 易用性改进 | P1 | [[[[#2265](https://github.com/apache/dubbo-go/issues/2265)](https://github.com/[/issues/2265](https://github.com/apache/dubbo-go/issues/2265))](https://github.com/[/issues/2265](https://github.com/apache/dubbo-go/issues/2265))]([#2265](https://github.com/apache/dubbo-go/issues/2265)), [[[[#2326](https://github.com/apache/dubbo-go/issues/2326)](https://github.com/[/issues/2326](https://github.com/apache/dubbo-go/issues/2326))](https://github.com/[/issues/2326](https://github.com/apache/dubbo-go/issues/2326))]([#2326](https://github.com/apache/dubbo-go/issues/2326)) | | |\r\n| Summarized todos for [[[[#2441](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/[/issues/2441](https://github.com/apache/dubbo-go/issues/2441))](https://github.com/[/issues/2441](https://github.com/apache/dubbo-go/issues/2441))]([#2441](https://github.com/apache/dubbo-go/issues/2441)) | P1 | [[[[#2442](https://github.com/apache/dubbo-go/issues/2442)](https://github.com/[/issues/2442](https://github.com/apache/dubbo-go/issues/2442))](https://github.com/[/issues/2442](https://github.com/apache/dubbo-go/issues/2442))]([#2442](https://github.com/apache/dubbo-go/issues/2442)) | | |\r\n| Dubbo3 api design | P1 | [[[[#2441](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/[/issues/2441](https://github.com/apache/dubbo-go/issues/2441))](https://github.com/[/issues/2441](https://github.com/apache/dubbo-go/issues/2441))]([#2441](https://github.com/apache/dubbo-go/issues/2441)) | | |\r\n| dubb-go and dubbo-java compatiable | P1 | [[[[#2578](https://github.com/apache/dubbo-go/issues/2578)](https://github.com/[/issues/2578](https://github.com/apache/dubbo-go/issues/2578))](https://github.com/[/issues/2578](https://github.com/apache/dubbo-go/issues/2578))]([#2578](https://github.com/apache/dubbo-go/issues/2578)) | | |\r\n| 2024.04.26 weekly | P1 | [[[[#2667](https://github.com/apache/dubbo-go/issues/2667)](https://github.com/[/issues/2667](https://github.com/apache/dubbo-go/issues/2667))](https://github.com/[/issues/2667](https://github.com/apache/dubbo-go/issues/2667))]([#2667](https://github.com/apache/dubbo-go/issues/2667)) | | |\r\n| 2022 年制定的一些长期规划 | P0 | [[[[#2136](https://github.com/apache/dubbo-go/issues/2136)](https://github.com/[/issues/2136](https://github.com/apache/dubbo-go/issues/2136))](https://github.com/[/issues/2136](https://github.com/apache/dubbo-go/issues/2136))]([#2136](https://github.com/apache/dubbo-go/issues/2136)) | Alex | |\r\n| healthcheck的设计和未来版本的讨论 | P1 | [[[[#2490](https://github.com/apache/dubbo-go/issues/2490)](https://github.com/[/issues/2490](https://github.com/apache/dubbo-go/issues/2490))](https://github.com/[/issues/2490](https://github.com/apache/dubbo-go/issues/2490))]([#2490](https://github.com/apache/dubbo-go/issues/2490)) | FinalT | |\r\n| Sample and test-case tasks | P1 | [[[[#2608](https://github.com/apache/dubbo-go/issues/2608)](https://github.com/[/issues/2608](https://github.com/apache/dubbo-go/issues/2608))](https://github.com/[/issues/2608](https://github.com/apache/dubbo-go/issues/2608))]([#2608](https://github.com/apache/dubbo-go/issues/2608)) | | |\r\n| Some feature plan and thoughts | P1 | [[[[#2610](https://github.com/apache/dubbo-go/issues/2610)](https://github.com/[/issues/2610](https://github.com/apache/dubbo-go/issues/2610))](https://github.com/[/issues/2610](https://github.com/apache/dubbo-go/issues/2610))]([#2610](https://github.com/apache/dubbo-go/issues/2610)) | | |\r\n| 包依赖关系 | P2 | https://github.com/apache/dubbo-go/issues/2377,https://github.com/apache/dubbo-go/issues/2343,嘉嘉: issue:[[[[[#2741](https://github.com/apache/dubbo-go/issues/2741)](https://github.com/apache/dubbo-go/discussions/%5B#2741%5D(https://github.com/[/issues/2741](https://github.com/apache/dubbo-go/issues/2741)))](https://github.com/apache/dubbo-go/discussions/%5B[#2741](https://github.com/apache/dubbo-go/issues/2741)%5D(https://github.com/[/issues/2741](https://github.com/apache/dubbo-go/issues/2741)))](https://github.com/apache/dubbo-go/discussions/%5B[[#2741](https://github.com/apache/dubbo-go/issues/2741)](https://github.com/[/issues/2741](https://github.com/apache/dubbo-go/issues/2741))%5D(https://github.com/[/issues/2741](https://github.com/apache/dubbo-go/issues/2741)))]([#2741](https://github.com/apache/dubbo-go/issues/2741)) | 张文锋、梁嘉嘉、罗颖韬 | |\r\n\r\n",
"url": "https://github.com/apache/dubbo-go/discussions/2845",
"createdAt": "2025-04-20T20:22:02Z",
"updatedAt": "2026-02-13T02:13:42Z",
"closed": true,
"closedAt": "2026-02-13T02:13:42Z",
"isAnswered": null,
"author": {
"login": "AlexStocks"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 2853,
"title": "2025-04-27 weekly",
"body": "| Item | Link |\r\n| --------------- | ------------------------------------------------------------ |\r\n| triple | https://github.com/dubbogo/triple |\r\n| gost | https://github.com/dubbogo/gost |\r\n| hessian2 | https://github.com/apache/dubbo-go-hessian2 |\r\n| pixiu | https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions |\r\n| pixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples |\r\n| dubbogo samples | https://github.com/apache/dubbo-go-samples/issues |\r\n| ospp 2025 | [#2801](https://github.com/apache/dubbo-go/issues/2801) |\r\n\r\n## 2025 规划\r\n\r\n1.triple稳定性,解决之前被识别到的issue。\r\n2.内存泄漏问题的定位与解决,需要找一些用户看有没有遇到对应的问题,帮助定位。\r\n3.error分类,consumer调用provider过程中可能会出现多种异常,网络异常、序列化异常、server侧、业务异常、http错误码的映射,参考grpc、connect-rpc的error分类。\r\n4.服务发现,了解应用发现、接口发现,确保服务发现机制正常运行,提升稳定性。\r\n5.xDS,proxyless,参考java侧的文档、成果。\r\n6.AI agent以及gateway探索。\r\n7.提供配置文件手册,丰富文档。\r\n\r\n## Ecosystem\r\n\r\n| Item | Link |\r\n| --------------- | ------------------------------------------------------------ |\r\n| pixiu | [dubbo-go-pixiu/dubbo-go-pixiu.github.io#24](https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions/24) |\r\n| pixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples |\r\n| dubbogo samples | https://github.com/apache/dubbo-go-samples/issues |\r\n\r\n## RPC Communication\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------- | -------------- | ------------------------------------------------------------ |\r\n| [Performance Tuning]Use NotifyAll instead of Notify one after one on address notification. | P1 | [2030 ](https://github.com/apache/dubbo-go/issues/2030) | | |\r\n| client can't get attachments which is set from server | P1 | [#2641](https://github.com/apache/dubbo-go/issues/2641) | 嘉嘉、凤瑞 | |\r\n| attachment 丢失 | P1 | [#2582](https://github.com/apache/dubbo-go/issues/2582) | 凤瑞 | |\r\n| common.URL,、内存、goroutine 泄漏 | P0 | issue 2683, 2678 | 吴歆帆、罗颖韬 | doc:https://github.com/apache/dubbo-go/discussions/2750,https://github.com/apache/dubbo-go/discussions/2764 跟 歆帆沟通后,推进相关工作。 |\r\n| [Enhancement] multi registry center address verification | P1 | [#2094](https://github.com/apache/dubbo-go/issues/2094) | 凤瑞 | |\r\n| 应用级服务发现在分组订阅、泛化下测试 | P1 | [#2077](https://github.com/apache/dubbo-go/issues/2077) | | |\r\n| feat: Introducing informer mechanism into the k8s registry | P0 | [#2065](https://github.com/apache/dubbo-go/issues/2065) | 吴歆帆 | k8s |\r\n| 使用 Nacos 同一命名空间时,如果通过应用级服务发现调用其他服务接口,无法同时做到提供使用接口级服务发现的 service | P1 | [#2044](https://github.com/apache/dubbo-go/issues/2044) | 杨泽睿 | nacos问题 | \r\n| Expose readiness and liveness apis so the process's status can be detected by the scheduling cluster like K8S. | P1 | [#2039](https://github.com/apache/dubbo-go/issues/2039) | | k8s |\r\n| duboo go从配置中心拉取配置出现error,但不影响使用 | P1 | [#2015](https://github.com/apache/dubbo-go/issues/2015) | | nacos问题 |\r\n| Support offline gracefully without registry notification. | P1 | [#1977](https://github.com/apache/dubbo-go/issues/1977) | | |\r\n| bug: nacos-go-sdk stdout redirect | P1 | [#1960](https://github.com/apache/dubbo-go/issues/1960) | 罗颖韬 | nacos问题 |\r\n| Prompt [i/0 timeout] after calling the service multiple times | P1 | [#1868](https://github.com/apache/dubbo-go/issues/1868) | 玉林 | |\r\n| 希望dubbogo可以处理java端dubbo框架的token验证 | P1 | [#1711](https://github.com/apache/dubbo-go/issues/1711) | | |\r\n| Imp: delete a service provider when using k8s hpa | P1 | [#1141](https://github.com/apache/dubbo-go/issues/1141) | | k8s |\r\n| ut failure of TestUnavailableIfHostInvalid | P1 | [2851](https://github.com/apache/dubbo-go/issues/2851) | 泽亚 | \r\n| 升级 golangci-lint 的版本 | P1 | [2850](https://github.com/apache/dubbo-go/issues/2850) | 广池 | \r\n| Package dependency optimization | P1 | [#2741](https://github.com/apache/dubbo-go/issues/2741) | 泽亚,嘉嘉,文峰 | |\r\n## Codec Protocol\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ----------------------------------------------------- | -------- | ------------------------------------------------------------ | ------ | ----------- |\r\n| Rest protocol | P1 | [[[[#2513](https://github.com/apache/dubbo-go/issues/2513)](https://github.com/[/issues/2513](https://github.com/apache/dubbo-go/issues/2513))](https://github.com/[/issues/2513](https://github.com/apache/dubbo-go/issues/2513))]([#2513](https://github.com/apache/dubbo-go/issues/2513)) | | |\r\n| the default maxMsgLength for getty param | P1 | [[[[#2619](https://github.com/apache/dubbo-go/issues/2619)](https://github.com/[/issues/2619](https://github.com/apache/dubbo-go/issues/2619))](https://github.com/[/issues/2619](https://github.com/apache/dubbo-go/issues/2619))]([#2619](https://github.com/apache/dubbo-go/issues/2619)) | 吴歆帆 | |\r\n| [Proposal] Unified IDL control for multiple protocols | P1 | [[[[#2595](https://github.com/apache/dubbo-go/issues/2595)](https://github.com/[/issues/2595](https://github.com/apache/dubbo-go/issues/2595))](https://github.com/[/issues/2595](https://github.com/apache/dubbo-go/issues/2595))]([#2595](https://github.com/apache/dubbo-go/issues/2595)) | | |\r\n\r\n### Protocol(triple)\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------- | -------- | ------------------------------------------------------- | ----- | ------------- |\r\n| Multi Protocols doesn't work on Nacos | P1 | [#2581](https://github.com/apache/dubbo-go/issues/2581) | 凤瑞 | wuxiaoyu 跟进 |\r\n\r\n## obersavability\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| --------------------------------------------------------- | -------- | ------------------------------------------------------------ | ----- | ----------- |\r\n| [Triple] Add XXX filter automatically when XXX is enabled | P1 | [[[[#2505](https://github.com/apache/dubbo-go/issues/2505)](https://github.com/[/issues/2505](https://github.com/apache/dubbo-go/issues/2505))](https://github.com/[/issues/2505](https://github.com/apache/dubbo-go/issues/2505))]([#2505](https://github.com/apache/dubbo-go/issues/2505)) | | |\r\n| dubbo-go 3.2 grafana 大盘 | P1 | [[[[#2520](https://github.com/apache/dubbo-go/issues/2520)](https://github.com/[/issues/2520](https://github.com/apache/dubbo-go/issues/2520))](https://github.com/[/issues/2520](https://github.com/apache/dubbo-go/issues/2520))]([#2520](https://github.com/apache/dubbo-go/issues/2520)) | | |\r\n| dubbo v3 版本已经没有这个api设置日志对象的支持 | P1 | [[[[#2526](https://github.com/apache/dubbo-go/issues/2526)](https://github.com/[/issues/2526](https://github.com/apache/dubbo-go/issues/2526))](https://github.com/[/issues/2526](https://github.com/apache/dubbo-go/issues/2526))]([#2526](https://github.com/apache/dubbo-go/issues/2526)) | | |\r\n| Triple OpenTelemetry support | P1 | [[[[#2554](https://github.com/apache/dubbo-go/issues/2554)](https://github.com/[/issues/2554](https://github.com/apache/dubbo-go/issues/2554))](https://github.com/[/issues/2554](https://github.com/apache/dubbo-go/issues/2554))]([#2554](https://github.com/apache/dubbo-go/issues/2554)) | | |\r\n| 可观测性改进 | P1 | [[[[#2315](https://github.com/apache/dubbo-go/issues/2315)](https://github.com/[/issues/2315](https://github.com/apache/dubbo-go/issues/2315))](https://github.com/[/issues/2315](https://github.com/apache/dubbo-go/issues/2315))]([#2315](https://github.com/apache/dubbo-go/issues/2315)) | | |\r\n| log重复初始化 | P0 | [#2148](https://github.com/apache/dubbo-go/issues/2148) | Tom | |\r\n\r\n# tools\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| -------------------------------- | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| Dubbogo-cli 工具的文档和代码迁移 | P1 | [#1799](https://github.com/apache/dubbo-go/issues/1799) | | |\r\n\r\n# doc\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------- | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| If we need a code style? | P2 | [1755 ](https://github.com/apache/dubbo-go/issues/1755) | | |\r\n| dubbo-go文档 | P2 | [2137](https://github.com/apache/dubbo-go/issues/2137) | | |\r\n| Dubbo Go 文档结构优化设想 | P2 | [2153](https://github.com/apache/dubbo-go/issues/2153) | | |\r\n\r\n## long-term work\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------------ | ------ | ----------- |\r\n| 易用性改进 | P1 | [[[[#2265](https://github.com/apache/dubbo-go/issues/2265)](https://github.com/[/issues/2265](https://github.com/apache/dubbo-go/issues/2265))](https://github.com/[/issues/2265](https://github.com/apache/dubbo-go/issues/2265))]([#2265](https://github.com/apache/dubbo-go/issues/2265)), [[[[#2326](https://github.com/apache/dubbo-go/issues/2326)](https://github.com/[/issues/2326](https://github.com/apache/dubbo-go/issues/2326))](https://github.com/[/issues/2326](https://github.com/apache/dubbo-go/issues/2326))]([#2326](https://github.com/apache/dubbo-go/issues/2326)) | | |\r\n| Summarized todos for [[[[#2441](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/[/issues/2441](https://github.com/apache/dubbo-go/issues/2441))](https://github.com/[/issues/2441](https://github.com/apache/dubbo-go/issues/2441))]([#2441](https://github.com/apache/dubbo-go/issues/2441)) | P1 | [[[[#2442](https://github.com/apache/dubbo-go/issues/2442)](https://github.com/[/issues/2442](https://github.com/apache/dubbo-go/issues/2442))](https://github.com/[/issues/2442](https://github.com/apache/dubbo-go/issues/2442))]([#2442](https://github.com/apache/dubbo-go/issues/2442)) | | |\r\n| Dubbo3 api design | P1 | [[[[#2441](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/[/issues/2441](https://github.com/apache/dubbo-go/issues/2441))](https://github.com/[/issues/2441](https://github.com/apache/dubbo-go/issues/2441))]([#2441](https://github.com/apache/dubbo-go/issues/2441)) | | |\r\n| dubb-go and dubbo-java compatiable | P1 | [[[[#2578](https://github.com/apache/dubbo-go/issues/2578)](https://github.com/[/issues/2578](https://github.com/apache/dubbo-go/issues/2578))](https://github.com/[/issues/2578](https://github.com/apache/dubbo-go/issues/2578))]([#2578](https://github.com/apache/dubbo-go/issues/2578)) | | |\r\n| 2024.04.26 weekly | P1 | [[[[#2667](https://github.com/apache/dubbo-go/issues/2667)](https://github.com/[/issues/2667](https://github.com/apache/dubbo-go/issues/2667))](https://github.com/[/issues/2667](https://github.com/apache/dubbo-go/issues/2667))]([#2667](https://github.com/apache/dubbo-go/issues/2667)) | | |\r\n| 2022 年制定的一些长期规划 | P0 | [[[[#2136](https://github.com/apache/dubbo-go/issues/2136)](https://github.com/[/issues/2136](https://github.com/apache/dubbo-go/issues/2136))](https://github.com/[/issues/2136](https://github.com/apache/dubbo-go/issues/2136))]([#2136](https://github.com/apache/dubbo-go/issues/2136)) | Alex | |\r\n| healthcheck的设计和未来版本的讨论 | P1 | [[[[#2490](https://github.com/apache/dubbo-go/issues/2490)](https://github.com/[/issues/2490](https://github.com/apache/dubbo-go/issues/2490))](https://github.com/[/issues/2490](https://github.com/apache/dubbo-go/issues/2490))]([#2490](https://github.com/apache/dubbo-go/issues/2490)) | FinalT | |\r\n| Sample and test-case tasks | P1 | [[[[#2608](https://github.com/apache/dubbo-go/issues/2608)](https://github.com/[/issues/2608](https://github.com/apache/dubbo-go/issues/2608))](https://github.com/[/issues/2608](https://github.com/apache/dubbo-go/issues/2608))]([#2608](https://github.com/apache/dubbo-go/issues/2608)) | | |\r\n| Some feature plan and thoughts | P1 | [[[[#2610](https://github.com/apache/dubbo-go/issues/2610)](https://github.com/[/issues/2610](https://github.com/apache/dubbo-go/issues/2610))](https://github.com/[/issues/2610](https://github.com/apache/dubbo-go/issues/2610))]([#2610](https://github.com/apache/dubbo-go/issues/2610)) | | |\r\n| 包依赖关系 | P2 | https://github.com/apache/dubbo-go/issues/2377,https://github.com/apache/dubbo-go/issues/2343,嘉嘉: issue:[[[[[#2741](https://github.com/apache/dubbo-go/issues/2741)](https://github.com/apache/dubbo-go/discussions/%5B#2741%5D(https://github.com/[/issues/2741](https://github.com/apache/dubbo-go/issues/2741)))](https://github.com/apache/dubbo-go/discussions/%5B[#2741](https://github.com/apache/dubbo-go/issues/2741)%5D(https://github.com/[/issues/2741](https://github.com/apache/dubbo-go/issues/2741)))](https://github.com/apache/dubbo-go/discussions/%5B[[#2741](https://github.com/apache/dubbo-go/issues/2741)](https://github.com/[/issues/2741](https://github.com/apache/dubbo-go/issues/2741))%5D(https://github.com/[/issues/2741](https://github.com/apache/dubbo-go/issues/2741)))]([#2741](https://github.com/apache/dubbo-go/issues/2741)) | | ",
"url": "https://github.com/apache/dubbo-go/discussions/2853",
"createdAt": "2025-04-26T13:03:25Z",
"updatedAt": "2026-02-13T02:14:07Z",
"closed": true,
"closedAt": "2026-02-13T02:14:07Z",
"isAnswered": null,
"author": {
"login": "1kasa"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 2857,
"title": "Why delete the Apollo config center?",
"body": "I don't understand why the Apollo config center is deleted? As an RPC framework, isn't it a good thing to support more config centers? Just asking, what level of questionnaire is [1928](https://github.com/apache/dubbo-go/issues/1928)\r\n\r\nIf Apollo Config Center is no longer supported, what are the recommendations for its users? Would the only option be for users to implement Apollo themselves and maintain a private package?\r\n",
"url": "https://github.com/apache/dubbo-go/discussions/2857",
"createdAt": "2025-05-01T14:03:24Z",
"updatedAt": "2026-02-13T02:17:41Z",
"closed": true,
"closedAt": "2026-02-13T02:17:41Z",
"isAnswered": null,
"author": {
"login": "xuzhijvn"
},
"category": {
"name": "General"
},
"answer": null,
"comments": [
{
"id": "DC_kwDOCJS8R84AxoNs",
"url": "https://github.com/apache/dubbo-go/discussions/2857#discussioncomment-13009772",
"body": "Hi @xuzhijvn , thank you for your attention to dubbogo. As a service-govern framework, dubbogo supports so many third-party middleware before which leads to a large maintenance burden for our community. If you really need it in your com, we can have a talk continuously in this issue.",
"createdAt": "2025-05-02T03:22:18Z",
"updatedAt": "2025-05-02T03:22:19Z",
"author": {
"login": "AlexStocks"
},
"replies": [
{
"id": "DC_kwDOCJS8R84Axruz",
"url": "https://github.com/apache/dubbo-go/discussions/2857#discussioncomment-13024179",
"body": "I agree with your perspective—supporting too many third-party middleware does require substantial effort. While I don't have exact statistics, I believe there is still a significant number of existing users using Apollo as their configuration center, particularly those with Java-based tech stacks. During their transition (e.g., migrating from Dubbo Java to Dubbo Go), Apollo support would help reduce migration costs. Even if they eventually switch to another configuration center, this would still be a gradual process. Therefore, I believe Apollo support in `dubbogo` would be highly valuable for such users. I’d be very willing to contribute this part of the code, if you also think it would be valuable.",
"createdAt": "2025-05-03T14:07:42Z",
"updatedAt": "2025-05-03T14:07:43Z",
"author": {
"login": "xuzhijvn"
}
},
{
"id": "DC_kwDOCJS8R84Axsl0",
"url": "https://github.com/apache/dubbo-go/discussions/2857#discussioncomment-13027700",
"body": " @xuzhijvn If so, your PR and contribution will be welcome. Thank you again in the name of dubbogo community.",
"createdAt": "2025-05-04T01:55:16Z",
"updatedAt": "2025-05-04T01:55:17Z",
"author": {
"login": "AlexStocks"
}
},
{
"id": "DC_kwDOCJS8R84AxuID",
"url": "https://github.com/apache/dubbo-go/discussions/2857#discussioncomment-13033987",
"body": "Roger that. I'll submit it shortly. Please let me know if you have any suggestions.",
"createdAt": "2025-05-05T00:14:16Z",
"updatedAt": "2025-05-05T00:14:17Z",
"author": {
"login": "xuzhijvn"
}
},
{
"id": "DC_kwDOCJS8R84Axu0e",
"url": "https://github.com/apache/dubbo-go/discussions/2857#discussioncomment-13036830",
"body": "> Roger that. I'll submit it shortly. Please let me know if you have any suggestions.\r\n\r\nJust do it. Thx agagin.",
"createdAt": "2025-05-05T09:13:12Z",
"updatedAt": "2025-05-05T09:13:26Z",
"author": {
"login": "AlexStocks"
}
}
]
}
]
},
{
"number": 2883,
"title": "2025-05-18 weekly",
"body": "| Item | Link |\r\n| --------------- | ------------------------------------------------------------ |\r\n| gost | https://github.com/dubbogo/gost |\r\n| hessian2 | https://github.com/apache/dubbo-go-hessian2 |\r\n| pixiu | https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions |\r\n| pixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples |\r\n| dubbogo samples | https://github.com/apache/dubbo-go-samples/issues |\r\n| ospp 2025 | [#2801](https://github.com/apache/dubbo-go/issues/2801) |\r\n\r\n## 2025 规划\r\n\r\n1.triple稳定性,解决之前被识别到的issue。\r\n2.内存泄漏问题的定位与解决,需要找一些用户看有没有遇到对应的问题,帮助定位。\r\n3.error分类,consumer调用provider过程中可能会出现多种异常,网络异常、序列化异常、server侧、业务异常、http错误码的映射,参考grpc、connect-rpc的error分类。\r\n4.服务发现,了解应用发现、接口发现,确保服务发现机制正常运行,提升稳定性。\r\n5.xDS,proxyless,参考java侧的文档、成果。\r\n6.AI agent以及gateway探索。\r\n7.提供配置文件手册,丰富文档。\r\n\r\n## Ecosystem\r\n\r\n| Item | Link |\r\n| --------------- | ------------------------------------------------------------ |\r\n| pixiu | [dubbo-go-pixiu/dubbo-go-pixiu.github.io#24](https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions/24) |\r\n| pixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples |\r\n| dubbogo samples | https://github.com/apache/dubbo-go-samples/issues |\r\n\r\n## RPC Communication\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------- | ---------------- | ------------------------------------------------------------ |\r\n| client can't get attachments which is set from server | P1 | [#2641](https://github.com/apache/dubbo-go/issues/2641) | 嘉嘉、凤瑞 | |\r\n| common.URL,、内存、goroutine 泄漏 | P0 | issue 2683, 2678 | 吴歆帆、罗颖韬 | doc:https://github.com/apache/dubbo-go/discussions/2750,https://github.com/apache/dubbo-go/discussions/2764 跟 歆帆沟通后,推进相关工作。 参考dubbo-go-samples的URL
dubbo-go-pixiu-samples |\r\n| 应用级服务发现在分组订阅、泛化下测试 | P1 | [#2077](https://github.com/apache/dubbo-go/issues/2077) | | |\r\n| feat: Introducing informer mechanism into the k8s registry | P0 | [#2065](https://github.com/apache/dubbo-go/issues/2065) | 吴歆帆 | k8s |\r\n| 使用 Nacos 同一命名空间时,如果通过应用级服务发现调用其他服务接口,无法同时做到提供使用接口级服务发现的 service | P1 | [#2044](https://github.com/apache/dubbo-go/issues/2044) | 杨泽睿 | nacos问题 5-18跟进 |\r\n| Expose readiness and liveness apis so the process's status can be detected by the scheduling cluster like K8S. | P1 | [#2039](https://github.com/apache/dubbo-go/issues/2039) | | k8s |\r\n| duboo go从配置中心拉取配置出现error,但不影响使用 | P1 | [#2015](https://github.com/apache/dubbo-go/issues/2015) | nanjiek | nacos问题 |\r\n| Support offline gracefully without registry notification. | P1 | [#1977](https://github.com/apache/dubbo-go/issues/1977) | 潘炼 | |\r\n| Prompt [i/0 timeout] after calling the service multiple times | P1 | [#1868](https://github.com/apache/dubbo-go/issues/1868) | 玉林 | 正在复现 |\r\n| 希望dubbogo可以处理java端dubbo框架的token验证 | P1 | [#1711](https://github.com/apache/dubbo-go/issues/1711) | xiaoyu | |\r\n| Imp: delete a service provider when using k8s hpa | P1 | [#1141](https://github.com/apache/dubbo-go/issues/1141) | | k8s |\r\n| ut failure of TestUnavailableIfHostInvalid | P1 | [2851](https://github.com/apache/dubbo-go/issues/2851) | 泽亚 | |\r\n| Package dependency optimization | P1 | [#2741](https://github.com/apache/dubbo-go/issues/2741) | 泽亚,嘉嘉,文峰 | 5-18 分配出去了 |\r\n## Codec Protocol\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ----------------------------------------------------- | -------- | ------------------------------------------------------------ | ------ | ----------- |\r\n| Rest protocol | P1 | [[[[#2513](https://github.com/apache/dubbo-go/issues/2513)](https://github.com/[/issues/2513](https://github.com/apache/dubbo-go/issues/2513))](https://github.com/[/issues/2513](https://github.com/apache/dubbo-go/issues/2513))]([#2513](https://github.com/apache/dubbo-go/issues/2513)) | | |\r\n| the default maxMsgLength for getty param | P1 | [[[[#2619](https://github.com/apache/dubbo-go/issues/2619)](https://github.com/[/issues/2619](https://github.com/apache/dubbo-go/issues/2619))](https://github.com/[/issues/2619](https://github.com/apache/dubbo-go/issues/2619))]([#2619](https://github.com/apache/dubbo-go/issues/2619)) | 吴歆帆 | |\r\n\r\n### Protocol(triple)\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------- | -------- | ------------------------------------------------------- | -------- | -------------------------------------------------- |\r\n| Multi Protocols doesn't work on Nacos | P1 | [#2581](https://github.com/apache/dubbo-go/issues/2581) | wuxiaoyu | [pr](https://github.com/apache/dubbo-go/pull/2882) |\r\n\r\n## obersavability\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---------------------------------------------- | -------- | ------------------------------------------------------------ | ------ | -------------------------------------------------- |\r\n| dubbo-go 3.2 grafana 大盘 | P1 | [[[[#2520](https://github.com/apache/dubbo-go/issues/2520)](https://github.com/[/issues/2520](https://github.com/apache/dubbo-go/issues/2520))](https://github.com/[/issues/2520](https://github.com/apache/dubbo-go/issues/2520))]([#2520](https://github.com/apache/dubbo-go/issues/2520)) | | |\r\n| dubbo v3 版本已经没有这个api设置日志对象的支持 | P1 | [[[[#2526](https://github.com/apache/dubbo-go/issues/2526)](https://github.com/[/issues/2526](https://github.com/apache/dubbo-go/issues/2526))](https://github.com/[/issues/2526](https://github.com/apache/dubbo-go/issues/2526))]([#2526](https://github.com/apache/dubbo-go/issues/2526)) | TOM | [pr](https://github.com/apache/dubbo-go/pull/2838) |\r\n| Triple OpenTelemetry support | P1 | [[[[#2554](https://github.com/apache/dubbo-go/issues/2554)](https://github.com/[/issues/2554](https://github.com/apache/dubbo-go/issues/2554))](https://github.com/[/issues/2554](https://github.com/apache/dubbo-go/issues/2554))]([#2554](https://github.com/apache/dubbo-go/issues/2554)) | 方泽亚 | |\r\n| log重复初始化 | P0 | [#2148](https://github.com/apache/dubbo-go/issues/2148) | Tom | |\r\n\r\n# tools\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| -------------------------------- | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| Dubbogo-cli 工具的文档和代码迁移 | P1 | [#1799](https://github.com/apache/dubbo-go/issues/1799) | | |\r\n\r\n# doc\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------- | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| If we need a code style? | P2 | [1755 ](https://github.com/apache/dubbo-go/issues/1755) | | |\r\n| dubbo-go文档 | P2 | [2137](https://github.com/apache/dubbo-go/issues/2137) | | |\r\n| Dubbo Go 文档结构优化设想 | P2 | [2153](https://github.com/apache/dubbo-go/issues/2153) | | |\r\n\r\n\r\n\r\n## long-term work\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------------ | ------ | ----------- |\r\n| 易用性改进 | P1 | [[[[#2265](https://github.com/apache/dubbo-go/issues/2265)](https://github.com/[/issues/2265](https://github.com/apache/dubbo-go/issues/2265))](https://github.com/[/issues/2265](https://github.com/apache/dubbo-go/issues/2265))]([#2265](https://github.com/apache/dubbo-go/issues/2265)), [[[[#2326](https://github.com/apache/dubbo-go/issues/2326)](https://github.com/[/issues/2326](https://github.com/apache/dubbo-go/issues/2326))](https://github.com/[/issues/2326](https://github.com/apache/dubbo-go/issues/2326))]([#2326](https://github.com/apache/dubbo-go/issues/2326)) | | |\r\n| Summarized todos for [[[[#2441](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/[/issues/2441](https://github.com/apache/dubbo-go/issues/2441))](https://github.com/[/issues/2441](https://github.com/apache/dubbo-go/issues/2441))]([#2441](https://github.com/apache/dubbo-go/issues/2441)) | P1 | [[[[#2442](https://github.com/apache/dubbo-go/issues/2442)](https://github.com/[/issues/2442](https://github.com/apache/dubbo-go/issues/2442))](https://github.com/[/issues/2442](https://github.com/apache/dubbo-go/issues/2442))]([#2442](https://github.com/apache/dubbo-go/issues/2442)) | | |\r\n| Dubbo3 api design | P1 | [[[[#2441](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/[/issues/2441](https://github.com/apache/dubbo-go/issues/2441))](https://github.com/[/issues/2441](https://github.com/apache/dubbo-go/issues/2441))]([#2441](https://github.com/apache/dubbo-go/issues/2441)) | | |\r\n| dubb-go and dubbo-java compatiable | P1 | [[[[#2578](https://github.com/apache/dubbo-go/issues/2578)](https://github.com/[/issues/2578](https://github.com/apache/dubbo-go/issues/2578))](https://github.com/[/issues/2578](https://github.com/apache/dubbo-go/issues/2578))]([#2578](https://github.com/apache/dubbo-go/issues/2578)) | | |\r\n| 2024.04.26 weekly | P1 | [[[[#2667](https://github.com/apache/dubbo-go/issues/2667)](https://github.com/[/issues/2667](https://github.com/apache/dubbo-go/issues/2667))](https://github.com/[/issues/2667](https://github.com/apache/dubbo-go/issues/2667))]([#2667](https://github.com/apache/dubbo-go/issues/2667)) | | |\r\n| 2022 年制定的一些长期规划 | P0 | [[[[#2136](https://github.com/apache/dubbo-go/issues/2136)](https://github.com/[/issues/2136](https://github.com/apache/dubbo-go/issues/2136))](https://github.com/[/issues/2136](https://github.com/apache/dubbo-go/issues/2136))]([#2136](https://github.com/apache/dubbo-go/issues/2136)) | Alex | |\r\n| healthcheck的设计和未来版本的讨论 | P1 | [[[[#2490](https://github.com/apache/dubbo-go/issues/2490)](https://github.com/[/issues/2490](https://github.com/apache/dubbo-go/issues/2490))](https://github.com/[/issues/2490](https://github.com/apache/dubbo-go/issues/2490))]([#2490](https://github.com/apache/dubbo-go/issues/2490)) | FinalT | |\r\n| Sample and test-case tasks | P1 | [[[[#2608](https://github.com/apache/dubbo-go/issues/2608)](https://github.com/[/issues/2608](https://github.com/apache/dubbo-go/issues/2608))](https://github.com/[/issues/2608](https://github.com/apache/dubbo-go/issues/2608))]([#2608](https://github.com/apache/dubbo-go/issues/2608)) | | |\r\n| Some feature plan and thoughts | P1 | [[[[#2610](https://github.com/apache/dubbo-go/issues/2610)](https://github.com/[/issues/2610](https://github.com/apache/dubbo-go/issues/2610))](https://github.com/[/issues/2610](https://github.com/apache/dubbo-go/issues/2610))]([#2610](https://github.com/apache/dubbo-go/issues/2610)) | | |\r\n| 包依赖关系 | P2 | https://github.com/apache/dubbo-go/issues/2377,https://github.com/apache/dubbo-go/issues/2343,嘉嘉: issue:[[[[[#2741](https://github.com/apache/dubbo-go/issues/2741)](https://github.com/apache/dubbo-go/discussions/%5B#2741%5D(https://github.com/[/issues/2741](https://github.com/apache/dubbo-go/issues/2741)))](https://github.com/apache/dubbo-go/discussions/%5B[#2741](https://github.com/apache/dubbo-go/issues/2741)%5D(https://github.com/[/issues/2741](https://github.com/apache/dubbo-go/issues/2741)))](https://github.com/apache/dubbo-go/discussions/%5B[[#2741](https://github.com/apache/dubbo-go/issues/2741)](https://github.com/[/issues/2741](https://github.com/apache/dubbo-go/issues/2741))%5D(https://github.com/[/issues/2741](https://github.com/apache/dubbo-go/issues/2741)))]([#2741](https://github.com/apache/dubbo-go/issues/2741)) | | |",
"url": "https://github.com/apache/dubbo-go/discussions/2883",
"createdAt": "2025-05-18T13:09:28Z",
"updatedAt": "2026-02-13T02:14:13Z",
"closed": true,
"closedAt": "2026-02-13T02:14:13Z",
"isAnswered": null,
"author": {
"login": "marsevilspirit"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 2905,
"title": "2025-5-30 weekly",
"body": "| Item | Link |\r\n| --------------- | ------------------------------------------------------------ |\r\n| gost | https://github.com/dubbogo/gost |\r\n| hessian2 | https://github.com/apache/dubbo-go-hessian2 |\r\n| pixiu | https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions |\r\n| pixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples |\r\n| dubbogo samples | https://github.com/apache/dubbo-go-samples/issues |\r\n| ospp 2025 | [#2801](https://github.com/apache/dubbo-go/issues/2801) |\r\n\r\n## 2025 规划\r\n\r\n1.triple稳定性,解决之前被识别到的issue。\r\n2.内存泄漏问题的定位与解决,需要找一些用户看有没有遇到对应的问题,帮助定位。\r\n3.error分类,consumer调用provider过程中可能会出现多种异常,网络异常、序列化异常、server侧、业务异常、http错误码的映射,参考grpc、connect-rpc的error分类。\r\n4.服务发现,了解应用发现、接口发现,确保服务发现机制正常运行,提升稳定性。\r\n5.xDS,proxyless,参考java侧的文档、成果。\r\n6.AI agent以及gateway探索。\r\n7.提供配置文件手册,丰富文档。\r\n\r\n## Ecosystem\r\n\r\n| Item | Link |\r\n| --------------- | ------------------------------------------------------------ |\r\n| pixiu | [dubbo-go-pixiu/dubbo-go-pixiu.github.io#24](https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions/24) |\r\n| pixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples |\r\n| dubbogo samples | https://github.com/apache/dubbo-go-samples/issues |\r\n\r\n## RPC Communication\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------- | ---------------- | ------------------------------------------------------------ |\r\n| client can't get attachments which is set from server | P1 | [#2641](https://github.com/apache/dubbo-go/issues/2641) | 嘉嘉、凤瑞 | 进一步完善 |\r\n| common.URL,、内存、goroutine 泄漏 | P0 | issue 2683, 2678 | 吴歆帆、罗颖韬 | doc:https://github.com/apache/dubbo-go/discussions/2750,https://github.com/apache/dubbo-go/discussions/2764 跟 歆帆沟通后,推进相关工作。 参考dubbo-go-samples的URL dubbo-go-pixiu-samples |\r\n| 应用级服务发现在分组订阅、泛化下测试 | P1 | [#2077](https://github.com/apache/dubbo-go/issues/2077) | 嘉嘉 | |\r\n| feat: Introducing informer mechanism into the k8s registry | P0 | [#2065](https://github.com/apache/dubbo-go/issues/2065) | 吴歆帆 | k8s |\r\n| 使用 Nacos 同一命名空间时,如果通过应用级服务发现调用其他服务接口,无法同时做到提供使用接口级服务发现的 service | P1 | [#2044](https://github.com/apache/dubbo-go/issues/2044) | 杨泽睿 | nacos问题 5-18跟进 |\r\n| Expose readiness and liveness apis so the process's status can be detected by the scheduling cluster like K8S. | P1 | [#2039](https://github.com/apache/dubbo-go/issues/2039) | 吴歆帆 | k8s |\r\n| Support offline gracefully without registry notification. | P1 | [#1977](https://github.com/apache/dubbo-go/issues/1977) | 潘炼 | |\r\n| Prompt [i/0 timeout] after calling the service multiple times | P1 | [#1868](https://github.com/apache/dubbo-go/issues/1868) | 玉林 | 正在复现 |\r\n| 希望dubbogo可以处理java端dubbo框架的token验证 | P1 | [#1711](https://github.com/apache/dubbo-go/issues/1711) | xiaoyu | |\r\n| Imp: delete a service provider when using k8s hpa | P1 | [#1141](https://github.com/apache/dubbo-go/issues/1141) | | k8s |\r\n| ut failure of TestUnavailableIfHostInvalid | P1 | [2851](https://github.com/apache/dubbo-go/issues/2851) | 泽亚 | |\r\n| Package dependency optimization | P1 | [#2741](https://github.com/apache/dubbo-go/issues/2741) | 泽亚,嘉嘉,文峰 | 5-18 分配出去了 \r\n| Package dependency optimization | P1 | [#2899](https://github.com/apache/dubbo-go/issues/2899) | 吴孝宇 | |\r\n| Delete protocol/dubbo3 and protocol/grpc | P1 | [#2894](https://github.com/apache/dubbo-go/issues/2894) | sirui | |\r\n| 使用dubbo-go作为客户端,为什么在连接到zk后,需要等待20s后才能监听到zknode | P1 | [#2876](https://github.com/apache/dubbo-go/issues/2876) | 凤瑞 | |\r\n| backupCodec makes it meaningless to set serialization protocols on the server side | P1 | [#2875](https://github.com/apache/dubbo-go/issues/2875) | 清玉 | |\r\n\r\n## Codec Protocol\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---------------------------------------- | -------- | ------------------------------------------------------------ | ------ | ----------- |\r\n| Rest protocol | P1 | [[[[#2513](https://github.com/apache/dubbo-go/issues/2513)](https://github.com/[/issues/2513](https://github.com/apache/dubbo-go/issues/2513))](https://github.com/[/issues/2513](https://github.com/apache/dubbo-go/issues/2513))]([#2513](https://github.com/apache/dubbo-go/issues/2513)) | | |\r\n| the default maxMsgLength for getty param | P1 | [[[[#2619](https://github.com/apache/dubbo-go/issues/2619)](https://github.com/[/issues/2619](https://github.com/apache/dubbo-go/issues/2619))](https://github.com/[/issues/2619](https://github.com/apache/dubbo-go/issues/2619))]([#2619](https://github.com/apache/dubbo-go/issues/2619)) | 吴歆帆 | |\r\n\r\n### Protocol(triple)\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------- | -------- | ------------------------------------------------------- | -------- | -------------------------------------------------- |\r\n| Multi Protocols doesn't work on Nacos | P1 | [#2581](https://github.com/apache/dubbo-go/issues/2581) | wuxiaoyu | [pr](https://github.com/apache/dubbo-go/pull/2882) |\r\n\r\n## obersavability\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---------------------------------------------- | -------- | ------------------------------------------------------------ | ------ | -------------------------------------------------- |\r\n| dubbo-go 3.2 grafana 大盘 | P1 | [[[[#2520](https://github.com/apache/dubbo-go/issues/2520)](https://github.com/[/issues/2520](https://github.com/apache/dubbo-go/issues/2520))](https://github.com/[/issues/2520](https://github.com/apache/dubbo-go/issues/2520))]([#2520](https://github.com/apache/dubbo-go/issues/2520)) | | |\r\n| dubbo v3 版本已经没有这个api设置日志对象的支持 | P1 | [[[[#2526](https://github.com/apache/dubbo-go/issues/2526)](https://github.com/[/issues/2526](https://github.com/apache/dubbo-go/issues/2526))](https://github.com/[/issues/2526](https://github.com/apache/dubbo-go/issues/2526))]([#2526](https://github.com/apache/dubbo-go/issues/2526)) | TOM | [pr](https://github.com/apache/dubbo-go/pull/2838) |\r\n| Triple OpenTelemetry support | P1 | [[[[#2554](https://github.com/apache/dubbo-go/issues/2554)](https://github.com/[/issues/2554](https://github.com/apache/dubbo-go/issues/2554))](https://github.com/[/issues/2554](https://github.com/apache/dubbo-go/issues/2554))]([#2554](https://github.com/apache/dubbo-go/issues/2554)) | 方泽亚 | |\r\n| log重复初始化 | P0 | [#2148](https://github.com/apache/dubbo-go/issues/2148) | Tom | |\r\n\r\n# tools\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| -------------------------------- | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| Dubbogo-cli 工具的文档和代码迁移 | P1 | [#1799](https://github.com/apache/dubbo-go/issues/1799) | | |\r\n\r\n# doc\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------- | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| If we need a code style? | P2 | [1755 ](https://github.com/apache/dubbo-go/issues/1755) | | |\r\n| dubbo-go文档 | P2 | [2137](https://github.com/apache/dubbo-go/issues/2137) | | |\r\n| Dubbo Go 文档结构优化设想 | P2 | [2153](https://github.com/apache/dubbo-go/issues/2153) | | |\r\n\r\n## long-term work\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------------ | ------ | ----------- |\r\n| 易用性改进 | P1 | [[[[#2265](https://github.com/apache/dubbo-go/issues/2265)](https://github.com/[/issues/2265](https://github.com/apache/dubbo-go/issues/2265))](https://github.com/[/issues/2265](https://github.com/apache/dubbo-go/issues/2265))]([#2265](https://github.com/apache/dubbo-go/issues/2265)), [[[[#2326](https://github.com/apache/dubbo-go/issues/2326)](https://github.com/[/issues/2326](https://github.com/apache/dubbo-go/issues/2326))](https://github.com/[/issues/2326](https://github.com/apache/dubbo-go/issues/2326))]([#2326](https://github.com/apache/dubbo-go/issues/2326)) | | |\r\n| Summarized todos for [[[[#2441](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/[/issues/2441](https://github.com/apache/dubbo-go/issues/2441))](https://github.com/[/issues/2441](https://github.com/apache/dubbo-go/issues/2441))]([#2441](https://github.com/apache/dubbo-go/issues/2441)) | P1 | [[[[#2442](https://github.com/apache/dubbo-go/issues/2442)](https://github.com/[/issues/2442](https://github.com/apache/dubbo-go/issues/2442))](https://github.com/[/issues/2442](https://github.com/apache/dubbo-go/issues/2442))]([#2442](https://github.com/apache/dubbo-go/issues/2442)) | | |\r\n| Dubbo3 api design | P1 | [[[[#2441](https://github.com/apache/dubbo-go/issues/2441)](https://github.com/[/issues/2441](https://github.com/apache/dubbo-go/issues/2441))](https://github.com/[/issues/2441](https://github.com/apache/dubbo-go/issues/2441))]([#2441](https://github.com/apache/dubbo-go/issues/2441)) | | |\r\n| dubb-go and dubbo-java compatiable | P1 | [[[[#2578](https://github.com/apache/dubbo-go/issues/2578)](https://github.com/[/issues/2578](https://github.com/apache/dubbo-go/issues/2578))](https://github.com/[/issues/2578](https://github.com/apache/dubbo-go/issues/2578))]([#2578](https://github.com/apache/dubbo-go/issues/2578)) | | |\r\n| 2024.04.26 weekly | P1 | [[[[#2667](https://github.com/apache/dubbo-go/issues/2667)](https://github.com/[/issues/2667](https://github.com/apache/dubbo-go/issues/2667))](https://github.com/[/issues/2667](https://github.com/apache/dubbo-go/issues/2667))]([#2667](https://github.com/apache/dubbo-go/issues/2667)) | | |\r\n| 2022 年制定的一些长期规划 | P0 | [[[[#2136](https://github.com/apache/dubbo-go/issues/2136)](https://github.com/[/issues/2136](https://github.com/apache/dubbo-go/issues/2136))](https://github.com/[/issues/2136](https://github.com/apache/dubbo-go/issues/2136))]([#2136](https://github.com/apache/dubbo-go/issues/2136)) | Alex | |\r\n| healthcheck的设计和未来版本的讨论 | P1 | [[[[#2490](https://github.com/apache/dubbo-go/issues/2490)](https://github.com/[/issues/2490](https://github.com/apache/dubbo-go/issues/2490))](https://github.com/[/issues/2490](https://github.com/apache/dubbo-go/issues/2490))]([#2490](https://github.com/apache/dubbo-go/issues/2490)) | FinalT | |\r\n| Sample and test-case tasks | P1 | [[[[#2608](https://github.com/apache/dubbo-go/issues/2608)](https://github.com/[/issues/2608](https://github.com/apache/dubbo-go/issues/2608))](https://github.com/[/issues/2608](https://github.com/apache/dubbo-go/issues/2608))]([#2608](https://github.com/apache/dubbo-go/issues/2608)) | | |\r\n| Some feature plan and thoughts | P1 | [[[[#2610](https://github.com/apache/dubbo-go/issues/2610)](https://github.com/[/issues/2610](https://github.com/apache/dubbo-go/issues/2610))](https://github.com/[/issues/2610](https://github.com/apache/dubbo-go/issues/2610))]([#2610](https://github.com/apache/dubbo-go/issues/2610)) | | |\r\n| 包依赖关系 | P2 | https://github.com/apache/dubbo-go/issues/2377,https://github.com/apache/dubbo-go/issues/2343,嘉嘉: issue:[[[[[#2741](https://github.com/apache/dubbo-go/issues/2741)](https://github.com/apache/dubbo-go/discussions/%5B#2741%5D(https://github.com/[/issues/2741](https://github.com/apache/dubbo-go/issues/2741)))](https://github.com/apache/dubbo-go/discussions/%5B[#2741](https://github.com/apache/dubbo-go/issues/2741)%5D(https://github.com/[/issues/2741](https://github.com/apache/dubbo-go/issues/2741)))](https://github.com/apache/dubbo-go/discussions/%5B[[#2741](https://github.com/apache/dubbo-go/issues/2741)](https://github.com/[/issues/2741](https://github.com/apache/dubbo-go/issues/2741))%5D(https://github.com/[/issues/2741](https://github.com/apache/dubbo-go/issues/2741)))]([#2741](https://github.com/apache/dubbo-go/issues/2741)) | | |\r\n",
"url": "https://github.com/apache/dubbo-go/discussions/2905",
"createdAt": "2025-05-30T14:41:07Z",
"updatedAt": "2026-02-13T02:14:35Z",
"closed": true,
"closedAt": "2026-02-13T02:14:35Z",
"isAnswered": null,
"author": {
"login": "1kasa"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 2911,
"title": "2025-06-08 weekly",
"body": "| Item | Link|\r\n| - | - |\r\n| gost| https://github.com/dubbogo/gost |\r\n| hessian2 | https://github.com/apache/dubbo-go-hessian2 |\r\n| pixiu | https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions |\r\n| pixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples |\r\n| dubbogo samples | https://github.com/apache/dubbo-go-samples/issues |\r\n| ospp 2025 | [#2801](https://github.com/apache/dubbo-go/issues/2801) |\r\n\r\n## 2025 规划\r\n\r\n1.triple稳定性。\r\n2.内存泄漏问题的定位与解决,需要找一些用户看有没有遇到对应的问题,帮助定位。\r\n3.error分类,consumer调用provider过程中可能会出现多种异常,网络异常、序列化异常、server侧、业务异常、http错误码的映射,参考grpc、connect-rpc的error分类。\r\n4.服务发现,了解应用发现、接口发现,确保服务发现机制正常运行,提升稳定性。\t\r\n5.xDS,proxyless,参考java侧的文档、成果。\r\n6.AI agent以及gateway探索。\r\n7.提供配置文件手册,丰富文档。\r\n\r\n## RPC Communication\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| - | - | - | - | - |\r\n| 应用级服务发现在分组订阅、泛化下测试 | P1 | [#2077](https://github.com/apache/dubbo-go/issues/2077) | 嘉嘉 | |\r\n| Support offline gracefully without registry notification. | P1 | [#1977](https://github.com/apache/dubbo-go/issues/1977) | 潘炼 | |\r\n| Prompt [i/0 timeout] after calling the service multiple times | P1 | [#1868](https://github.com/apache/dubbo-go/issues/1868) | 玉林 | 正在复现 |\r\n| Package dependency optimization | P1 | [#2741](https://github.com/apache/dubbo-go/issues/2741) | 泽亚,嘉嘉,文峰 | 5-18 分配出去了, 稳步进行中 |\r\n| Some indirect dependency vulnerabilities have been detected | P1 | [#2899](https://github.com/apache/dubbo-go/issues/2899) | 方泽亚 | protobuf, grpc依赖升级 |\r\n| 使用dubbo-go作为客户端,为什么在连接到zk后,需要等待20s后才能监听到zknode | P1 | [#2876](https://github.com/apache/dubbo-go/issues/2876) | 凤瑞 | 进行中 |\r\n| backupCodec makes it meaningless to set serialization protocols on the server side | P1 | [#2875](https://github.com/apache/dubbo-go/issues/2875) | 清玉 | 先不急 |\r\n\r\n\r\n### Protocol\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| - | - | - | - | - |\r\n| Multi Protocols doesn't work on Nacos | P1 | [#2065](https://github.com/apache/dubbo-go/issues/2065) | wuxiaoyu | [pr](https://github.com/apache/dubbo-go/pull/2882) |\r\n| Delete protocol/dubbo3 and protocol/grpc | P1 | [#2894](https://github.com/apache/dubbo-go/issues/2894) | sirui | 先不急 |\r\n| the default maxMsgLength for getty param | P1 | [#2619](https://github.com/issues/2619) | 吴歆帆 | |\r\n| Rest protocol | P1 | [#2513](https://github.com/apache/dubbo-go/issues/2513) | | |\r\n\r\n### triple protocol\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| - | - | - | - | - |\r\n| support triple generic call | P0 | | 方泽亚 | |\r\n| ut failure of TestUnavailableIfHostInvalid | P1 | [2851](https://github.com/apache/dubbo-go/issues/2851) | 泽亚 | |\r\n\r\n### K8s\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| - | - | - | - | - |\r\n| feat: Introducing informer mechanism into the k8s registry | P1 | [#2581](https://github.com/apache/dubbo-go/issues/2581) | 吴歆帆 | |\r\n| Expose readiness and liveness apis so the process's status can be detected by the scheduling cluster like K8S. | P1 | [#2039](https://github.com/apache/dubbo-go/issues/2039) | 吴歆帆 | k8s |\r\n| Imp: delete a service provider when using k8s hpa | P1 | [#1141](https://github.com/apache/dubbo-go/issues/1141) | | k8s |\r\n\r\n\r\n### memory leak\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| - | - | - | - | - |\r\n| common.URL,、内存、goroutine 泄漏 | P0 | issue 2683, 2678 | 吴歆帆、罗颖韬 | doc:https://github.com/apache/dubbo-go/discussions/2750,https://github.com/apache/dubbo-go/discussions/2764 跟 歆帆沟通后,推进相关工作。 参考dubbo-go-samples的URL dubbo-go-pixiu-samples |\r\n\r\n## obersavability\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| - | - | - | - | - |\r\n| dubbo-go 3.2 grafana 大盘 | P1 | [#2520](https://github.com/issues/2520) | | |\r\n| Triple OpenTelemetry support | P1 | [#2554](https://github.com/issues/2554) | 方泽亚 | |\r\n\r\n# tools\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| - | - | - | - | - |\r\n| Dubbogo-cli 工具的文档和代码迁移 | P1 | [#1799](https://github.com/apache/dubbo-go/issues/1799) | | |\r\n\r\n# doc\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| - | - | - | - | - |\r\n| If we need a code style? | P2 | [1755 ](https://github.com/apache/dubbo-go/issues/1755) | | |\r\n| dubbo-go文档 | P2 | [2137](https://github.com/apache/dubbo-go/issues/2137) | | |\r\n| Dubbo Go 文档结构优化设想 | P2 | [2153](https://github.com/apache/dubbo-go/issues/2153) | | |\r\n\r\n## long-term work\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| - | - | - | - | - |\r\n| API易用性改进 | P1 | [#2265](https://github.com/apache/dubbo-go/issues/2265), [#2326](https://github.com/apache/dubbo-go/issues/2326) | 方泽亚 | New API design |\r\n| Summarized todos for [#2441](https://github.com/apache/dubbo-go/issues/2441) | P1 | [#2442](https://github.com/apache/dubbo-go/issues/2442) | 方泽亚 | |\r\n| dubb-go and dubbo-java compatiable | P1 | [#2578](https://github.com/apache/dubbo-go/issues/2578) | | |\r\n| 2024.04.26 weekly | P1 | [#2667](https://github.com/apache/dubbo-go/issues/2667) | | |\r\n| 2022 年制定的一些长期规划 | P0 | [#2136](https://github.com/apache/dubbo-go/issues/2136) | Alex | |\r\n| healthcheck的设计和未来版本的讨论 | P1 | [#2490](https://github.com/apache/dubbo-go/issues/2490) | FinalT | |\r\n| Sample and test-case tasks | P1 | [#2608](https://github.com/apache/dubbo-go/issues/2608) | | |\r\n| Some feature plan and thoughts | P1 | [#2610](https://github.com/apache/dubbo-go/issues/2610) | | |\r\n| 包依赖关系 | P2 | [#2377](https://github.com/apache/dubbo-go/issues/2377),[#2343](https://github.com/apache/dubbo-go/issues/2343),[#2741](https://github.com/apache/dubbo-go/issues/2741) | | |",
"url": "https://github.com/apache/dubbo-go/discussions/2911",
"createdAt": "2025-06-08T12:40:19Z",
"updatedAt": "2026-02-13T02:15:19Z",
"closed": true,
"closedAt": "2026-02-13T02:15:19Z",
"isAnswered": null,
"author": {
"login": "marsevilspirit"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 2931,
"title": "2025-06-29 weekly",
"body": "| Item | Link |\r\n| --------------- | ------------------------------------------------------------ |\r\n| gost | https://github.com/dubbogo/gost |\r\n| hessian2 | https://github.com/apache/dubbo-go-hessian2 |\r\n| pixiu | https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions |\r\n| pixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples |\r\n| dubbogo samples | https://github.com/apache/dubbo-go-samples/issues |\r\n| ospp 2025 | [#2801](https://github.com/apache/dubbo-go/issues/2801) |\r\n\r\n## 2025 规划\r\n\r\n1.triple稳定性。\r\n2.内存泄漏问题的定位与解决,需要找一些用户看有没有遇到对应的问题,帮助定位。\r\n3.error分类,consumer调用provider过程中可能会出现多种异常,网络异常、序列化异常、server侧、业务异常、http错误码的映射,参考grpc、connect-rpc的error分类。\r\n4.服务发现,了解应用发现、接口发现,确保服务发现机制正常运行,提升稳定性。\r\n5.xDS,proxyless,参考java侧的文档、成果。\r\n6.AI agent以及gateway探索。\r\n7.提供配置文件手册,丰富文档。\r\n\r\n## RPC Communication\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------- | ---------------- | ---------------------------- |\r\n| 应用级服务发现在分组订阅、泛化下测试 | P1 | [#2077](https://github.com/apache/dubbo-go/issues/2077) | 嘉嘉 | 06-29未到会 |\r\n| Support offline gracefully without registry notification. | P1 | [#1977](https://github.com/apache/dubbo-go/issues/1977) | 潘炼 | 06-29未到会 |\r\n| Prompt [i/0 timeout] after calling the service multiple times | P1 | [#1868](https://github.com/apache/dubbo-go/issues/1868) | 玉林 | 正在复现,06-29未到会 |\r\n| Package dependency optimization | P1 | [#2741](https://github.com/apache/dubbo-go/issues/2741) | 泽亚,嘉嘉,文峰 | 5-18 分配出去了, 稳步进行中 | |\r\n| 使用dubbo-go作为客户端,为什么在连接到zk后,需要等待20s后才能监听到zknode | P1 | [#2876](https://github.com/apache/dubbo-go/issues/2876) | 凤瑞 | pr已提交 https://github.com/apache/dubbo-go/pull/2930 |\r\n| backupCodec makes it meaningless to set serialization protocols on the server side | P1 | [#2875](https://github.com/apache/dubbo-go/issues/2875) | 清玉 | 先不急 |\r\n| Update the template of tools/dubbogo-cli and check the compatibility of tools/dubbogo-cli | P1 | [#2921](https://github.com/apache/dubbo-go/issues/2921) | 雪涛 | 跟进 |\r\n| dubbo-go loadbalance don't work | P1 | [#2864](https://github.com/apache/dubbo-go/issues/2864) | 清玉 | 正在测试 |\r\n| 项目配置文件,动态修改增强 | P1 | [#2925](https://github.com/apache/dubbo-go/issues/2925) | 清玉 | \r\n|[Enhancement] Upgrade dubbogo online demo | P1 | [#2914](https://github.com/apache/dubbo-go/issues/2914) | 洪锦涛| pr已提交[#858](https://github.com/apache/dubbo-go-samples/pull/858) |\r\n\r\n### Protocol\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---------------------------------------- | -------- | ------------------------------------------------------- | -------- | -------------------------------------------------- |\r\n| Delete protocol/dubbo3 and protocol/grpc | P1 | [#2894](https://github.com/apache/dubbo-go/issues/2894) | sirui | 先不急 |\r\n| the default maxMsgLength for getty param | P1 | [#2619](https://github.com/apache/dubbo-go/issues/2619) | 吴歆帆 | |\r\n| Rest protocol | P1 | [#2513](https://github.com/apache/dubbo-go/issues/2513) | | |\r\n\r\n### triple protocol\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------ | -------- | ------------------------------------------------------ | ------ | ----------- |\r\n| support triple generic call | P0 | | 方泽亚 | 跟进中 |\r\n| ut failure of TestUnavailableIfHostInvalid | P1 | [2851](https://github.com/apache/dubbo-go/issues/2851) | 泽亚 | 跟进中 |\r\n\r\n### K8s\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------- | ------ | ----------- |\r\n| feat: Introducing informer mechanism into the k8s registry | P1 | [#2581](https://github.com/apache/dubbo-go/issues/2581) | 吴歆帆 | |\r\n| Expose readiness and liveness apis so the process's status can be detected by the scheduling cluster like K8S. | P1 | [#2039](https://github.com/apache/dubbo-go/issues/2039) | 吴歆帆 | k8s |\r\n\r\n### memory leak\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| --------------------------------- | -------- | ---------------- | -------------- | ------------------------------------------------------------ |\r\n| common.URL,、内存、goroutine 泄漏 | P0 | issue 2683, 2678 | 吴歆帆、罗颖韬 | doc:https://github.com/apache/dubbo-go/discussions/2750,https://github.com/apache/dubbo-go/discussions/2764 跟 歆帆沟通后,推进相关工作。 参考dubbo-go-samples的URL dubbo-go-pixiu-samples |\r\n\r\n### Dubbo kubernetes\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---------------------------------------- | -------- | ------------------------------------------------------- | -------- | -------------------------------------------------- |\r\n|1.dubbo-kubernetes项目改名 2.项目中的half等模式改名,未来版本去掉模式概念 3.讨论周会时间变更到与dubbogo时间一致4.存储使用数据库(内存不考虑)5.proxy mesh不是主要功能(不急),先完善dubbo admin本来的功能(制定roadmap)6.架构重构 | | | 陈才| dubbo-kubernetes讨论结果 |\r\n## obersavability\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---------------------------- | -------- | --------------------------------------- | ------ | ----------- |\r\n| dubbo-go 3.2 grafana 大盘 | P1 | [#2520](https://github.com/issues/2520) | | |\r\n| Triple OpenTelemetry support | P1 | [#2554](https://github.com/issues/2554) | 方泽亚 | |\r\n\r\n# tools\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| -------------------------------- | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| Dubbogo-cli 工具的文档和代码迁移 | P1 | [#1799](https://github.com/apache/dubbo-go/issues/1799) | | |\r\n\r\n# doc\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------- | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| If we need a code style? | P2 | [1755 ](https://github.com/apache/dubbo-go/issues/1755) | | |\r\n| dubbo-go文档 | P2 | [2137](https://github.com/apache/dubbo-go/issues/2137) | | |\r\n| Dubbo Go 文档结构优化设想 | P2 | [2153](https://github.com/apache/dubbo-go/issues/2153) | | |\r\n\r\n## long-term work\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------------ | ------ | -------------- |\r\n| API易用性改进 | P1 | [#2265](https://github.com/apache/dubbo-go/issues/2265), [#2326](https://github.com/apache/dubbo-go/issues/2326) | 方泽亚 | New API design |\r\n| Summarized todos for [#2441](https://github.com/apache/dubbo-go/issues/2441) | P1 | [#2442](https://github.com/apache/dubbo-go/issues/2442) | 方泽亚 | |\r\n| dubb-go and dubbo-java compatiable | P1 | [#2578](https://github.com/apache/dubbo-go/issues/2578) | | |\r\n| 2024.04.26 weekly | P1 | [#2667](https://github.com/apache/dubbo-go/issues/2667) | | |\r\n| 2022 年制定的一些长期规划 | P0 | [#2136](https://github.com/apache/dubbo-go/issues/2136) | Alex | |\r\n| healthcheck的设计和未来版本的讨论 | P1 | [#2490](https://github.com/apache/dubbo-go/issues/2490) | FinalT | |\r\n| Sample and test-case tasks | P1 | [#2608](https://github.com/apache/dubbo-go/issues/2608) | | |\r\n| Some feature plan and thoughts | P1 | [#2610](https://github.com/apache/dubbo-go/issues/2610) | | |\r\n| 包依赖关系 | P2 | [#2377](https://github.com/apache/dubbo-go/issues/2377),[#2343](https://github.com/apache/dubbo-go/issues/2343),[#2741](https://github.com/apache/dubbo-go/issues/2741) | | |",
"url": "https://github.com/apache/dubbo-go/discussions/2931",
"createdAt": "2025-06-29T13:45:06Z",
"updatedAt": "2026-02-13T02:14:43Z",
"closed": true,
"closedAt": "2026-02-13T02:14:43Z",
"isAnswered": null,
"author": {
"login": "1kasa"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 2949,
"title": "2025-07-13 weekly",
"body": "| Item | Link |\r\n| --------------- | ------------------------------------------------------------ |\r\n| gost | https://github.com/dubbogo/gost |\r\n| hessian2 | https://github.com/apache/dubbo-go-hessian2 |\r\n| pixiu | https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions |\r\n| pixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples |\r\n| dubbogo samples | https://github.com/apache/dubbo-go-samples/issues |\r\n| ospp 2025 | [#2801](https://github.com/apache/dubbo-go/issues/2801) |\r\n\r\n## RPC Communication\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------- | ---------- | ------------------------------------------------------------ |\r\n| 应用级服务发现在分组订阅、泛化下测试 | P1 | [#2077](https://github.com/apache/dubbo-go/issues/2077) | | |\r\n| Support offline gracefully without registry notification. | P1 | [#1977](https://github.com/apache/dubbo-go/issues/1977) | 潘炼 | 06-29未到会 |\r\n| Prompt [i/0 timeout] after calling the service multiple times | P1 | [#1868](https://github.com/apache/dubbo-go/issues/1868) | 玉林 | 正在复现,06-29未到会 |\r\n| Package dependency optimization | P1 | [#2741](https://github.com/apache/dubbo-go/issues/2741) | 泽亚,文峰 | 5-18 分配出去了, 稳步进行中 |\r\n| 使用dubbo-go作为客户端,为什么在连接到zk后,需要等待20s后才能监听到zknode | P1 | [#2876](https://github.com/apache/dubbo-go/issues/2876) | 凤瑞 | pr已提交 https://github.com/apache/dubbo-go/pull/2930 待review |\r\n| backupCodec makes it meaningless to set serialization protocols on the server side | P1 | [#2875](https://github.com/apache/dubbo-go/issues/2875) | 清玉 | 先不急 |\r\n| Update the template of tools/dubbogo-cli and check the compatibility of tools/dubbogo-cli | P1 | [#2921](https://github.com/apache/dubbo-go/issues/2921) | 雪涛 | ci没过 |\r\n| 项目配置文件,动态修改增强 | P1 | [#2925](https://github.com/apache/dubbo-go/issues/2925) | 清玉 | |\r\n\r\n### Registry\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---------------------------------------- | -------- | ------------------------------------------------------- | ------ | ----------- |\r\n| Update the dependency of go-zookeeper in dubbogo | P0 | [#2948](https://github.com/apache/dubbo-go/issues/2948) | 锦涛 | |\r\n\r\n### Protocol\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---------------------------------------- | -------- | ------------------------------------------------------- | ------ | ----------- |\r\n| Delete protocol/dubbo3 and protocol/grpc | P1 | [#2894](https://github.com/apache/dubbo-go/issues/2894) | sirui | 先不急 |\r\n| the default maxMsgLength for getty param | P1 | [#2619](https://github.com/apache/dubbo-go/issues/2619) | 吴歆帆 | |\r\n| Rest protocol | P1 | [#2513](https://github.com/apache/dubbo-go/issues/2513) | 陆离 | |\r\n\r\n### triple protocol\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------ | -------- | ------------------------------------------------------ | ------ | ----------- |\r\n| support triple generic call | P0 | | 方泽亚 | 跟进中 |\r\n| ut failure of TestUnavailableIfHostInvalid | P1 | [2851](https://github.com/apache/dubbo-go/issues/2851) | 泽亚 | 跟进中 |\r\n\r\n### K8s\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------- | ------ | ----------- |\r\n| feat: Introducing informer mechanism into the k8s registry | P1 | [#2581](https://github.com/apache/dubbo-go/issues/2581) | 吴歆帆 | |\r\n| Expose readiness and liveness apis so the process's status can be detected by the scheduling cluster like K8S. | P1 | [#2039](https://github.com/apache/dubbo-go/issues/2039) | 吴歆帆 | k8s |\r\n\r\n### memory leak\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| --------------------------------- | -------- | ---------------- | -------------- | ------------------------------------------------------------ |\r\n| common.URL,、内存、goroutine 泄漏 | P0 | issue 2683, 2678 | 吴歆帆、罗颖韬 | doc:https://github.com/apache/dubbo-go/discussions/2750,https://github.com/apache/dubbo-go/discussions/2764 跟 歆帆沟通后,推进相关工作。 参考dubbo-go-samples的URL dubbo-go-pixiu-samples |\r\n\r\n### Dubbo kubernetes\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | -------- | ----- | ------------------------ |\r\n| 1.dubbo-kubernetes项目改名 2.项目中的half等模式改名,未来版本去掉模式概念 3.讨论周会时间变更到与dubbogo时间一致4.存储使用数据库(内存不考虑)5.proxy mesh不是主要功能(不急),先完善dubbo admin本来的功能(制定roadmap)6.架构重构 | | | 陈才 | dubbo-kubernetes讨论结果 |\r\n## obersavability\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---------------------------- | -------- | --------------------------------------- | ------ | ----------- |\r\n| dubbo-go 3.2 grafana 大盘 | P1 | [#2520](https://github.com/issues/2520) | | |\r\n| Triple OpenTelemetry support | P1 | [#2554](https://github.com/issues/2554) | 方泽亚 | |\r\n\r\n# tools\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| -------------------------------- | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| Dubbogo-cli 工具的文档和代码迁移 | P1 | [#1799](https://github.com/apache/dubbo-go/issues/1799) | 雪涛 | |\r\n\r\n# doc\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------- | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| If we need a code style? | P2 | [1755 ](https://github.com/apache/dubbo-go/issues/1755) | | |\r\n| dubbo-go文档 | P2 | [2137](https://github.com/apache/dubbo-go/issues/2137) | | |\r\n| Dubbo Go 文档结构优化设想 | P2 | [2153](https://github.com/apache/dubbo-go/issues/2153) | | |\r\n\r\n## long-term work\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------------ | ------ | -------------- |\r\n| API易用性改进 | P1 | [#2265](https://github.com/apache/dubbo-go/issues/2265), [#2326](https://github.com/apache/dubbo-go/issues/2326) | 方泽亚 | New API design |\r\n| Summarized todos for [#2441](https://github.com/apache/dubbo-go/issues/2441) | P1 | [#2442](https://github.com/apache/dubbo-go/issues/2442) | 方泽亚 | |\r\n| dubb-go and dubbo-java compatiable | P1 | [#2578](https://github.com/apache/dubbo-go/issues/2578) | | |\r\n| 2024.04.26 weekly | P1 | [#2667](https://github.com/apache/dubbo-go/issues/2667) | | |\r\n| 2022 年制定的一些长期规划 | P0 | [#2136](https://github.com/apache/dubbo-go/issues/2136) | Alex | |\r\n| healthcheck的设计和未来版本的讨论 | P1 | [#2490](https://github.com/apache/dubbo-go/issues/2490) | FinalT | |\r\n| Sample and test-case tasks | P1 | [#2608](https://github.com/apache/dubbo-go/issues/2608) | | |\r\n| Some feature plan and thoughts | P1 | [#2610](https://github.com/apache/dubbo-go/issues/2610) | | |\r\n| 包依赖关系 | P2 | [#2377](https://github.com/apache/dubbo-go/issues/2377),[#2343](https://github.com/apache/dubbo-go/issues/2343),[#2741](https://github.com/apache/dubbo-go/issues/2741) | | |",
"url": "https://github.com/apache/dubbo-go/discussions/2949",
"createdAt": "2025-07-13T12:43:58Z",
"updatedAt": "2026-02-13T02:14:48Z",
"closed": true,
"closedAt": "2026-02-13T02:14:48Z",
"isAnswered": null,
"author": {
"login": "marsevilspirit"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 2965,
"title": "2025-08-03 weeklly",
"body": "| Item | Link |\r\n| --------------- | ------------------------------------------------------------ |\r\n| gost | https://github.com/dubbogo/gost |\r\n| hessian2 | https://github.com/apache/dubbo-go-hessian2 |\r\n| pixiu | https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions |\r\n| pixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples |\r\n| dubbogo samples | https://github.com/apache/dubbo-go-samples/issues |\r\n| ospp 2025 | [#2801](https://github.com/apache/dubbo-go/issues/2801) |\r\n\r\n## RPC Communication\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------- | ---------- | ------------------------------------------------------------ |\r\n| 应用级服务发现在分组订阅、泛化下测试 | P1 | [#2077](https://github.com/apache/dubbo-go/issues/2077) | | |\r\n| Support offline gracefully without registry notification. | P1 | [#1977](https://github.com/apache/dubbo-go/issues/1977) | | |\r\n| Prompt [i/0 timeout] after calling the service multiple times | P1 | [#1868](https://github.com/apache/dubbo-go/issues/1868) | 玉林 | 正在复现,08-03未到会 |\r\n| Package dependency optimization | P1 | [#2741](https://github.com/apache/dubbo-go/issues/2741) | 泽亚,文峰 | 5-18 分配出去了, 稳步进行中 |\r\n| backupCodec makes it meaningless to set serialization protocols on the server side | P1 | [#2875](https://github.com/apache/dubbo-go/issues/2875) | 清玉 | 先不急 |\r\n| Update the template of tools/dubbogo-cli and check the compatibility of tools/dubbogo-cli | P1 | [#2921](https://github.com/apache/dubbo-go/issues/2921) | 雪涛 | Ci没过,重命名tools|\r\n| 项目配置文件,动态修改增强 | P1 | [#2925](https://github.com/apache/dubbo-go/issues/2925) | 清玉 | |\r\n### Registry\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------ | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| Update the dependency of go-zookeeper in dubbogo | P0 | [#2948](https://github.com/apache/dubbo-go/issues/2948) | 锦涛 | 跟进中 |\r\n\r\n### Protocol\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---------------------------------------- | -------- | ------------------------------------------------------- | ------ | ----------- |\r\n| Delete protocol/dubbo3 and protocol/grpc | P1 | [#2894](https://github.com/apache/dubbo-go/issues/2894) | sirui | 先不急 |\r\n| the default maxMsgLength for getty param | P1 | [#2619](https://github.com/apache/dubbo-go/issues/2619) | 吴歆帆 | |\r\n| Rest protocol | P1 | [#2513](https://github.com/apache/dubbo-go/issues/2513) | 孝宇 | |\r\n\r\n### triple protocol\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------ | -------- | ------------------------------------------------------ | ------ | ----------- |\r\n| support triple generic call | P0 | | 方泽亚,清玉 | 跟进中 |\r\n| ut failure of TestUnavailableIfHostInvalid | P1 | [2851](https://github.com/apache/dubbo-go/issues/2851) | 泽亚 | 跟进中 |\r\n\r\n### K8s\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------- | ------ | ----------- |\r\n| feat: Introducing informer mechanism into the k8s registry | P1 | [#2065](https://github.com/apache/dubbo-go/issues/2065) | | |\r\n| Expose readiness and liveness apis so the process's status can be detected by the scheduling cluster like K8S. | P1 | [#2039](https://github.com/apache/dubbo-go/issues/2039) | | k8s |\r\n\r\n### memory leak\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| --------------------------------- | -------- | ---------------- | -------------- | ------------------------------------------------------------ |\r\n| common.URL,、内存、goroutine 泄漏 | P0 | issue 2683, 2678 | 吴歆帆、罗颖韬 | doc:https://github.com/apache/dubbo-go/discussions/2750,https://github.com/apache/dubbo-go/discussions/2764 跟 歆帆沟通后,推进相关工作。 参考dubbo-go-samples的URL dubbo-go-pixiu-samples |\r\n\r\n### Dubbo kubernetes\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | -------- | ----- | ------------------------ |\r\n| 1.dubbo-kubernetes项目改名 2.项目中的half等模式改名,未来版本去掉模式概念 3.讨论周会时间变更到与dubbogo时间一致4.存储使用数据库(内存不考虑)5.proxy mesh不是主要功能(不急),先完善dubbo admin本来的功能(制定roadmap)6.架构重构 | | | 陈才 | dubbo-kubernetes讨论结果 |\r\n\r\n## obersavability\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---------------------------- | -------- | --------------------------------------- | ------ | ----------- |\r\n| dubbo-go 3.2 grafana 大盘 | P1 | [#2520](https://github.com/apache/dubbo-go/issues/2520) | 雪涛 | |\r\n| Triple OpenTelemetry support | P1 | [#2554](https://github.com/apache/dubbo-go/issues/2554) | 方泽亚 | |\r\n\r\n# tools\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| -------------------------------- | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n# samples\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| -------------------------------- | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| Failed to get app metadata | P1 | [#869](https://github.com/apache/dubbo-go-samples/issues/869) | 清玉 | |\r\n| compatibility工作 | P1 | [#compatibility](https://github.com/apache/dubbo-go-samples/tree/main/compatibility) | 锦涛| \r\n# doc\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------- | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| If we need a code style? | P2 | [1755 ](https://github.com/apache/dubbo-go/issues/1755) | | |\r\n| dubbo-go文档 | P2 | [2137](https://github.com/apache/dubbo-go/issues/2137) | | |\r\n| Dubbo Go 文档结构优化设想 | P2 | [2153](https://github.com/apache/dubbo-go/issues/2153) | | |\r\n\r\n\r\n## long-term work\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------------ | ------ | -------------- |\r\n| API易用性改进 | P1 | [#2265](https://github.com/apache/dubbo-go/issues/2265), [#2326](https://github.com/apache/dubbo-go/issues/2326) | 方泽亚 | New API design |\r\n| Summarized todos for [#2441](https://github.com/apache/dubbo-go/issues/2441) | P1 | [#2442](https://github.com/apache/dubbo-go/issues/2442) | 方泽亚 | |\r\n| dubb-go and dubbo-java compatiable | P1 | [#2578](https://github.com/apache/dubbo-go/issues/2578) | | |\r\n| 2024.04.26 weekly | P1 | [#2667](https://github.com/apache/dubbo-go/issues/2667) | | |\r\n| 2022 年制定的一些长期规划 | P0 | [#2136](https://github.com/apache/dubbo-go/issues/2136) | Alex | |\r\n| healthcheck的设计和未来版本的讨论 | P1 | [#2490](https://github.com/apache/dubbo-go/issues/2490) | FinalT | |\r\n| Sample and test-case tasks | P1 | [#2608](https://github.com/apache/dubbo-go/issues/2608) | | |\r\n| Some feature plan and thoughts | P1 | [#2610](https://github.com/apache/dubbo-go/issues/2610) | | |\r\n| 包依赖关系 | P2 | [#2377](https://github.com/apache/dubbo-go/issues/2377),[#2343](https://github.com/apache/dubbo-go/issues/2343),[#2741](https://github.com/apache/dubbo-go/issues/2741) | | |\r\n\r\n",
"url": "https://github.com/apache/dubbo-go/discussions/2965",
"createdAt": "2025-08-03T13:36:26Z",
"updatedAt": "2026-02-13T02:14:54Z",
"closed": true,
"closedAt": "2026-02-13T02:14:54Z",
"isAnswered": null,
"author": {
"login": "1kasa"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 2974,
"title": "2025-08-17 weeklly",
"body": "| Item | Link |\r\n| --------------- | ------------------------------------------------------------ |\r\n| gost | https://github.com/dubbogo/gost |\r\n| hessian2 | https://github.com/apache/dubbo-go-hessian2 |\r\n| pixiu | https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions |\r\n| pixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples |\r\n| dubbogo samples | https://github.com/apache/dubbo-go-samples/issues |\r\n| ospp 2025 | [#2801](https://github.com/apache/dubbo-go/issues/2801) |\r\n\r\n## RPC Communication\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------- | ---------- | ---------------------------- |\r\n| 应用级服务发现在分组订阅、泛化下测试 | P1 | [#2077](https://github.com/apache/dubbo-go/issues/2077) | | |\r\n| Support offline gracefully without registry notification. | P1 | [#1977](https://github.com/apache/dubbo-go/issues/1977) | | |\r\n| Prompt [i/0 timeout] after calling the service multiple times | P1 | [#1868](https://github.com/apache/dubbo-go/issues/1868) | 清玉 | 正在复现,08-03未到会 |\r\n| Package dependency optimization | P1 | [#2741](https://github.com/apache/dubbo-go/issues/2741) | 泽亚,文峰 | 5-18 分配出去了, 稳步进行中 |\r\n| backupCodec makes it meaningless to set serialization protocols on the server side | P1 | [#2875](https://github.com/apache/dubbo-go/issues/2875) | 清玉 | 先不急 |\r\n| Update the template of tools/dubbogo-cli and check the compatibility of tools/dubbogo-cli | P1 | [#2921](https://github.com/apache/dubbo-go/issues/2921) | 雪涛 | Ci没过,重命名tools |\r\n| 项目配置文件,动态修改增强 | P1 | [#2925](https://github.com/apache/dubbo-go/issues/2925) | 孝宇 | |\r\n### Registry\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------ | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| Update the dependency of go-zookeeper in dubbogo | P0 | [#2948](https://github.com/apache/dubbo-go/issues/2948) | 锦涛 | 待提交pr |\r\n\r\n### Protocol\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---------------------------------------- | -------- | ------------------------------------------------------- | ------ | ----------- |\r\n| Delete protocol/dubbo3 and protocol/grpc | P1 | [#2894](https://github.com/apache/dubbo-go/issues/2894) | sirui | 先不急 |\r\n| the default maxMsgLength for getty param | P1 | [#2619](https://github.com/apache/dubbo-go/issues/2619) | 吴歆帆 | |\r\n| Rest protocol | P1 | [#2513](https://github.com/apache/dubbo-go/issues/2513) | 孝宇 | |\r\n\r\n### triple protocol\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------ | -------- | ------------------------------------------------------ | ------------ | ----------- |\r\n| support triple generic call | P0 | | 方泽亚,清玉 | 跟进中 |\r\n| ut failure of TestUnavailableIfHostInvalid | P1 | [2851](https://github.com/apache/dubbo-go/issues/2851) | 泽亚 | 跟进中 |\r\n\r\n### K8s\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------- | ------ | ----------- |\r\n| Expose readiness and liveness apis so the process's status can be detected by the scheduling cluster like K8S. | P1 | [#2039](https://github.com/apache/dubbo-go/issues/2039) | 歆帆哥 | k8s |\r\n\r\n### memory leak\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| --------------------------------- | -------- | ---------------- | -------------- | ------------------------------------------------------------ |\r\n| common.URL,、内存、goroutine 泄漏 | P0 | issue 2683, 2678 | 吴歆帆、罗颖韬 | doc:https://github.com/apache/dubbo-go/discussions/2750,https://github.com/apache/dubbo-go/discussions/2764 跟 歆帆沟通后,推进相关工作。 参考dubbo-go-samples的URL dubbo-go-pixiu-samples |\r\n\r\n### Dubbo kubernetes\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | -------- | ----- | ------------------------ |\r\n| 1.dubbo-kubernetes项目改名 2.项目中的half等模式改名,未来版本去掉模式概念 3.讨论周会时间变更到与dubbogo时间一致4.存储使用数据库(内存不考虑)5.proxy mesh不是主要功能(不急),先完善dubbo admin本来的功能(制定roadmap)6.架构重构 | | | 陈才 | dubbo-kubernetes讨论结果 |\r\n\r\n## obersavability\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---------------------------- | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| Triple OpenTelemetry support | P1 | [#2554](https://github.com/apache/dubbo-go/issues/2554) | 凤瑞 | |\r\n\r\n# tools\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---- | -------- | -------- | ----- | ----------- |\r\n# samples\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| -------------------------- | -------- | ------------------------------------------------------------ | ----- | ----------- |\r\n| Failed to get app metadata | P1 | [#869](https://github.com/apache/dubbo-go-samples/issues/869) | 清玉 | 待提交pr |\r\n| compatibility工作 | P1 | [#compatibility](https://github.com/apache/dubbo-go-samples/tree/main/compatibility) | 锦涛 | |\r\n| Zombie Metrics | P1 | [#Prometheus](https://github.com/apache/dubbo-go-samples/issues/890) | 雪涛哥 | |\r\n# doc\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------- | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| If we need a code style? | P2 | [1755 ](https://github.com/apache/dubbo-go/issues/1755) | | |\r\n| dubbo-go文档 | P2 | [2137](https://github.com/apache/dubbo-go/issues/2137) | | |\r\n| Dubbo Go 文档结构优化设想 | P2 | [2153](https://github.com/apache/dubbo-go/issues/2153) | | |\r\n\r\n\r\n## long-term work\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------------ | ------ | -------------- |\r\n| API易用性改进 | P1 | [#2265](https://github.com/apache/dubbo-go/issues/2265), [#2326](https://github.com/apache/dubbo-go/issues/2326) | 方泽亚 | New API design |\r\n| Summarized todos for [#2441](https://github.com/apache/dubbo-go/issues/2441) | P1 | [#2442](https://github.com/apache/dubbo-go/issues/2442) | 方泽亚 | |\r\n| dubb-go and dubbo-java compatiable | P1 | [#2578](https://github.com/apache/dubbo-go/issues/2578) | | |\r\n| 2024.04.26 weekly | P1 | [#2667](https://github.com/apache/dubbo-go/issues/2667) | | |\r\n| 2022 年制定的一些长期规划 | P0 | [#2136](https://github.com/apache/dubbo-go/issues/2136) | Alex | |\r\n| healthcheck的设计和未来版本的讨论 | P1 | [#2490](https://github.com/apache/dubbo-go/issues/2490) | FinalT | |\r\n| Sample and test-case tasks | P1 | [#2608](https://github.com/apache/dubbo-go/issues/2608) | | |\r\n| Some feature plan and thoughts | P1 | [#2610](https://github.com/apache/dubbo-go/issues/2610) | | |\r\n| 包依赖关系 | P2 | [#2377](https://github.com/apache/dubbo-go/issues/2377),[#2343](https://github.com/apache/dubbo-go/issues/2343),[#2741](https://github.com/apache/dubbo-go/issues/2741) | | |",
"url": "https://github.com/apache/dubbo-go/discussions/2974",
"createdAt": "2025-08-17T13:21:43Z",
"updatedAt": "2026-04-19T15:00:51Z",
"closed": true,
"closedAt": "2026-02-13T02:14:59Z",
"isAnswered": null,
"author": {
"login": "marsevilspirit"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 3002,
"title": "2025-08-31 weekly",
"body": "| Item | Link |\r\n| --------------- | ------------------------------------------------------------ |\r\n| gost | https://github.com/dubbogo/gost |\r\n| hessian2 | https://github.com/apache/dubbo-go-hessian2 |\r\n| pixiu | https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions |\r\n| pixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples |\r\n| dubbogo samples | https://github.com/apache/dubbo-go-samples/issues |\r\n| ospp 2025 | [#2801](https://github.com/apache/dubbo-go/issues/2801) |\r\n\r\nhttps://github.com/dubbogo/gost/issues/133 @marsevilspirit \r\n\r\n## RPC Communication\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------- | ---------- | ---------------------------- |\r\n| 应用级服务发现在分组订阅、泛化下测试 | P1 | [#2077](https://github.com/apache/dubbo-go/issues/2077) | | |\r\n| Support offline gracefully without registry notification. | P1 | [#1977](https://github.com/apache/dubbo-go/issues/1977) | | |\r\n| Prompt [i/0 timeout] after calling the service multiple times | P1 | [#1868](https://github.com/apache/dubbo-go/issues/1868) | 清玉 | 正在复现,08-03未到会 |\r\n| Package dependency optimization | P1 | [#2741](https://github.com/apache/dubbo-go/issues/2741) | 泽亚,文峰 | 5-18 分配出去了, 稳步进行中 |\r\n| backupCodec makes it meaningless to set serialization protocols on the server side | P1 | [#2875](https://github.com/apache/dubbo-go/issues/2875) | 清玉 | 先不急 |\r\n| Update the template of tools/dubbogo-cli and check the compatibility of tools/dubbogo-cli | P1 | [#2921](https://github.com/apache/dubbo-go/issues/2921) | 雪涛 | Ci没过,重命名tools |\r\n| 项目配置文件,动态修改增强 | P1 | [#2925](https://github.com/apache/dubbo-go/issues/2925) | 孝宇 | |\r\n\r\n### Registry\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------ | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| Update the dependency of go-zookeeper in dubbogo | P0 | [#2948](https://github.com/apache/dubbo-go/issues/2948) | 锦涛 | 待提交pr |\r\n\r\n### Protocol\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---------------------------------------- | -------- | ------------------------------------------------------- | ------ | ----------- |\r\n| Delete protocol/dubbo3 and protocol/grpc | P1 | [#2894](https://github.com/apache/dubbo-go/issues/2894) | sirui | 先不急 |\r\n| the default maxMsgLength for getty param | P1 | [#2619](https://github.com/apache/dubbo-go/issues/2619) | 吴歆帆 | |\r\n| Rest protocol | P1 | [#2513](https://github.com/apache/dubbo-go/issues/2513) | 孝宇 | |\r\n\r\n### triple protocol\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------ | -------- | ------------------------------------------------------ | ------------ | ----------- |\r\n| support triple generic call | P0 | | 方泽亚,清玉 | 跟进中 |\r\n| ut failure of TestUnavailableIfHostInvalid | P1 | [2851](https://github.com/apache/dubbo-go/issues/2851) | 泽亚 | 跟进中 |\r\n\r\n### K8s\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------- | ------ | ----------- |\r\n| Expose readiness and liveness apis so the process's status can be detected by the scheduling cluster like K8S. | P1 | [#2039](https://github.com/apache/dubbo-go/issues/2039) | 歆帆哥 | k8s |\r\n\r\n### memory leak\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| --------------------------------- | -------- | ---------------- | -------------- | ------------------------------------------------------------ |\r\n| common.URL,、内存、goroutine 泄漏 | P0 | issue 2683, 2678 | 吴歆帆、罗颖韬 | doc:https://github.com/apache/dubbo-go/discussions/2750,https://github.com/apache/dubbo-go/discussions/2764 跟 歆帆沟通后,推进相关工作。 参考dubbo-go-samples的URL dubbo-go-pixiu-samples |\r\n\r\n### Dubbo kubernetes\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | -------- | ----- | ------------------------ |\r\n| 1.dubbo-kubernetes项目改名 2.项目中的half等模式改名,未来版本去掉模式概念 3.讨论周会时间变更到与dubbogo时间一致4.存储使用数据库(内存不考虑)5.proxy mesh不是主要功能(不急),先完善dubbo admin本来的功能(制定roadmap)6.架构重构 | | | 陈才 | dubbo-kubernetes讨论结果 |\r\n\r\n## obersavability\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---------------------------- | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| Triple OpenTelemetry support | P1 | [#2554](https://github.com/apache/dubbo-go/issues/2554) | 凤瑞,雪涛 | 跟进中 |\r\n\r\n# tools\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---- | -------- | -------- | ----- | ----------- |\r\n| tools,protoc-gen-go-triple\r\n移动到dubbogo主仓库 | | [3000](https://github.com/apache/dubbo-go/issues/3000) | | |\r\n\r\n# samples\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| -------------------------- | -------- | ------------------------------------------------------------ | ------ | ----------- |\r\n| Failed to get app metadata | P1 | [#869](https://github.com/apache/dubbo-go-samples/issues/869) | 清玉 | 待提交pr |\r\n| compatibility工作 | P1 | [#compatibility](https://github.com/apache/dubbo-go-samples/tree/main/compatibility) | 锦涛 | |\r\n| Zombie Metrics | P1 | [#Prometheus](https://github.com/apache/dubbo-go-samples/issues/890) | 雪涛哥 | |\r\n\r\n# doc\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------- | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| If we need a code style? | P2 | [1755 ](https://github.com/apache/dubbo-go/issues/1755) | | |\r\n| dubbo-go文档 | P2 | [2137](https://github.com/apache/dubbo-go/issues/2137) | | |\r\n| Dubbo Go 文档结构优化设想 | P2 | [2153](https://github.com/apache/dubbo-go/issues/2153) | | |\r\n\r\n## long-term work\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------------ | ------ | -------------- |\r\n| API易用性改进 | P1 | [#2265](https://github.com/apache/dubbo-go/issues/2265), [#2326](https://github.com/apache/dubbo-go/issues/2326) | 方泽亚 | New API design |\r\n| Summarized todos for [#2441](https://github.com/apache/dubbo-go/issues/2441) | P1 | [#2442](https://github.com/apache/dubbo-go/issues/2442) | 方泽亚 | |\r\n| dubb-go and dubbo-java compatiable | P1 | [#2578](https://github.com/apache/dubbo-go/issues/2578) | | |\r\n| 2024.04.26 weekly | P1 | [#2667](https://github.com/apache/dubbo-go/issues/2667) | | |\r\n| 2022 年制定的一些长期规划 | P0 | [#2136](https://github.com/apache/dubbo-go/issues/2136) | Alex | |\r\n| healthcheck的设计和未来版本的讨论 | P1 | [#2490](https://github.com/apache/dubbo-go/issues/2490) | FinalT | |\r\n| Sample and test-case tasks | P1 | [#2608](https://github.com/apache/dubbo-go/issues/2608) | | |\r\n| Some feature plan and thoughts | P1 | [#2610](https://github.com/apache/dubbo-go/issues/2610) | | |\r\n| 包依赖关系 | P2 | [#2377](https://github.com/apache/dubbo-go/issues/2377),[#2343](https://github.com/apache/dubbo-go/issues/2343),[#2741](https://github.com/apache/dubbo-go/issues/2741) | | |",
"url": "https://github.com/apache/dubbo-go/discussions/3002",
"createdAt": "2025-08-31T13:28:02Z",
"updatedAt": "2026-02-13T02:15:04Z",
"closed": true,
"closedAt": "2026-02-13T02:15:04Z",
"isAnswered": null,
"author": {
"login": "1kasa"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 3026,
"title": "2025-09-14 weekly",
"body": "| Item | Link |\r\n| --------------- | ------------------------------------------------------------ |\r\n| gost | https://github.com/dubbogo/gost |\r\n| hessian2 | https://github.com/apache/dubbo-go-hessian2 |\r\n| pixiu | https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions |\r\n| pixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples |\r\n| dubbogo samples | https://github.com/apache/dubbo-go-samples/issues |\r\n| ospp 2025 | [#2801](https://github.com/apache/dubbo-go/issues/2801) |\r\n\r\nhttps://github.com/dubbogo/gost/issues/133 @marsevilspirit \r\n\r\n## RPC Communication\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------- | ---------- | ---------------------------- |\r\n| 应用级服务发现在分组订阅、泛化下测试 | P1 | [#2077](https://github.com/apache/dubbo-go/issues/2077) | | |\r\n| Support offline gracefully without registry notification. | P1 | [#1977](https://github.com/apache/dubbo-go/issues/1977) | | |\r\n| Prompt [i/0 timeout] after calling the service multiple times | P1 | [#1868](https://github.com/apache/dubbo-go/issues/1868) | 清玉 | 正在复现,08-03未到会 |\r\n| Package dependency optimization | P1 | [#2741](https://github.com/apache/dubbo-go/issues/2741) | 泽亚,文峰 | 5-18 分配出去了, 稳步进行中 |\r\n| backupCodec makes it meaningless to set serialization protocols on the server side | P1 | [#2875](https://github.com/apache/dubbo-go/issues/2875) | 清玉 | 先不急 |\r\n| 项目配置文件,动态修改增强 | P1 | [#2925](https://github.com/apache/dubbo-go/issues/2925) | 孝宇 | |\r\n\r\n### Registry\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------ | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| Update the dependency of go-zookeeper in dubbogo | P0 | [#2948](https://github.com/apache/dubbo-go/issues/2948) | 锦涛 | 待提交pr |\r\n\r\n### Protocol\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---------------------------------------- | -------- | ------------------------------------------------------- | ------ | ----------- |\r\n| Delete protocol/dubbo3 and protocol/grpc | P1 | [#2894](https://github.com/apache/dubbo-go/issues/2894) | sirui | 先不急 |\r\n| the default maxMsgLength for getty param | P1 | [#2619](https://github.com/apache/dubbo-go/issues/2619) | 吴歆帆 | |\r\n| Rest protocol | P1 | [#2513](https://github.com/apache/dubbo-go/issues/2513) | 孝宇 | |\r\n\r\n### triple protocol\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------ | -------- | ------------------------------------------------------ | ------------ | ----------- |\r\n| support triple generic call | P0 | | 方泽亚,清玉 | 跟进中 |\r\n| ut failure of TestUnavailableIfHostInvalid | P1 | [2851](https://github.com/apache/dubbo-go/issues/2851) | 泽亚 | 跟进中 |\r\n\r\n### K8s\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------- | ------ | ----------- |\r\n| Expose readiness and liveness apis so the process's status can be detected by the scheduling cluster like K8S. | P1 | [#2039](https://github.com/apache/dubbo-go/issues/2039) | 歆帆哥 | k8s |\r\n\r\n### memory leak\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| --------------------------------- | -------- | ---------------- | -------------- | ------------------------------------------------------------ |\r\n| common.URL,、内存、goroutine 泄漏 | P0 | issue 2683, 2678 | 吴歆帆、罗颖韬 | doc:https://github.com/apache/dubbo-go/discussions/2750,https://github.com/apache/dubbo-go/discussions/2764 跟 歆帆沟通后,推进相关工作。 参考dubbo-go-samples的URL dubbo-go-pixiu-samples |\r\n\r\n### Dubbo kubernetes\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | -------- | ----- | ------------------------ |\r\n| 1.dubbo-kubernetes项目改名 2.项目中的half等模式改名,未来版本去掉模式概念 3.讨论周会时间变更到与dubbogo时间一致4.存储使用数据库(内存不考虑)5.proxy mesh不是主要功能(不急),先完善dubbo admin本来的功能(制定roadmap)6.架构重构 | | | 陈才 | dubbo-kubernetes讨论结果 |\r\n\r\n## obersavability\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---------------------------- | -------- | ------------------------------------------------------- | ---------- | ----------- |\r\n| Triple OpenTelemetry support | P1 | [#2554](https://github.com/apache/dubbo-go/issues/2554) | 凤瑞,雪涛 | 跟进中 |\r\n\r\n# tools\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| --------------------------- | -------- | ------------------------------------------------------ | ----- | ----------- |\r\n| tools,protoc-gen-go-triple | | | | |\r\n\r\n# samples\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| -------------------------- | -------- | ------------------------------------------------------------ | ------ | ----------- |\r\n| Failed to get app metadata | P1 | [#869](https://github.com/apache/dubbo-go-samples/issues/869) | 清玉 | 待提交pr |\r\n| compatibility工作 | P1 | [#compatibility](https://github.com/apache/dubbo-go-samples/tree/main/compatibility) | 锦涛 | |\r\n| Zombie Metrics | P1 | [#Prometheus](https://github.com/apache/dubbo-go-samples/issues/890) | 雪涛哥 | |\r\n\r\n# doc\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------- | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| If we need a code style? | P2 | [1755 ](https://github.com/apache/dubbo-go/issues/1755) | | |\r\n| dubbo-go文档 | P2 | [2137](https://github.com/apache/dubbo-go/issues/2137) | | |\r\n| Dubbo Go 文档结构优化设想 | P2 | [2153](https://github.com/apache/dubbo-go/issues/2153) | | |\r\n\r\n## long-term work\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------------ | ------ | -------------- |\r\n| API易用性改进 | P1 | [#2265](https://github.com/apache/dubbo-go/issues/2265), [#2326](https://github.com/apache/dubbo-go/issues/2326) | 方泽亚 | New API design |\r\n| Summarized todos for [#2441](https://github.com/apache/dubbo-go/issues/2441) | P1 | [#2442](https://github.com/apache/dubbo-go/issues/2442) | 方泽亚 | |\r\n| dubb-go and dubbo-java compatiable | P1 | [#2578](https://github.com/apache/dubbo-go/issues/2578) | | |\r\n| 2024.04.26 weekly | P1 | [#2667](https://github.com/apache/dubbo-go/issues/2667) | | |\r\n| 2022 年制定的一些长期规划 | P0 | [#2136](https://github.com/apache/dubbo-go/issues/2136) | Alex | |\r\n| healthcheck的设计和未来版本的讨论 | P1 | [#2490](https://github.com/apache/dubbo-go/issues/2490) | FinalT | |\r\n| Sample and test-case tasks | P1 | [#2608](https://github.com/apache/dubbo-go/issues/2608) | | |\r\n| Some feature plan and thoughts | P1 | [#2610](https://github.com/apache/dubbo-go/issues/2610) | | |\r\n| 包依赖关系 | P2 | [#2377](https://github.com/apache/dubbo-go/issues/2377),[#2343](https://github.com/apache/dubbo-go/issues/2343),[#2741](https://github.com/apache/dubbo-go/issues/2741) | | |",
"url": "https://github.com/apache/dubbo-go/discussions/3026",
"createdAt": "2025-09-14T13:28:31Z",
"updatedAt": "2026-02-13T02:15:25Z",
"closed": true,
"closedAt": "2026-02-13T02:15:25Z",
"isAnswered": null,
"author": {
"login": "marsevilspirit"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 3031,
"title": "2025-09-19 weekly",
"body": "| Item | Link |\r\n| --------------- | ------------------------------------------------------------ |\r\n| gost | https://github.com/dubbogo/gost |\r\n| hessian2 | https://github.com/apache/dubbo-go-hessian2 |\r\n| pixiu | https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions |\r\n| pixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples |\r\n| dubbogo samples | https://github.com/apache/dubbo-go-samples/issues |\r\n| ospp 2025 | [#2801](https://github.com/apache/dubbo-go/issues/2801) |\r\n\r\n\r\n## RPC Communication\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------- | ---------- | ---------------------------- |\r\n| 应用级服务发现在分组订阅、泛化下测试 | P1 | [#2077](https://github.com/apache/dubbo-go/issues/2077) | | |\r\n| Support offline gracefully without registry notification. | P1 | [#1977](https://github.com/apache/dubbo-go/issues/1977) | | |\r\n| Prompt [i/0 timeout] after calling the service multiple times | P1 | [#1868](https://github.com/apache/dubbo-go/issues/1868) | 清玉 | 正在复现,08-03未到会 |\r\n| Package dependency optimization | P1 | [#2741](https://github.com/apache/dubbo-go/issues/2741) | 锦涛、泽亚 | 5-18 分配出去了, 稳步进行中 |\r\n| backupCodec makes it meaningless to set serialization protocols on the server side | P1 | [#2875](https://github.com/apache/dubbo-go/issues/2875) | 清玉 | 先不急 |\r\n| 项目配置文件,动态修改增强 | P1 | [#2925](https://github.com/apache/dubbo-go/issues/2925) | 孝宇 | |\r\n\r\n### Registry\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------ | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| Update the dependency of go-zookeeper in dubbogo | P0 | [#2948](https://github.com/apache/dubbo-go/issues/2948) | 锦涛\\天浩 | 待提交pr |\r\n\r\n### Protocol\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---------------------------------------- | -------- | ------------------------------------------------------- | ------ | ----------- |\r\n| Delete protocol/dubbo3 and protocol/grpc | P1 | [#2894](https://github.com/apache/dubbo-go/issues/2894) | sirui | 先不急 |\r\n| the default maxMsgLength for getty param | P1 | [#2619](https://github.com/apache/dubbo-go/issues/2619) | | |\r\n| Rest protocol | P1 | [#2513](https://github.com/apache/dubbo-go/issues/2513) | 孝宇 | |\r\n\r\n### triple protocol\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------ | -------- | ------------------------------------------------------ | ------------ | ----------- |\r\n| support triple generic call | P0 | | 清玉 | 本周提交 PR |\r\n| [Discuss] the problem of http3 | P1 | https://github.com/apache/dubbo-go/issues/3030 | | |\r\n\r\n\r\n### K8s\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------- | ------ | ----------- |\r\n| Expose readiness and liveness apis so the process's status can be detected by the scheduling cluster like K8S. | P1 | [#2039](https://github.com/apache/dubbo-go/issues/2039) | | k8s |\r\n\r\n### memory leak\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| --------------------------------- | -------- | ---------------- | -------------- | ------------------------------------------------------------ |\r\n| common.URL,、内存、goroutine 泄漏 | P0 | issue 2683, 2678 | 吴歆帆、罗颖韬 | doc:https://github.com/apache/dubbo-go/discussions/2750,https://github.com/apache/dubbo-go/discussions/2764 跟 歆帆沟通后,推进相关工作。 参考dubbo-go-samples的URL dubbo-go-pixiu-samples |\r\n\r\n\r\n## obersavability\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ---------------------------- | -------- | ------------------------------------------------------- | ---------- | ----------- |\r\n| Triple OpenTelemetry support | P1 | [#2554](https://github.com/apache/dubbo-go/issues/2554) | 凤瑞,雪涛 | 已经提交 PR https://github.com/apache/dubbo-go-samples/pull/926 |\r\n\r\n# tools\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| --------------------------- | -------- | ------------------------------------------------------ | ----- | ----------- |\r\n| tools,protoc-gen-go-triple | | | | |\r\n\r\n# samples\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| -------------------------- | -------- | ------------------------------------------------------------ | ------ | ----------- |\r\n| | P0 | [#912](https://github.com/apache/dubbo-go-samples/issues/912) | zhenqiang | |\r\n| Failed to get app metadata | P1 | [#869](https://github.com/apache/dubbo-go-samples/issues/869) | 清玉 | 待提交pr |\r\n| compatibility工作 | P1 | [#compatibility](https://github.com/apache/dubbo-go-samples/tree/main/compatibility) | 锦涛 | |\r\n| Zombie Metrics | P1 | [#Prometheus](https://github.com/apache/dubbo-go-samples/issues/890) | 雪涛哥 | |\r\n| book flight failed | P1 | https://github.com/apache/dubbo-go-samples/issues/910 | caicai | |\r\n| llm start failed | P1 | https://github.com/apache/dubbo-go-samples/issues/909 | caicai | |\r\n| CVE-2025-1975: Ollama Server Denial of Service Vulnerability | P1 | https://github.com/apache/dubbo-go-samples/issues/846 | caicai | |\r\n| 应用级泛化调用 go client 调用 java service 调不通 [tag router] invokers from previous router is empty | P0 | https://github.com/apache/dubbo-go-samples/issues/772 | | |\r\n| ChatClient & ChatModel | P1 | https://github.com/apache/dubbo-go-samples/issues/816 | | |\r\n| Optimize time.Sleep in the code by replacing it with other alternatives | P1 | https://github.com/apache/dubbo-go-samples/issues/915 | | |\r\n| dubbo-go-samples rpc/multi-protocols can't run but test success | P1 | [ ](https://github.com/apache/dubbo-go-samples/issues/845) | | |\r\n| recover old dubbo-go samples | P1 | https://github.com/apache/dubbo-go-samples/issues/843 | | |\r\n| Enhance dubbo-go cross test | P0 | https://github.com/apache/dubbo-go-samples/issues/837 | | |\r\n\r\n# doc\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------- | -------- | ------------------------------------------------------- | ----- | ----------- |\r\n| If we need a code style? | P2 | [1755 ](https://github.com/apache/dubbo-go/issues/1755) | | |\r\n| dubbo-go文档 | P2 | [2137](https://github.com/apache/dubbo-go/issues/2137) | | |\r\n| Dubbo Go 文档结构优化设想 | P2 | [2153](https://github.com/apache/dubbo-go/issues/2153) | | |\r\n\r\n## long-term work\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------------------------------------------------------------ | -------- | ------------------------------------------------------------ | ------ | -------------- |\r\n| API易用性改进 | P1 | [#2265](https://github.com/apache/dubbo-go/issues/2265), [#2326](https://github.com/apache/dubbo-go/issues/2326) | 方泽亚 | New API design |\r\n| Summarized todos for [#2441](https://github.com/apache/dubbo-go/issues/2441) | P1 | [#2442](https://github.com/apache/dubbo-go/issues/2442) | 方泽亚 | |\r\n| dubb-go and dubbo-java compatiable | P1 | [#2578](https://github.com/apache/dubbo-go/issues/2578) | | |\r\n| 2024.04.26 weekly | P1 | [#2667](https://github.com/apache/dubbo-go/issues/2667) | | |\r\n| 2022 年制定的一些长期规划 | P0 | [#2136](https://github.com/apache/dubbo-go/issues/2136) | Alex | |\r\n| healthcheck的设计和未来版本的讨论 | P1 | [#2490](https://github.com/apache/dubbo-go/issues/2490) | FinalT | |\r\n| Sample and test-case tasks | P1 | [#2608](https://github.com/apache/dubbo-go/issues/2608) | | |\r\n| Some feature plan and thoughts | P1 | [#2610](https://github.com/apache/dubbo-go/issues/2610) | | |\r\n| 包依赖关系 | P2 | [#2377](https://github.com/apache/dubbo-go/issues/2377),[#2343](https://github.com/apache/dubbo-go/issues/2343),[#2741](https://github.com/apache/dubbo-go/issues/2741) | | |\r\n",
"url": "https://github.com/apache/dubbo-go/discussions/3031",
"createdAt": "2025-09-19T14:22:05Z",
"updatedAt": "2026-02-13T02:15:39Z",
"closed": true,
"closedAt": "2026-02-13T02:15:39Z",
"isAnswered": null,
"author": {
"login": "AlexStocks"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 3057,
"title": "20251019 weekly",
"body": "| Item | Link |\r\n| ------ | ------- |\r\n| gost | [https://github.com/dubbogo/gost](https://github.com/dubbogo/gost) |\r\n| hessian2 | [https://github.com/apache/dubbo-go-hessian2](https://github.com/apache/dubbo-go-hessian2) |\r\n| pixiu | [https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions](https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions) |\r\n| pixiu-samples | [https://github.com/apache/dubbo-go-pixiu-samples](https://github.com/apache/dubbo-go-pixiu-samples) |\r\n| dubbogo samples | [https://github.com/apache/dubbo-go-samples/issues](https://github.com/apache/dubbo-go-samples/issues) |\r\n\r\n## RPC Communication\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------ | ---------- | ----------- | -------- | -------- |\r\n| [提案] server/server.go中Serve优化 | P1 | https://github.com/apache/dubbo-go/issues/3033 | | |\r\n| [FEATURE] expose the API of Router | P1 | https://github.com/apache/dubbo-go/issues/3045 | zhangqi & fengrui | |\r\n| 应用级服务发现在分组订阅、泛化下测试 | P1 | [#2077](https://github.com/apache/dubbo-go/issues/2077) | | |\r\n| Support offline gracefully without registry notification. | P1 | [#1977](https://github.com/apache/dubbo-go/issues/1977) | | |\r\n| Prompt [i/0 timeout] after calling the service multiple times | P1 | [#1868](https://github.com/apache/dubbo-go/issues/1868) | wangyangzheng(yumosx) | 09-30: 转交给 yangzheng |\r\n| Package dependency optimization | P1 | [#2741](https://github.com/apache/dubbo-go/issues/2741) | 锦涛、泽亚 | 09-30: zeya & sirui 需要继续推进 |\r\n| backupCodec makes it meaningless to set serialization protocols on the server side | P1 | [#2875](https://github.com/apache/dubbo-go/issues/2875) | 清玉 | 先不急 |\r\n| 项目配置文件,动态修改增强 | P1 | [#2925](https://github.com/apache/dubbo-go/issues/2925) | 孝宇 | |\r\n\r\n### Registry\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------ | ---------- | ----------- | -------- | -------- |\r\n| Update the dependency of go-zookeeper in dubbogo | P0 | [#2948](https://github.com/apache/dubbo-go/issues/2948) | 锦涛\\\\天浩 | pr https://github.com/dubbogo/go-zookeeper/pull/11,有待 陈才 review |\r\n\r\n### Protocol\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------ | ---------- | ----------- | -------- | -------- |\r\n| Delete protocol/dubbo3 and protocol/grpc | P1 | [#2894](https://github.com/apache/dubbo-go/issues/2894) | sirui | 先不急 |\r\n| Rest protocol | P1 | [#2513](https://github.com/apache/dubbo-go/issues/2513) | 孝宇 | |\r\n\r\n### triple protocol\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------ | ---------- | ----------- | -------- | -------- |\r\n| support triple generic call | P0 | | 清玉 | 本周提交 PR,待提交pr |\r\n| [Discuss] the problem of http3 | P1 | [#3030](https://github.com/apache/dubbo-go/issues/3030) | | |\r\n\r\n### K8s\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------ | ---------- | ----------- | -------- | -------- |\r\n| Expose readiness and liveness apis so the process's status can be detected by the scheduling cluster like K8S. | P1 | [#2039](https://github.com/apache/dubbo-go/issues/2039) | | k8s |\r\n\r\n### memory leak\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------ | ---------- | ----------- | -------- | -------- |\r\n| common.URL,、内存、goroutine 泄漏 | P0 | issue 2683, 2678 | 吴歆帆、罗颖韬 | doc:[https://github.com/apache/dubbo-go/discussions/2750,https://github.com/apache/dubbo-go/discussions/2764](https://github.com/apache/dubbo-go/discussions/2750%EF%BC%8Chttps://github.com/apache/dubbo-go/discussions/2764) 跟 歆帆沟通后,推进相关工作。 参考dubbo-go-samples的URL dubbo-go-pixiu-samples |\r\n\r\n## obersavability\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------ | ---------- | ----------- | -------- | -------- |\r\n| Triple OpenTelemetry support | P1 | [apache/dubbo-go-samples#926](https://github.com/apache/dubbo-go-samples/pull/926) | 雪涛 | 等发版本之后再处理 |\r\n\r\n# tools\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------ | ---------- | ----------- | -------- | -------- |\r\n| tools,protoc-gen-go-triple | | | | |\r\n\r\n# samples\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------ | ---------- | ----------- | -------- | -------- |\r\n| | P0 | [#912](https://github.com/apache/dubbo-go-samples/issues/912) | zhenqiang | |\r\n| Failed to get app metadata | P1 | [#869](https://github.com/apache/dubbo-go-samples/issues/869) | 清玉 ,zhongjunfa | 09-30: 工作转交给 zhongjunfa |\r\n| compatibility工作 | P1 | [#compatibility](https://github.com/apache/dubbo-go-samples/tree/main/compatibility) | 锦涛 | |\r\n| book flight failed | P1 | [apache/dubbo-go-samples#910](https://github.com/apache/dubbo-go-samples/issues/910) | caicai | 0930 已经提交 PR https://github.com/apache/dubbo-go-samples/pull/932 |\r\n| 应用级泛化调用 go client 调用 java service 调不通 [tag router] invokers from previous router is empty | P0 | [apache/dubbo-go-samples#772](https://github.com/apache/dubbo-go-samples/issues/772) | | |\r\n| ChatClient & ChatModel | P1 | [apache/dubbo-go-samples#816](https://github.com/apache/dubbo-go-samples/issues/816) | | |\r\n| Optimize time.Sleep in the code by replacing it with other alternatives | P1 | [apache/dubbo-go-samples#915](https://github.com/apache/dubbo-go-samples/issues/915) | | |\r\n| dubbo-go-samples rpc/multi-protocols can't run but test success | P1 | | | |\r\n| recover old dubbo-go samples | P1 | [apache/dubbo-go-samples#843](https://github.com/apache/dubbo-go-samples/issues/843) | | |\r\n| Enhance dubbo-go cross test | P0 | [apache/dubbo-go-samples#837](https://github.com/apache/dubbo-go-samples/issues/837) | | |\r\n\r\n# doc\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------ | ---------- | ----------- | -------- | -------- |\r\n| If we need a code style? | P2 | [1755](https://github.com/apache/dubbo-go/issues/1755) | | |\r\n| dubbo-go文档 | P2 | [2137](https://github.com/apache/dubbo-go/issues/2137) | | |\r\n| Dubbo Go 文档结构优化设想 | P2 | [2153](https://github.com/apache/dubbo-go/issues/2153) | | |\r\n\r\n## long-term work\r\n\r\n| Item | Priority | Issue/Pr | Owner | Description |\r\n| ------ | ---------- | ----------- | -------- | -------- |\r\n| API易用性改进 | P1 | [#2265](https://github.com/apache/dubbo-go/issues/2265), [#2326](https://github.com/apache/dubbo-go/issues/2326) | 方泽亚 | New API design |\r\n| Summarized todos for [#2441](https://github.com/apache/dubbo-go/issues/2441) | P1 | [#2442](https://github.com/apache/dubbo-go/issues/2442) | 方泽亚 | |\r\n| dubb-go and dubbo-java compatiable | P1 | [#2578](https://github.com/apache/dubbo-go/issues/2578) | | |\r\n| 2024.04.26 weekly | P1 | [#2667](https://github.com/apache/dubbo-go/issues/2667) | | |\r\n| 2022 年制定的一些长期规划 | P0 | [#2136](https://github.com/apache/dubbo-go/issues/2136) | Alex | |\r\n| healthcheck的设计和未来版本的讨论 | P1 | [#2490](https://github.com/apache/dubbo-go/issues/2490) | FinalT | |\r\n| Sample and test-case tasks | P1 | [#2608](https://github.com/apache/dubbo-go/issues/2608) | | |\r\n| Some feature plan and thoughts | P1 | [#2610](https://github.com/apache/dubbo-go/issues/2610) | | |\r\n| 包依赖关系 | P2 | [#2377](https://github.com/apache/dubbo-go/issues/2377),[#2343](https://github.com/apache/dubbo-go/issues/2343),[#2741](https://github.com/apache/dubbo-go/issues/2741) | | |\r\n",
"url": "https://github.com/apache/dubbo-go/discussions/3057",
"createdAt": "2025-10-19T14:05:25Z",
"updatedAt": "2026-02-13T02:15:46Z",
"closed": true,
"closedAt": "2026-02-13T02:15:46Z",
"isAnswered": null,
"author": {
"login": "AlexStocks"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 3063,
"title": "20251026 weekly",
"body": "\r\n# 🧭 Dubbo-go 社区周报\r\n\r\n| 项目 | 链接 |\r\n| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |\r\n| gost | [https://github.com/dubbogo/gost](https://github.com/dubbogo/gost) |\r\n| hessian2 | [https://github.com/apache/dubbo-go-hessian2](https://github.com/apache/dubbo-go-hessian2) |\r\n| pixiu | [https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions](https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions) |\r\n| pixiu-samples | [https://github.com/apache/dubbo-go-pixiu-samples](https://github.com/apache/dubbo-go-pixiu-samples) |\r\n| dubbogo-samples | [https://github.com/apache/dubbo-go-samples/issues](https://github.com/apache/dubbo-go-samples/issues) |\r\n\r\n---\r\n\r\n## 🧩 RPC Communication\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------------------------------------- | ------------------------------------------------------- | ---------------------- | --------------------------- |\r\n| [FEATURE] Expose the API of Router | [#3045](https://github.com/apache/dubbo-go/issues/3045) | zhangqi, fengrui | 10-26: zhangqi 已确定修改方案 |\r\n| [提案] `server/server.go` 中 Serve 优化 | [#3033](https://github.com/apache/dubbo-go/issues/3033) | - | - |\r\n| Package dependency optimization | [#2741](https://github.com/apache/dubbo-go/issues/2741) | 锦涛、泽亚 | 09-30: zeya & sirui 需要继续推进10-26: #3054 #3034 #3029 待审 |\r\n| 项目配置文件动态修改增强 | [#2925](https://github.com/apache/dubbo-go/issues/2925) | 孝宇 | 10-26: #2992 待合并 |\r\n| Prompt [i/o timeout] after multiple service calls | [#1868](https://github.com/apache/dubbo-go/issues/1868) | wangyangzheng (yumosx) | 09-30: 转交给 yangzheng 10-26: 未复现成功 |\r\n\r\n---\r\n\r\n## 🧱 Registry\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| -------------------------------------------------------- | ------------------------------------------------------- | ------- | -------------------------------------------------------------------- |\r\n| [BUG] dubbo-go3.3 client 调用 3.1 server 时兼容性问题 | [#3051](https://github.com/apache/dubbo-go/issues/3051) | tianhao | 10-26: 尝试复现 |\r\n| [BUG] dubbo-go 3.3.0 无法发现 Java Dubbo 2.5.7 注册服务 | [#3033](https://github.com/apache/dubbo-go/issues/3033) | yuchen | 10-26: 尝试复现 |\r\n| Update dependency of go-zookeeper | [#2948](https://github.com/apache/dubbo-go/issues/2948) | 锦涛、天浩 | 10-26: PR [#11](https://github.com/dubbogo/go-zookeeper/pull/11) 才哥 review 10-26: PR [#11](https://github.com/dubbogo/go-zookeeper/pull/11) 待合并 |\r\n| Support offline gracefully without registry notification | [#1977](https://github.com/apache/dubbo-go/issues/1977) | - | - |\r\n\r\n---\r\n\r\n## ⚙️ Protocol\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ---------------------------------- | ------------------------------------------------------- | ----- | ------- |\r\n| [Discuss] HTTP3 相关问题 | [#3030](https://github.com/apache/dubbo-go/issues/3030) | - | - |\r\n| 删除 protocol/dubbo3 与 protocol/grpc | [#2894](https://github.com/apache/dubbo-go/issues/2894) | sirui | 暂缓处理 |\r\n| backupCodec 导致服务端序列化协议设置无效 | [#2875](https://github.com/apache/dubbo-go/issues/2875) | 清玉 | 暂缓处理 |\r\n| Rest 协议支持 | [#2513](https://github.com/apache/dubbo-go/issues/2513) | 孝宇 | - |\r\n| 应用级服务发现:分组订阅、泛化场景测试 | [#2077](https://github.com/apache/dubbo-go/issues/2077) | - | - |\r\n| Support triple generic call | - | 清玉 | - |\r\n\r\n---\r\n\r\n## ☸️ K8s\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| --------------------------- | ------------------------------------------------------- | --- | -------- |\r\n| 暴露 readiness 与 liveness API | [#2039](https://github.com/apache/dubbo-go/issues/2039) | - | - |\r\n\r\n---\r\n\r\n## 🧠 Memory Leak\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ----------------------------- | --------------------------------------------------------------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------- |\r\n| `common.URL`、内存与 goroutine 泄漏 | [#2683](https://github.com/apache/dubbo-go/issues/2683)、[#2678](https://github.com/apache/dubbo-go/issues/2678) | 吴歆帆、罗颖韬 | 参考讨论:[2750](https://github.com/apache/dubbo-go/discussions/2750)、[2764](https://github.com/apache/dubbo-go/discussions/2764),与歆帆沟通后推进 |\r\n\r\n---\r\n\r\n## 🔧 Tools\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| --------------------------- | ------------------------------------------------------- | ------ | ----------------------- |\r\n| `protoc-gen-go-triple` 工具优化 | [#3052](https://github.com/apache/dubbo-go/issues/3052) | caicai | 10-26: caicai 正在 review |\r\n\r\n---\r\n\r\n## 🧪 Samples\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| -------------------------- | ----------------------------------------------------------------------------------- | ------------- | -------------------------------- |\r\n| 优化代码中的 `time.Sleep` 实现 | [#915](https://github.com/apache/dubbo-go-samples/issues/915) | - | 暂缓处理 |\r\n| 集成测试配置中心报错 | [#912](https://github.com/apache/dubbo-go-samples/issues/912) | zhenqiang | - |\r\n| 增强 cross-test 测试 | [#837](https://github.com/apache/dubbo-go-samples/issues/837) | - | - |\r\n| ChatClient & ChatModel 示例 | [#816](https://github.com/apache/dubbo-go-samples/issues/816) | - | - |\r\n| 应用级泛化调用(Go 调用 Java)报错 | [#772](https://github.com/apache/dubbo-go-samples/issues/772) | - | 10-26: 属于 config 问题,等待 config 更新 |\r\n| Failed to get app metadata | [#869](https://github.com/apache/dubbo-go-samples/issues/869) | 清玉、zhongjunfa | 09-30: zhongjunfa 没复现出来 10-26: sirui 复现后再判断是否关闭 |\r\n| Compatibility 工作 | [compatibility](https://github.com/apache/dubbo-go-samples/tree/main/compatibility) | 锦涛 | - |\r\n\r\n---\r\n\r\n## 📖 Documentation\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------ | ------------------------------------------------------- | --- | ---- |\r\n| 文档结构优化设想 | [#2153](https://github.com/apache/dubbo-go/issues/2153) | - | - |\r\n| dubbo-go 文档完善 | [#2137](https://github.com/apache/dubbo-go/issues/2137) | - | - |\r\n| 是否需要 code style 指南 | [#1755](https://github.com/apache/dubbo-go/issues/1755) | - | - |\r\n\r\n---\r\n\r\n## 🚀 Long-term Work\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------- |\r\n| Weekly 汇总 (2024.04.26) | [#2667](https://github.com/apache/dubbo-go/issues/2667) | - | - |\r\n| Dubbo-go 与 Dubbo-Java 兼容性 | [#2578](https://github.com/apache/dubbo-go/issues/2578) | - | - |\r\n| Healthcheck 设计与未来版本讨论 | [#2490](https://github.com/apache/dubbo-go/issues/2490) | FinalT | - |\r\n| 功能规划与思考 | [#2610](https://github.com/apache/dubbo-go/issues/2610) | - | - |\r\n| Samples & Test-case 任务 | [#2608](https://github.com/apache/dubbo-go/issues/2608) | - | - |\r\n| API 易用性改进 | [#2326](https://github.com/apache/dubbo-go/issues/2326)、[#2265](https://github.com/apache/dubbo-go/issues/2265) | 方泽亚 | 新 API 设计 |\r\n| 包依赖关系整理 | [#2741](https://github.com/apache/dubbo-go/issues/2741)、[#2377](https://github.com/apache/dubbo-go/issues/2377)、[#2343](https://github.com/apache/dubbo-go/issues/2343) | - | - |\r\n| [#2441](https://github.com/apache/dubbo-go/issues/2441) 任务总结 | [#2442](https://github.com/apache/dubbo-go/issues/2442) | 方泽亚 | - |\r\n| 2022 年长期规划 | [#2136](https://github.com/apache/dubbo-go/issues/2136) | Alex | - |",
"url": "https://github.com/apache/dubbo-go/discussions/3063",
"createdAt": "2025-10-26T13:33:44Z",
"updatedAt": "2026-02-13T02:15:53Z",
"closed": true,
"closedAt": "2026-02-13T02:15:53Z",
"isAnswered": null,
"author": {
"login": "Alanxtl"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 3068,
"title": "20251116 weekly",
"body": "# 🧭 Dubbo-go 社区周报\r\n\r\n| 项目 | 链接 |\r\n| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |\r\n| gost | [https://github.com/dubbogo/gost](https://github.com/dubbogo/gost) |\r\n| hessian2 | [https://github.com/apache/dubbo-go-hessian2](https://github.com/apache/dubbo-go-hessian2) |\r\n| pixiu | [https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions](https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions) |\r\n| pixiu-samples | [https://github.com/apache/dubbo-go-pixiu-samples](https://github.com/apache/dubbo-go-pixiu-samples) |\r\n| dubbogo-samples | [https://github.com/apache/dubbo-go-samples/issues](https://github.com/apache/dubbo-go-samples/issues) |\r\n\r\n---\r\n\r\n## 🧩 RPC Communication\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------------------------------------- | ------------------------------------------------------- | ---------------------- | --------------------------- |\r\n| [FEATURE] Expose the API of Router | [#3045](https://github.com/apache/dubbo-go/issues/3045) | zhangqi, fengrui | 10-26: zhangqi 已确定修改方案 |\r\n|[提案] server/server.go中Serve优化 | [#3042](https://github.com/apache/dubbo-go/issues/3042) | junfa| - |\r\n| Package dependency optimization | [#2741](https://github.com/apache/dubbo-go/issues/2741) | 锦涛、泽亚 | 09-30: zeya & sirui 需要继续推进 10-26: #3054 #3034 #3029 #3066 待审 |\r\n| 允许在接口精确匹配时使用 group/version 通配符 | [#3074](https://github.com/apache/dubbo-go/issues/3074) | yuchen | 11-16: assign |\r\n---\r\n\r\n## 🧱 Registry\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| -------------------------------------------------------- | ------------------------------------------------------- | ------- | -------------------------------------------------------------------- |\r\n| Support offline gracefully without registry notification | [#1977](https://github.com/apache/dubbo-go/issues/1977) | yingtao | 08-18: assign |\r\n\r\n---\r\n\r\n## ⚙️ Protocol\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ---------------------------------- | ------------------------------------------------------- | ----- | ------- |\r\n| [Discuss] HTTP3 相关问题 | [#3030](https://github.com/apache/dubbo-go/issues/3030) | xuetaoge | - |\r\n| 删除 protocol/dubbo3 与 protocol/grpc | [#2894](https://github.com/apache/dubbo-go/issues/2894) | sirui | 暂缓处理 |\r\n| backupCodec 导致服务端序列化协议设置无效 | [#2875](https://github.com/apache/dubbo-go/issues/2875) | zecheng | 11-16: assign|\r\n| Rest 协议支持 | [#2513](https://github.com/apache/dubbo-go/issues/2513) | caicai | 11-16: assign |\r\n| 应用级服务发现:分组订阅、泛化场景测试 | [#2077](https://github.com/apache/dubbo-go/issues/2077) | tianhao |11-16: assign|\r\n| Support triple generic call | - | 清玉 | - |\r\n| dubbo-go-hessian 2 pr 处理 | [3078](https://github.com/apache/dubbo-go/issues/3078) | yangzheng | - |\r\n\r\n---\r\n\r\n## ☸️ K8s\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| --------------------------- | ------------------------------------------------------- | --- | -------- |\r\n| 暴露 readiness 与 liveness API | [#2039](https://github.com/apache/dubbo-go/issues/2039) | - | - |\r\n\r\n---\r\n\r\n## 🧠 Memory Leak\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ----------------------------- | --------------------------------------------------------------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------- |\r\n| `common.URL`、内存与 goroutine 泄漏 | [#2683](https://github.com/apache/dubbo-go/issues/2683)、[#2678](https://github.com/apache/dubbo-go/issues/2678) | 吴歆帆、罗颖韬 | 参考讨论:[2750](https://github.com/apache/dubbo-go/discussions/2750)、[2764](https://github.com/apache/dubbo-go/discussions/2764),与歆帆沟通后推进 |\r\n\r\n---\r\n\r\n## 🔧 Tools\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| --------------------------- | ------------------------------------------------------- | ------ | ----------------------- |\r\n\r\n---\r\n\r\n## 🧪 Samples\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| -------------------------- | ----------------------------------------------------------------------------------- | ------------- | -------------------------------- |\r\n| 优化代码中的 `time.Sleep` 实现 | [#915](https://github.com/apache/dubbo-go-samples/issues/915) | zecheng | |\r\n| 增强 cross-test 测试 | [#837](https://github.com/apache/dubbo-go-samples/issues/837) | chenle | 11-16: assign |\r\n| ChatClient & ChatModel 示例 | [#816](https://github.com/apache/dubbo-go-samples/issues/816) | - | - |\r\n| 应用级泛化调用(Go 调用 Java)报错 | [#772](https://github.com/apache/dubbo-go-samples/issues/772) | - | 10-26: 属于 config 问题,等待 config 更新 |\r\n| Compatibility 工作 | [compatibility](https://github.com/apache/dubbo-go-samples/tree/main/compatibility) | 锦涛 | - |\r\n| grpc test error | [930](https://github.com/apache/dubbo-go-samples/issues/930) | yangzheng |11-16: pr ci fail [pr](https://github.com/apache/dubbo-go-samples/pull/931) |\r\n\r\n\r\n---\r\n\r\n## 📖 Documentation\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------ | ------------------------------------------------------- | --- | ---- |\r\n| 文档结构优化设想 | [#2153](https://github.com/apache/dubbo-go/issues/2153) | - | - |\r\n| dubbo-go 文档完善 | [#2137](https://github.com/apache/dubbo-go/issues/2137) | - | - |\r\n| 是否需要 code style 指南 | [#1755](https://github.com/apache/dubbo-go/issues/1755) | - | - |\r\n\r\n---\r\n\r\n## 🚀 Long-term Work\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------- |\r\n| Weekly 汇总 (2024.04.26) | [#2667](https://github.com/apache/dubbo-go/issues/2667) | - | - |\r\n| Dubbo-go 与 Dubbo-Java 兼容性 | [#2578](https://github.com/apache/dubbo-go/issues/2578) | - | - |\r\n| Healthcheck 设计与未来版本讨论 | [#2490](https://github.com/apache/dubbo-go/issues/2490) | FinalT | - |\r\n| 功能规划与思考 | [#2610](https://github.com/apache/dubbo-go/issues/2610) | - | - |\r\n| Samples & Test-case 任务 | [#2608](https://github.com/apache/dubbo-go/issues/2608) | - | - |\r\n| API 易用性改进 | [#2326](https://github.com/apache/dubbo-go/issues/2326)、[#2265](https://github.com/apache/dubbo-go/issues/2265) | 方泽亚 | 新 API 设计 |\r\n| 包依赖关系整理 | [#2741](https://github.com/apache/dubbo-go/issues/2741)、[#2377](https://github.com/apache/dubbo-go/issues/2377)、[#2343](https://github.com/apache/dubbo-go/issues/2343) | - | - |\r\n| [#2441](https://github.com/apache/dubbo-go/issues/2441) 任务总结 | [#2442](https://github.com/apache/dubbo-go/issues/2442) | 方泽亚 | - |\r\n| 2022 年长期规划 | [#2136](https://github.com/apache/dubbo-go/issues/2136) | Alex | - |",
"url": "https://github.com/apache/dubbo-go/discussions/3068",
"createdAt": "2025-11-02T13:01:14Z",
"updatedAt": "2026-02-13T02:16:03Z",
"closed": true,
"closedAt": "2026-02-13T02:16:03Z",
"isAnswered": null,
"author": {
"login": "marsevilspirit"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 3094,
"title": "20251130 weekly",
"body": "# 🧭 Dubbo-go 社区周报\r\n\r\n| 项目 | 链接 |\r\n| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |\r\n| gost | [https://github.com/dubbogo/gost](https://github.com/dubbogo/gost) |\r\n| hessian2 | [https://github.com/apache/dubbo-go-hessian2](https://github.com/apache/dubbo-go-hessian2) |\r\n| pixiu | [https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions](https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions) |\r\n| pixiu-samples | [https://github.com/apache/dubbo-go-pixiu-samples](https://github.com/apache/dubbo-go-pixiu-samples) |\r\n| dubbogo-samples | [https://github.com/apache/dubbo-go-samples/issues](https://github.com/apache/dubbo-go-samples/issues) |\r\n\r\n---\r\n\r\n## 🧩 RPC Communication\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------------------------------------- | ------------------------------------------------------- | ---------------------- | --------------------------- |\r\n| [FEATURE] Expose the API of Router | [#3045](https://github.com/apache/dubbo-go/issues/3045) | zhangqi, fengrui | 10-26: zhangqi 已确定修改方案 |\r\n|[提案] server/server.go中Serve优化 | [#3042](https://github.com/apache/dubbo-go/issues/3042) | junfa| - |\r\n|[BUG] gost lint fail| [#3081](https://github.com/apache/dubbo-go/issues/3081) | yangzheng | |\r\n| API 易用性改进 | [#2326](https://github.com/apache/dubbo-go/issues/2326)| | 新 API 设计 |\r\n\r\n---\r\n\r\n## 🧱 Registry\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| -------------------------------------------------------- | ------------------------------------------------------- | ------- | -------------------------------------------------------------------- |\r\n| Support offline gracefully without registry notification | [#1977](https://github.com/apache/dubbo-go/issues/1977) | yingtao | 08-18: assign 11-30: 继续推进 |\r\n\r\n---\r\n\r\n## ⚙️ Protocol\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ---------------------------------- | ------------------------------------------------------- | ----- | ------- |\r\n|[FEATURE] Implement Triple Client Pool | [#3087](https://github.com/apache/dubbo-go/issues/3087) | Aetherance| - |\r\n|[FEATURE] support CORS for Triple | [#3089](https://github.com/apache/dubbo-go/issues/3089) | zecheng| - |\r\n| [Discuss] HTTP3 相关问题 | [#3030](https://github.com/apache/dubbo-go/issues/3030) | yuchen| - |\r\n| 删除 protocol/dubbo3 与 protocol/grpc | [#3093](https://github.com/apache/dubbo-go/issues/3093) | caicai | |\r\n| backupCodec 导致服务端序列化协议设置无效 | [#2875](https://github.com/apache/dubbo-go/issues/2875) | zecheng | 11-16: assign|\r\n| Rest 协议支持 | [#2513](https://github.com/apache/dubbo-go/issues/2513) | caicai | 11-16: assign |\r\n| 应用级服务发现:分组订阅、泛化场景测试 | [#2077](https://github.com/apache/dubbo-go/issues/2077) | tianhao |11-16: assign|\r\n| Support triple generic call | - | 清玉 | - |\r\n| dubbo-go-hessian 2 pr 处理 | [3078](https://github.com/apache/dubbo-go/issues/3078) | yangzheng | - |\r\n\r\n---\r\n\r\n## ☸️ K8s\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| --------------------------- | ------------------------------------------------------- | --- | -------- |\r\n| 暴露 readiness 与 liveness API | [#2039](https://github.com/apache/dubbo-go/issues/2039) | - | - |\r\n\r\n---\r\n\r\n## 🧠 Memory Leak\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ----------------------------- | --------------------------------------------------------------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------- |\r\n| `common.URL`、内存与 goroutine 泄漏 | [#2683](https://github.com/apache/dubbo-go/issues/2683)、[#2678](https://github.com/apache/dubbo-go/issues/2678) | 吴歆帆、罗颖韬 | 参考讨论:[2750](https://github.com/apache/dubbo-go/discussions/2750)、[2764](https://github.com/apache/dubbo-go/discussions/2764),与歆帆沟通后推进 |\r\n\r\n---\r\n\r\n## 🔧 Tools\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| --------------------------- | ------------------------------------------------------- | ------ | ----------------------- |\r\n\r\n---\r\n\r\n## 🧪 Samples\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| -------------------------- | ----------------------------------------------------------------------------------- | ------------- | -------------------------------- |\r\n| 优化代码中的 `time.Sleep` 实现 | [#915](https://github.com/apache/dubbo-go-samples/issues/915) | zecheng | |\r\n| ChatClient & ChatModel 示例 | [#816](https://github.com/apache/dubbo-go-samples/issues/816) | - | - |\r\n| 应用级泛化调用(Go 调用 Java)报错 | [#772](https://github.com/apache/dubbo-go-samples/issues/772) | - | 10-26: 属于 config 问题,等待 config 更新 |\r\n\r\n---\r\n\r\n## 📖 Documentation\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------ | ------------------------------------------------------- | --- | ---- |\r\n| 文档结构优化设想 | [#2153](https://github.com/apache/dubbo-go/issues/2153) | - | - |\r\n| dubbo-go 文档完善 | [#2137](https://github.com/apache/dubbo-go/issues/2137) | - | - |\r\n| 是否需要 code style 指南 | [#1755](https://github.com/apache/dubbo-go/issues/1755) | - | - |\r\n\r\n---\r\n\r\n## 🚀 Long-term Work\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------- |\r\n| 功能规划与思考 | [#2610](https://github.com/apache/dubbo-go/issues/2610) | - | - |",
"url": "https://github.com/apache/dubbo-go/discussions/3094",
"createdAt": "2025-11-30T13:11:40Z",
"updatedAt": "2026-02-13T02:16:21Z",
"closed": true,
"closedAt": "2026-02-13T02:16:21Z",
"isAnswered": null,
"author": {
"login": "Alanxtl"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 3110,
"title": "20251224 weekly",
"body": "# 🧭 Dubbo-go 社区周报\r\n\r\n| 项目 | 链接 |\r\n| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |\r\n| gost | [https://github.com/dubbogo/gost](https://github.com/dubbogo/gost) |\r\n| hessian2 | [https://github.com/apache/dubbo-go-hessian2](https://github.com/apache/dubbo-go-hessian2) |\r\n| pixiu | [https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions](https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions) |\r\n| pixiu-samples | [https://github.com/apache/dubbo-go-pixiu-samples](https://github.com/apache/dubbo-go-pixiu-samples) |\r\n| dubbogo-samples | [https://github.com/apache/dubbo-go-samples/issues](https://github.com/apache/dubbo-go-samples/issues) |\r\n\r\n---\r\n\r\n## 🧩 RPC Communication\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------------------------------------- | ------------------------------------------------------- | ---------------------- | --------------------------- |\r\n|[BUG] Router has been added to new api, need to test the user case | [#3042](https://github.com/apache/dubbo-go/issues/3103) | | - |\r\n|[提案] server/server.go中Serve优化 | [#3042](https://github.com/apache/dubbo-go/issues/3042) | junfa| 12-24: 待review |\r\n|[BUG] gost lint fail| [#3081](https://github.com/apache/dubbo-go/issues/3081) | yangzheng | 12-24: 继续跟进 |\r\n| API 易用性改进 | [#2326](https://github.com/apache/dubbo-go/issues/2326)| | 新 API 设计 |\r\n\r\n---\r\n\r\n## 🧱 Registry\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| -------------------------------------------------------- | ------------------------------------------------------- | ------- | -------------------------------------------------------------------- |\r\n| Support offline gracefully without registry notification | [#1977](https://github.com/apache/dubbo-go/issues/1977) | yingtao | 08-18: assign 11-30: 继续推进 |\r\n| fix: fix nacos deregister when receiving shutdown signal | [#3108](https://github.com/apache/dubbo-go/issues/3108) | xuetao| 12-24: 待review |\r\n\r\n---\r\n\r\n## ⚙️ Protocol\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ---------------------------------- | ------------------------------------------------------- | ----- | ------- |\r\n|[FEATURE] Implement Triple Client Pool | [#3087](https://github.com/apache/dubbo-go/issues/3087) | Aetherance| 12-24: 继续推进 |\r\n|[FEATURE] support CORS for Triple | [#3089](https://github.com/apache/dubbo-go/issues/3089) | zecheng| 12-24: 待review |\r\n| [Discuss] HTTP3 相关问题 | [#3030](https://github.com/apache/dubbo-go/issues/3030) | yuchen| 12-24: 已提pr,需要测试更多的场景 |\r\n| 删除 protocol/dubbo3 与 protocol/grpc | [#3093](https://github.com/apache/dubbo-go/issues/3093) | caicai | |\r\n| backupCodec 导致服务端序列化协议设置无效 | [#2875](https://github.com/apache/dubbo-go/issues/2875) | zecheng | 11-16: assign|\r\n| Support triple generic call | - | 清玉 | - |\r\n| dubbo-go-hessian 2 pr 处理 | [3078](https://github.com/apache/dubbo-go/issues/3078) | yangzheng | 12-24: 已经处理了,ci有问题|\r\n| [FEATURE] Enhanced HTTP/3 transport configuration options with support for core QUIC parameter settings | [3102](https://github.com/apache/dubbo-go/issues/3102) | caicai| 12-24: 先出个提案|\r\n\r\n---\r\n\r\n## ☸️ K8s\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| --------------------------- | ------------------------------------------------------- | --- | -------- |\r\n| 暴露 readiness 与 liveness API | [#2039](https://github.com/apache/dubbo-go/issues/2039) | - | - |\r\n\r\n---\r\n\r\n## 🧠 Memory Leak\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ----------------------------- | --------------------------------------------------------------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------- |\r\n| `common.URL`、内存与 goroutine 泄漏 | [#2683](https://github.com/apache/dubbo-go/issues/2683)、[#2678](https://github.com/apache/dubbo-go/issues/2678) | 吴歆帆、罗颖韬 | 参考讨论:[2750](https://github.com/apache/dubbo-go/discussions/2750)、[2764](https://github.com/apache/dubbo-go/discussions/2764),与歆帆沟通后推进 |\r\n\r\n---\r\n\r\n## 🔧 Tools\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| --------------------------- | ------------------------------------------------------- | ------ | ----------------------- |\r\n\r\n---\r\n\r\n## 🧪 Samples\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| -------------------------- | ----------------------------------------------------------------------------------- | ------------- | -------------------------------- |\r\n| 优化代码中的 `time.Sleep` 实现 | [#915](https://github.com/apache/dubbo-go-samples/issues/915) | zecheng | |\r\n| ChatClient & ChatModel 示例 | [#816](https://github.com/apache/dubbo-go-samples/issues/816) | - | - |\r\n| 应用级泛化调用(Go 调用 Java)报错 | [#772](https://github.com/apache/dubbo-go-samples/issues/772) | - | 10-26: 属于 config 问题,等待 config 更新 |\r\n\r\n---\r\n\r\n## 📖 Documentation\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------ | ------------------------------------------------------- | --- | ---- |\r\n| 文档结构优化设想 | [#2153](https://github.com/apache/dubbo-go/issues/2153) | - | - |\r\n| dubbo-go 文档完善 | [#2137](https://github.com/apache/dubbo-go/issues/2137) | - | - |\r\n| 是否需要 code style 指南 | [#1755](https://github.com/apache/dubbo-go/issues/1755) | - | - |\r\n\r\n---\r\n\r\n## 🚀 Long-term Work\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------- |\r\n| 功能规划与思考 | [#2610](https://github.com/apache/dubbo-go/issues/2610) | - | - |",
"url": "https://github.com/apache/dubbo-go/discussions/3110",
"createdAt": "2025-12-14T13:06:24Z",
"updatedAt": "2026-02-13T02:16:09Z",
"closed": true,
"closedAt": "2026-02-13T02:16:09Z",
"isAnswered": null,
"author": {
"login": "Alanxtl"
},
"category": {
"name": "General"
},
"answer": null,
"comments": [
{
"id": "DC_kwDOCJS8R84A6jyY",
"url": "https://github.com/apache/dubbo-go/discussions/3110#discussioncomment-15350936",
"body": "@hanxin\r\n1 跟 caicai 一块推进下 泛化调用 work",
"createdAt": "2025-12-27T08:34:47Z",
"updatedAt": "2025-12-27T08:34:47Z",
"author": {
"login": "AlexStocks"
},
"replies": [
{
"id": "DC_kwDOCJS8R84A6jz5",
"url": "https://github.com/apache/dubbo-go/discussions/3110#discussioncomment-15351033",
"body": "有待交出dubbo v3 泛化调用技术分析文档",
"createdAt": "2025-12-27T08:58:17Z",
"updatedAt": "2025-12-27T08:58:17Z",
"author": {
"login": "AlexStocks"
}
}
]
}
]
},
{
"number": 3111,
"title": "AI tools and prompt",
"body": "https://deepwiki.com/apache/dubbo-go\r\nhttps://zread.ai/apache/dubbo-go\r\n\r\n任务: \r\n1. 请review这个pr,发现潜在的bug \r\n3. 根据pr生成相关的技术文档,中英文各一份,请使用markdown格式 \r\n4. 3. 这里面的单测是否有不足,请补充相关的单测",
"url": "https://github.com/apache/dubbo-go/discussions/3111",
"createdAt": "2025-12-14T13:17:53Z",
"updatedAt": "2026-02-09T03:25:45Z",
"closed": true,
"closedAt": "2026-02-09T03:25:45Z",
"isAnswered": null,
"author": {
"login": "Alanxtl"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 3138,
"title": "Dubbo-go 3.3.1 Release doc 发版文档",
"body": "# 🚀 Apache Dubbo-go 3.3.1 Official Release\r\n\r\n## A Faster, Cleaner, and More Powerful Triple RPC Framework\r\n\r\n> **Brand-new Client API | Systematic Evolution of the Triple Protocol | Comprehensive Enhancements in Configuration & Governance**\r\n\r\n**Apache Dubbo-go 3.3.1** is now officially released 🎉\r\nThis is a **major enhancement release designed for production readiness and future architectural evolution**.\r\n\r\nRather than simply adding features, this release delivers a **systematic upgrade** across **API design, Triple protocol capabilities, and configuration & governance systems**, significantly improving:\r\n\r\n* Developer experience in both client-side and server-side\r\n* Protocol performance and extensibility\r\n* Production stability and observability\r\n\r\nAt the infrastructure level, a key milestone has also been reached:\r\n\r\n> ✅ **Dubbo-go now officially supports Go 1.24, fully aligned with the latest Go ecosystem**\r\n\r\n---\r\n\r\n## Dubbo-go 3.3.1 in One Sentence\r\n\r\n> **This is a pivotal release that moves Dubbo-go from “usable” to “pleasant to use, reliable in production, and sustainable for long-term evolution.”**\r\n\r\nDubbo-go 3.3.1 focuses on four core directions:\r\n\r\n* **A fully redesigned Client New API (the future main path)**\r\n Significantly improves client maintainability and extensibility\r\n @marsevilspirit\r\n\r\n* **Next-generation Triple protocol enhancements**\r\n From protocol implementation to high-performance, operable RPC infrastructure\r\n @marsevilspirit\r\n\r\n* **Upgraded configuration center, routing, and governance capabilities**\r\n More stable, more flexible, and better suited for complex production environments\r\n @1kasa @MinatoWu @FoghostCn\r\n\r\n---\r\n\r\n## 🔥 Highlight 1: Brand-New Client New API (Strongly Recommended)\r\n\r\n> **This is a “reboot-level” upgrade of Dubbo-go’s client capabilities.**\r\n\r\nDubbo-go 3.3.1 introduces a **brand-new Client New API**, redesigned around the **Option Pattern**.\r\nIt redefines client initialization and invocation models, laying a unified foundation for multi-protocol support, Triple evolution, and advanced features.\r\n\r\n### Why a New API?\r\n\r\n* ✅ **Clear and readable initialization flow**\r\n* ✅ **Explicit and controllable capability composition**\r\n* ✅ **Native support for Triple and multi-protocol scenarios**\r\n* ✅ **Easier testing and encapsulation**\r\n* ✅ **Aligned with Go community best practices**\r\n\r\n### Example (New API + Triple)\r\n\r\nSample source code:\r\n[https://github.com/apache/dubbo-go-samples/tree/main/async](https://github.com/apache/dubbo-go-samples/tree/main/async)\r\n\r\n```go\r\nfunc main() {\r\n cli, _ := client.NewClient(\r\n client.WithClientProtocolTriple(),\r\n client.WithClientURL(\"tri://127.0.0.1:20000\"),\r\n client.WithClientSerialization(constant.ProtobufSerialization),\r\n )\r\n\r\n userProvider, _ := user.NewUserProvider(cli, client.WithAsync())\r\n\r\n req := &user.SayHelloRequest{UserId: \"003\"}\r\n resp, _ := userProvider.SayHello(context.Background(), req)\r\n\r\n logger.Info(resp)\r\n}\r\n```\r\n\r\n> ✅ **The New API is the core foundation for future Dubbo-go evolution**\r\n> For all new projects and Triple-based scenarios, **strongly recommended**.\r\n\r\n---\r\n\r\n## 🚀 Highlight 2: Next-Generation Triple Protocol Leap\r\n\r\n> **Triple is evolving from a “protocol implementation” into a “high-performance RPC infrastructure.”**\r\n\r\nDubbo-go 3.3.1 introduces **cross-layer, systematic enhancements** to the Triple protocol:\r\n\r\n* **Parallel support for HTTP/2 and HTTP/3**\r\n* **Experimental HTTP/3 (QUIC) support**\r\n* **Redesigned Triple TLS API**\r\n* **Non-IDL Mode support (IDL-free services)**\r\n* **Triple Generic Calls**\r\n* **Stream-based Hessian decoding for large payloads and streaming**\r\n* **Triple service OpenAPI documentation generator**\r\n\r\nThese capabilities significantly improve Triple in terms of:\r\n\r\n* Lower network latency\r\n* Better resilience in weak or unstable networks\r\n* Improved engineering and operational friendliness\r\n\r\n### Example (Triple + HTTP/3)\r\n\r\nSample source code:\r\n[https://github.com/apache/dubbo-go-samples/tree/main/http3](https://github.com/apache/dubbo-go-samples/tree/main/http3)\r\n\r\n```go\r\n// server side\r\nfunc main() {\r\n\tlogger.SetLoggerLevel(\"debug\")\r\n\r\n\tsrv, err := server.NewServer(\r\n\t\tserver.WithServerProtocol(\r\n\t\t\tprotocol.WithPort(20000),\r\n\t\t\tprotocol.WithTriple(\r\n\t\t\t\ttriple.Http3Enable(),\r\n\t\t\t),\r\n\t\t),\r\n\t\tserver.WithServerTLSOption(\r\n\t\t\ttls.WithCertFile(\"../../x509/server2_cert.pem\"),\r\n\t\t\ttls.WithKeyFile(\"../../x509/server2_key_pkcs8.pem\"),\r\n\t\t\ttls.WithServerName(\"dubbogo.test.example.com\"),\r\n\t\t),\r\n\t)\r\n\tif err != nil {\r\n\t\tpanic(err)\r\n\t}\r\n\r\n\tif err := greet.RegisterGreetServiceHandler(srv, &GreetTripleServer{}); err != nil {\r\n\t\tpanic(err)\r\n\t}\r\n\r\n\tlogger.Info(\"Starting HTTP/3 enabled Dubbo-go server on port 20000...\")\r\n\tif err := srv.Serve(); err != nil {\r\n\t\tpanic(err)\r\n\t}\r\n}\r\n```\r\n\r\n```go\r\n// client side\r\nfunc main() {\r\n\tlogger.SetLoggerLevel(\"debug\")\r\n\r\n\tcli, err := client.NewClient(\r\n\t\tclient.WithClientURL(\"127.0.0.1:20000\"),\r\n\t\tclient.WithClientTLSOption(\r\n\t\t\ttls.WithCACertFile(\"../../x509/server_ca_cert.pem\"),\r\n\t\t\ttls.WithCertFile(\"../../x509/server2_cert.pem\"),\r\n\t\t\ttls.WithKeyFile(\"../../x509/server2_key_pkcs8.pem\"),\r\n\t\t\ttls.WithServerName(\"dubbogo.test.example.com\"),\r\n\t\t),\r\n\t\tclient.WithClientProtocol(\r\n\t\t\tprotocol.WithTriple(\r\n\t\t\t\ttriple.Http3Enable(),\r\n\t\t\t),\r\n\t\t),\r\n\t)\r\n\tif err != nil {\r\n\t\tpanic(err)\r\n\t}\r\n\r\n\tsvc, err := greet.NewGreetService(cli)\r\n\tif err != nil {\r\n\t\tpanic(err)\r\n\t}\r\n\r\n\tfor i := 0; i < 3; i++ {\r\n\t\tctx, cancel := context.WithTimeout(context.Background(), time.Second)\r\n\t\tresp, err := svc.Greet(ctx, &greet.GreetRequest{Name: \"Go Client\"})\r\n\t\tif err != nil {\r\n\t\t\tpanic(err)\r\n\t\t}\r\n\t\tlogger.Infof(\"Greet response: %s\", resp.Greeting)\r\n\t\tcancel()\r\n\t\ttime.Sleep(time.Second)\r\n\t}\r\n}\r\n```\r\n\r\n---\r\n\r\n## 🎯 Highlight 3: Configuration, Routing & Governance Upgrades\r\n\r\n> **Making Dubbo-go more stable and controllable in complex production environments.**\r\n\r\n### Key Enhancements\r\n\r\n* **New Apollo configuration center support**\r\n * Can serve as both configuration center and governance entry point\r\n * Supports namespace isolation and version management\r\n* **Hot configuration reload**\r\n* **Improved stability for Nacos / Zookeeper**\r\n * Registration and subscription reliability\r\n * Weight and routing consistency\r\n * Edge case fixes\r\n* **Enhanced interface precise matching**\r\n * Supports `group / version` wildcards\r\n* **Service metadata enhancements**\r\n * Supports injecting `dubbo.tag`\r\n* **Router API officially opened**\r\n* New `WithInterface` option added to client initialization\r\n\r\n### Apollo Configuration Center Example\r\n\r\nSample source code:\r\n[https://github.com/apache/dubbo-go-samples/tree/main/config_center/apollo](https://github.com/apache/dubbo-go-samples/tree/main/config_center/apollo)\r\n\r\n```go\r\nfunc main() {\r\n\tins, _ := dubbo.NewInstance(\r\n\t\tdubbo.WithConfigCenter(\r\n\t\t\tconfig_center.WithApollo(),\r\n\t\t\tconfig_center.WithAddress(apolloMetaAddress),\r\n\t\t\tconfig_center.WithNamespace(apolloNamespace),\r\n\t\t\tconfig_center.WithDataID(apolloNamespace),\r\n\t\t\tconfig_center.WithAppID(apolloAppID),\r\n\t\t\tconfig_center.WithCluster(apolloCluster),\r\n\t\t),\r\n\t)\r\n\r\n\tcli, _ := ins.NewClient()\r\n\tsvc, _ := greet.NewGreetService(cli)\r\n\r\n\tresp, _ := svc.Greet(context.Background(), &greet.GreetRequest{Name: \"Apollo\"})\r\n\tlogger.Infof(\"Greet response: %s\", resp)\r\n}\r\n```\r\n\r\n---\r\n\r\n## 📈 Performance · Stability · Observability Fully promote\r\n\r\n> **This is the confidence behind “safe upgrades in production.”**\r\n\r\n### Performance & Resource Governance\r\n\r\n* **Precompiled regular expressions**\r\n * **20–30% performance improvement** in routing and validation scenarios\r\n* **Streaming Hessian decoding**\r\n * Significantly reduces peak memory usage for large payloads\r\n * Ideal for file transfer, batch RPC, and IoT scenarios\r\n* **Weighted Round Robin fixes**\r\n * Fairer scheduling and lower latency in dynamic cluster environments\r\n\r\n### Stability & Engineering Quality\r\n\r\n* goroutine / file descriptor / cache leaks\r\n* Improved graceful shutdown using `errgroup`\r\n* Added shutdown timeout control for Triple servers\r\n* Multiple panic and edge case fixes\r\n* Enhanced service registration lifecycle logging\r\n\r\n### Observability\r\n\r\nDubbo-go 3.3.1 introduces comprehensive **OpenTelemetry upgrades**, supporting both tracing and metrics. These enhancements improve observability with fine-grained control and standards compliance, enabling seamless integration with tools like Jaeger and Prometheus.\r\n\r\n* **Dependency upgrade**: Migrated to OTel v1.21.0 for latest features, bug fixes, and deprecation handling\r\n* **Insecure mode support**: HTTP exporters without TLS for development or internal networks\r\n* **Scope alignment**: Tracing scopes adjusted to comply with OTel specifications\r\n* **Enhanced lifecycle logs**: Service registration, deregistration, and update logs for dynamic environments\r\n* **Timeout control**: Integrated with graceful shutdown for better trace handling during service termination\r\n\r\n---\r\n\r\n## ℹ️ Upgrade Notes\r\n\r\n* **Go version requirement: Go 1.24**\r\n* **HTTP/3 is an experimental feature**\r\n* Legacy APIs remain available, but **gradual migration to the New API is strongly recommended**\r\n\r\n---\r\n\r\n## 🙏 Community Contributors\r\n\r\nThanks to all community members who contributed to Dubbo-go 3.3.1 (alphabetical order) ❤️:\r\n\r\n@1kasa @97ZQ @ALSoryu @Akashisang @Alanxtl @AlexStocks @CAICAIIs\r\n@Flying-Tom @FoghostCn @KamToHung @MinatoWu @MrSibe\r\n@Nexusrex18 @No-SilverBullet @Rinai-R @Similarityoung @Snow-kal\r\n@WangzJi @Whitea029 @ayamzh @baerwang @dongjiang1989 @evanzhang87\r\n@flypiggyyoyoyo @hs80 @liushiqi1001 @manzhizhen @marsevilspirit\r\n@nanjiek @phpcyy @sebbASF @wqyenjoy @xuzhijvn @yumosx @yxrxy\r\n@zbchi @ziyyun\r\n\r\n---\r\n\r\n## 🚀 Get Started Now\r\n\r\n* **Project Repository**\r\n 👉 [https://github.com/apache/dubbo-go](https://github.com/apache/dubbo-go)\r\n\r\n* **Official Samples**\r\n 👉 [https://github.com/apache/dubbo-go-samples](https://github.com/apache/dubbo-go-samples)\r\n\r\n---\r\n\r\n## Final Words\r\n\r\nDubbo-go 3.3.1 is more than a feature release—it is a **clear upgrade in engineering capability and architectural direction**:\r\n\r\n* **New API**: Truly engineering-grade client design\r\n* **Triple**: Advancing toward next-generation high-performance RPC\r\n* **Configuration & Governance**: Greater confidence in production\r\n\r\n> **A cleaner API.\r\n> A stronger Triple.\r\n> Production-ready, future-oriented.**\r\n\r\n---\r\n\r\n# 🚀 Apache Dubbo-go 3.3.1 正式发布\r\n\r\n## A Faster, Cleaner, and More Powerful Triple RPC Framework\r\n\r\n> **全新 Client API|Triple 协议体系化进化|配置与治理能力全面增强**\r\n\r\n**Apache Dubbo-go 3.3.1** 现已正式发布 🎉\r\n这是一个 **面向生产环境、面向未来架构演进的重要增强版本**。\r\n\r\n本次版本并非简单的功能叠加,而是围绕 **API 设计、Triple 协议能力、配置与治理体系** 的一次系统性升级,显著提升了:\r\n\r\n* 客户端与服务端工程体验\r\n* 协议性能与可扩展性\r\n* 生产环境稳定性与可观测性\r\n\r\n同时,基础设施能力完成关键演进:\r\n\r\n> ✅ **Dubbo-go 正式支持 Go 1.24,全面对齐最新 Go 生态**\r\n\r\n---\r\n\r\n## 一句话看懂 Dubbo-go 3.3.1\r\n\r\n> **这是 Dubbo-go 从“能用”走向“好用、稳用、可长期演进”的一个关键版本。**\r\n\r\nDubbo-go 3.3.1 聚焦四个核心方向:\r\n\r\n* **全新设计的 Client New API(未来主路径)**\r\n 显著提升客户端可维护性与扩展能力\r\n @marsevilspirit\r\n\r\n* **下一代 Triple 协议能力体系化增强**\r\n 从协议实现走向高性能、可运营的 RPC 基础设施\r\n @marsevilspirit\r\n\r\n* **配置中心、路由与治理能力升级**\r\n 更稳定、更灵活,更适合复杂生产环境\r\n @1kasa @MinatoWu @FoghostCn\r\n\r\n---\r\n\r\n## 🔥 亮点一:全新 Client New API(强烈推荐)\r\n\r\n> **这是 Dubbo-go 客户端能力的一次“重启式升级”。**\r\n\r\nDubbo-go 3.3.1 引入 **全新 Client New API**,基于 **Option Pattern** 重新设计客户端初始化与调用模型,为后续多协议、Triple 与高级能力演进奠定统一基础。\r\n\r\n### 为什么需要 New API?\r\n\r\n* ✅ **初始化路径清晰可读**\r\n* ✅ **能力组合显式可控**\r\n* ✅ **天然支持 Triple 与多协议**\r\n* ✅ **更易测试、更易封装**\r\n* ✅ **符合 Go 社区工程实践**\r\n\r\n### 使用示例(New API + Triple)\r\n\r\n示例源码见: [https://github.com/apache/dubbo-go-samples/tree/main/async](https://github.com/apache/dubbo-go-samples/tree/main/async)\r\n\r\n```go\r\nfunc main() {\r\n cli, _ := client.NewClient(\r\n client.WithClientProtocolTriple(),\r\n client.WithClientURL(\"tri://127.0.0.1:20000\"),\r\n client.WithClientSerialization(constant.ProtobufSerialization),\r\n )\r\n\r\n userProvider, _ := user.NewUserProvider(cli, client.WithAsync())\r\n\r\n req := &user.SayHelloRequest{UserId: \"003\"}\r\n resp, _ := userProvider.SayHello(context.Background(), req)\r\n\r\n logger.Info(resp)\r\n}\r\n```\r\n\r\n> ✅ **New API 是 Dubbo-go 后续能力演进的核心基础**\r\n> 所有新项目与 Triple 场景,**强烈推荐优先使用**。\r\n\r\n---\r\n\r\n## 🚀 亮点二:下一代 Triple 协议能力跃迁\r\n\r\n> **Triple 正在从“协议实现”升级为“高性能 RPC 基础设施”。**\r\n\r\nDubbo-go 3.3.1 对 Triple 协议进行了 **跨层级、体系化增强**:\r\n\r\n* **HTTP/2 与 HTTP/3 并行支持**\r\n* **实验性 HTTP/3(QUIC)能力**\r\n* **全新 Triple TLS API 设计**\r\n* **支持 Non-IDL Mode(无 IDL 服务)**\r\n* **Triple 泛化调用(Generic Call)**\r\n* **Stream Hessian 解码,优化大包与流式场景**\r\n* **Triple 服务 OpenAPI 文档生成工具**\r\n\r\n这些能力使 Triple 在以下方面显著增强:\r\n\r\n* 更低网络延迟\r\n* 更强弱网适应能力\r\n* 更好的工程与运维友好度\r\n\r\n### 使用示例(Triple + HTTP/3)\r\n\r\n示例源码见: [https://github.com/apache/dubbo-go-samples/tree/main/http3](https://github.com/apache/dubbo-go-samples/tree/main/http3)\r\n\r\n```go\r\n// server side\r\nfunc main() {\r\n\tlogger.SetLoggerLevel(\"debug\")\r\n\r\n\tsrv, err := server.NewServer(\r\n\t\tserver.WithServerProtocol(\r\n\t\t\tprotocol.WithPort(20000),\r\n\t\t\tprotocol.WithTriple(\r\n\t\t\t\ttriple.Http3Enable(),\r\n\t\t\t),\r\n\t\t),\r\n\t\tserver.WithServerTLSOption(\r\n\t\t\ttls.WithCertFile(\"../../x509/server2_cert.pem\"),\r\n\t\t\ttls.WithKeyFile(\"../../x509/server2_key_pkcs8.pem\"),\r\n\t\t\ttls.WithServerName(\"dubbogo.test.example.com\"),\r\n\t\t),\r\n\t)\r\n\tif err != nil {\r\n\t\tpanic(err)\r\n\t}\r\n\r\n\tif err := greet.RegisterGreetServiceHandler(srv, &GreetTripleServer{}); err != nil {\r\n\t\tpanic(err)\r\n\t}\r\n\r\n\tlogger.Info(\"Starting HTTP/3 enabled Dubbo-go server on port 20000...\")\r\n\tif err := srv.Serve(); err != nil {\r\n\t\tpanic(err)\r\n\t}\r\n}\r\n```\r\n\r\n```go\r\n// client side\r\nfunc main() {\r\n\tlogger.SetLoggerLevel(\"debug\")\r\n\r\n\tcli, err := client.NewClient(\r\n\t\tclient.WithClientURL(\"127.0.0.1:20000\"),\r\n\t\tclient.WithClientTLSOption(\r\n\t\t\ttls.WithCACertFile(\"../../x509/server_ca_cert.pem\"),\r\n\t\t\ttls.WithCertFile(\"../../x509/server2_cert.pem\"),\r\n\t\t\ttls.WithKeyFile(\"../../x509/server2_key_pkcs8.pem\"),\r\n\t\t\ttls.WithServerName(\"dubbogo.test.example.com\"),\r\n\t\t),\r\n\t\tclient.WithClientProtocol(\r\n\t\t\tprotocol.WithTriple(\r\n\t\t\t\ttriple.Http3Enable(),\r\n\t\t\t),\r\n\t\t),\r\n\t)\r\n\tif err != nil {\r\n\t\tpanic(err)\r\n\t}\r\n\r\n\tsvc, err := greet.NewGreetService(cli)\r\n\tif err != nil {\r\n\t\tpanic(err)\r\n\t}\r\n\r\n\tfor i := 0; i < 3; i++ {\r\n\t\tctx, cancel := context.WithTimeout(context.Background(), time.Second)\r\n\t\tresp, err := svc.Greet(ctx, &greet.GreetRequest{Name: \"Go Client\"})\r\n\t\tif err != nil {\r\n\t\t\tpanic(err)\r\n\t\t}\r\n\t\tlogger.Infof(\"Greet response: %s\", resp.Greeting)\r\n\t\tcancel()\r\n\t\ttime.Sleep(time.Second)\r\n\t}\r\n}\r\n```\r\n\r\n---\r\n\r\n## 🎯 亮点三:配置、路由与治理能力升级\r\n\r\n> **让 Dubbo-go 在复杂生产环境中更稳、更可控。**\r\n\r\n### 核心增强\r\n\r\n* **新增 Apollo 配置中心支持**\r\n * 可作为配置中心与治理入口\r\n * 支持命名空间隔离、版本管理\r\n* **配置热更新(Hot Reload)**\r\n* **Nacos / Zookeeper 稳定性增强**\r\n * 注册与订阅可靠性\r\n * 权重与路由一致性\r\n * 边界条件修复\r\n* **接口精确匹配增强**\r\n * 支持 `group / version` 通配符\r\n* **服务元数据增强**\r\n * 支持注入 `dubbo.tag`\r\n* **Router API 正式对外开放**\r\n* Client 初始化新增 `WithInterface` 选项\r\n\r\n### Apollo 配置中心示例\r\n\r\n示例源码见: [https://github.com/apache/dubbo-go-samples/tree/main/config_center/apollo](https://github.com/apache/dubbo-go-samples/tree/main/config_center/apollo)\r\n\r\n```go\r\nfunc main() {\r\n\tins, _ := dubbo.NewInstance(\r\n\t\tdubbo.WithConfigCenter(\r\n\t\t\tconfig_center.WithApollo(),\r\n\t\t\tconfig_center.WithAddress(apolloMetaAddress),\r\n\t\t\tconfig_center.WithNamespace(apolloNamespace),\r\n\t\t\tconfig_center.WithDataID(apolloNamespace),\r\n\t\t\tconfig_center.WithAppID(apolloAppID),\r\n\t\t\tconfig_center.WithCluster(apolloCluster),\r\n\t\t),\r\n\t)\r\n\r\n\tcli, _ := ins.NewClient()\r\n\tsvc, _ := greet.NewGreetService(cli)\r\n\r\n\tresp, _ := svc.Greet(context.Background(), &greet.GreetRequest{Name: \"Apollo\"})\r\n\tlogger.Infof(\"Greet response: %s\", resp)\r\n}\r\n```\r\n\r\n---\r\n\r\n## 📈 性能 · 稳定性 · 可观测性全面提升\r\n\r\n> **这是“敢在生产环境放心升级”的底气所在。**\r\n\r\n### 性能与资源治理\r\n\r\n* **正则表达式预编译**\r\n * 路由与校验场景性能提升 **20–30%**\r\n* **Hessian 流式解码**\r\n * 显著降低大包场景峰值内存\r\n * 适合文件传输、批量 RPC、IoT 场景\r\n* **Weighted RoundRobin 修复**\r\n * 动态集群环境下更公平、更低延迟\r\n\r\n### 稳定性与工程质量\r\n\r\n* goroutine / 文件句柄 / 缓存泄漏治理\r\n* 使用 `errgroup` 改进优雅停机\r\n* Triple Server 新增停机超时控制\r\n* 多项 panic 与边界条件修复\r\n* 服务注册生命周期日志增强\r\n\r\n### 可观测性\r\n\r\nDubbo-go 3.3.1 引入 OpenTelemetry 全面升级,支持追踪与指标。这一功能增强了可观测性,提供细粒度控制与标准合规,便于与 Jaeger 或 Prometheus 等工具集成。\r\n\r\n* **依赖升级**:移至 OTel v1.21.0,支持最新特性、bug 修复与弃用处理,确保长期兼容性。\r\n* **非安全模式**:支持无 TLS 的 HTTP 导出器,适用于开发或内部网络的灵活配置。\r\n* **作用域对齐**:调整追踪作用域符合 OTel 规范,提升与其他可观测工具的互操作性。\r\n* **增强日志**:添加服务注册、注销与更新的生命周期日志,有助于动态环境调试。\r\n* **超时控制**:与优雅关闭集成,更好处理服务终止时的追踪。\r\n\r\n---\r\n\r\n## ℹ️ 升级说明\r\n\r\n* **Go 版本要求:Go 1.24**\r\n* **HTTP/3 为实验特性**\r\n* 旧 API 仍可使用,但 **建议逐步迁移至 New API**\r\n\r\n---\r\n\r\n## 🙏 致谢社区贡献者\r\n\r\n感谢所有参与 Dubbo-go 3.3.1 建设的社区成员(按字典序)❤️:\r\n\r\n@1kasa @97ZQ @ALSoryu @Akashisang @Alanxtl @AlexStocks @CAICAIIs\r\n@Flying-Tom @FoghostCn @KamToHung @MinatoWu @MrSibe\r\n@Nexusrex18 @No-SilverBullet @Rinai-R @Similarityoung @Snow-kal\r\n@WangzJi @Whitea029 @ayamzh @baerwang @dongjiang1989 @evanzhang87\r\n@flypiggyyoyoyo @hs80 @liushiqi1001 @manzhizhen @marsevilspirit\r\n@nanjiek @phpcyy @sebbASF @wqyenjoy @xuzhijvn @yumosx @yxrxy\r\n@zbchi @ziyyun\r\n\r\n---\r\n\r\n## 🚀 立即体验\r\n\r\n* **项目地址**\r\n 👉 [https://github.com/apache/dubbo-go](https://github.com/apache/dubbo-go)\r\n\r\n* **官方示例**\r\n 👉 [https://github.com/apache/dubbo-go-samples](https://github.com/apache/dubbo-go-samples)\r\n\r\n---\r\n\r\n## Final Words\r\n\r\nDubbo-go 3.3.1 不只是一次功能发布,而是一次 **工程能力与架构方向的明确升级**:\r\n\r\n* **New API**:让客户端真正工程化\r\n* **Triple**:迈向下一代高性能 RPC\r\n* **配置与治理**:让生产环境更安心\r\n\r\n> **A cleaner API.\r\n> A stronger Triple.\r\n> Production-ready, future-oriented.**\r\n",
"url": "https://github.com/apache/dubbo-go/discussions/3138",
"createdAt": "2025-12-22T08:33:02Z",
"updatedAt": "2025-12-22T09:57:52Z",
"closed": false,
"closedAt": null,
"isAnswered": null,
"author": {
"login": "Alanxtl"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 3168,
"title": "2026-01-18 weekly",
"body": "\r\n\r\n# 🧭 Dubbo-go 社区周报\r\n\r\n| 项目 | 链接 |\r\n| --------------- | ------------------------------------------------------------ |\r\n| gost | https://github.com/dubbogo/gost |\r\n| hessian2 | https://github.com/apache/dubbo-go-hessian2 |\r\n| pixiu | https://github.com/dubbo-go-pixiu/dubbo-go-pixiu.github.io/discussions |\r\n| pixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples |\r\n| dubbogo-samples | https://github.com/apache/dubbo-go-samples/issues |\r\n\r\n------\r\n\r\n## 🧩 RPC Communication\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------------------------------------------------ | ------------------------------------------------------- | ----------- | --------------- |\r\n| [BUG] Router has been added to new api, need to test the user case | [#3042](https://github.com/apache/dubbo-go/issues/3103) | jiale | 01-18:跟进 |\r\n| [提案] server/server.go中Serve优化 | [#3042](https://github.com/apache/dubbo-go/issues/3042) | junfa | 12-24: 待review |\r\n| [BUG] gost lint fail | [#3081](https://github.com/apache/dubbo-go/issues/3081) | Caoyaolei | 01-18: 跟进 |\r\n| API 易用性改进 | [#2326](https://github.com/apache/dubbo-go/issues/2326) | | 新 API 设计 |\r\n| [讨论] Go 与 Java 互通时方法名大小写敏感性问题 | [#3162](https://github.com/apache/dubbo-go/issues/3162) | | |\r\n\r\n------\r\n\r\n## 🧱 Registry\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| -------------------------------------------------------- | ------------------------------------------------------- | -------------- | ----------------------------------- |\r\n| Support offline gracefully without registry notification | [#1977](https://github.com/apache/dubbo-go/issues/1977) | Yingtao,hanxin | 08-18: assign
11-30: 继续推进 |\r\n\r\n------\r\n\r\n## ⚙️ Protocol\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------------------------------------------------ | ------------------------------------------------------- | ----------------------- | ------------------------------------------ |\r\n| [FEATURE] Implement Triple Client Pool | [#3087](https://github.com/apache/dubbo-go/issues/3087) | Aetherance | 12-24: 继续推进
等待泽亚review |\r\n| [FEATURE] support CORS for Triple | [#3089](https://github.com/apache/dubbo-go/issues/3089) | zecheng | 12-24: 待review
01-18: 等待泽亚review |\r\n| [Discuss] HTTP3 相关问题 | [#3030](https://github.com/apache/dubbo-go/issues/3030) | yuchen | 12-24: 已提pr,需要测试更多的场景 |\r\n| 删除 protocol/dubbo3 与 protocol/grpc | [#3093](https://github.com/apache/dubbo-go/issues/3093) | caicai | 01-18: 暂时不能删除 |\r\n| backupCodec 导致服务端序列化协议设置无效 | [#2875](https://github.com/apache/dubbo-go/issues/2875) | zecheng | 11-16: assign
继续推进 |\r\n| Support triple generic call | [#3167](https://github.com/apache/dubbo-go/issues/3167) | hanxin,caicai,yongjia | 01-18: 继续完善 |\r\n| dubbo-go-hessian 2 pr 处理 | [#3078](https://github.com/apache/dubbo-go/issues/3078) | yangzheng | 12-24: 已经处理了,ci有问题 |\r\n| [FEATURE] Enhanced HTTP/3 transport configuration options with support for core QUIC parameter settings | [#3102](https://github.com/apache/dubbo-go/issues/3102) | caicai | 12-24: 先出个提案
01-18: 继续推进 |\r\n| [FEATURE] Introduce Router Cache to Enhance Routing Performance | [#3166](https://github.com/apache/dubbo-go/issues/3166) | | |\r\n| [BUG] triple 协议发生 connection timeout 时设置的超时时间无效 | [#3161](https://github.com/apache/dubbo-go/issues/3161) | Chengangyang | |\r\n| [BUG] dubbo-go 的 common.URL.Clone() 方法有并发问题,会导致程序崩溃 | [#3159](https://github.com/apache/dubbo-go/issues/3159) | Chengangyang | |\r\n| [BUG] http调用忽略不存在的参数 | [#3157](https://github.com/apache/dubbo-go/issues/3157) | Caicai | |\r\n| [BUG] 多次重新构建ReferenceConfig 会发生panic | [#3153](https://github.com/apache/dubbo-go/issues/3153) | guodong | |\r\n\r\n\r\n------\r\n\r\n## ☸️ K8s\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------------------ | ------------------------------------------------------- | ------ | -------- |\r\n| 暴露 readiness 与 liveness API | [#2039](https://github.com/apache/dubbo-go/issues/2039) | - | - |\r\n\r\n------\r\n\r\n## 🧠 Memory Leak\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ----------------------------------- | ------------------------------------------------------------ | -------------- | ------------------------------------------------------------ |\r\n\r\n\r\n------\r\n\r\n## 🔧 Tools\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ---- | -------- | ------ | -------- |\r\n| | | | |\r\n\r\n------\r\n\r\n## 🔧 Gost\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------- | -------------------------------------------------- | --------- | -------- |\r\n| golangci-lint issue | [#137](https://github.com/dubbogo/gost/issues/137) | Caoyaolei | |\r\n\r\n------\r\n\r\n## 🧪 Samples\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ---------------------------------- | ------------------------------------------------------------ | ------- | ----------------------------------------- |\r\n| 优化代码中的 `time.Sleep` 实现 | [#915](https://github.com/apache/dubbo-go-samples/issues/915) | zecheng | |\r\n| ChatClient & ChatModel 示例 | [#816](https://github.com/apache/dubbo-go-samples/issues/816) | - | - |\r\n| 应用级泛化调用(Go 调用 Java)报错 | [#772](https://github.com/apache/dubbo-go-samples/issues/772) | - | 10-26: 属于 config 问题,等待 config 更新 |\r\n\r\n------\r\n\r\n## 📖 Documentation\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------------ | ------------------------------------------------------- | ------ | -------- |\r\n| 文档结构优化设想 | [#2153](https://github.com/apache/dubbo-go/issues/2153) | - | - |\r\n| dubbo-go 文档完善 | [#2137](https://github.com/apache/dubbo-go/issues/2137) | - | - |\r\n| 是否需要 code style 指南 | [#1755](https://github.com/apache/dubbo-go/issues/1755) | - | - |\r\n\r\n------\r\n\r\n## 🚀 Long-term Work\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| -------------- | ------------------------------------------------------- | ------ | -------- |\r\n| 功能规划与思考 | [#2610](https://github.com/apache/dubbo-go/issues/2610) | - | - |",
"url": "https://github.com/apache/dubbo-go/discussions/3168",
"createdAt": "2026-01-18T14:05:48Z",
"updatedAt": "2026-03-16T12:28:52Z",
"closed": true,
"closedAt": "2026-03-16T12:28:52Z",
"isAnswered": null,
"author": {
"login": "Similarityoung"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 3226,
"title": "20260301 weekly",
"body": "# 🧭 Dubbo-go 社区周报\r\n\r\n| 项目 | 链接 |\r\n| --------------- | ------------------------------------------------------------ |\r\n| gost | https://github.com/dubbogo/gost |\r\n| hessian2 | https://github.com/apache/dubbo-go-hessian2 |\r\n| pixiu | https://github.com/apache/dubbo-go-pixiu/ |\r\n| pixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples |\r\n| dubbogo-samples | https://github.com/apache/dubbo-go-samples/issues |\r\n\r\n------\r\n\r\n## 🧩 RPC Communication\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------------------------------------------------ | ------------------------------------------------------- | ----------- | --------------- |\r\n| [BUG] Router has been added to new api, need to test the user case | [#3042](https://github.com/apache/dubbo-go/issues/3103) | jiale | 01-18:跟进 |\r\n| [提案] server/server.go中Serve优化 | [#3042](https://github.com/apache/dubbo-go/issues/3042) | junfa | 12-24: 待review |\r\n| API 易用性改进 | [#2326](https://github.com/apache/dubbo-go/issues/2326) | | 新 API 设计 |\r\n| [讨论] Go 与 Java 互通时方法名大小写敏感性问题 | [#3162](https://github.com/apache/dubbo-go/issues/3162) | | |\r\n\r\n------\r\n\r\n## 🧱 Registry\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ---------------- | ----------------------- | -------------- | ----------------------------------- |\r\n| Support offline gracefully without registry notification | [#1977](https://github.com/apache/dubbo-go/issues/1977) | Yingtao,hanxin | 08-18: assign
11-30: 继续推进
03-01: 已实现 [#3235](https://github.com/apache/dubbo-go/pull/3235) 需要review |\r\n\r\n------\r\n\r\n## ⚙️ Protocol\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------- | ------------------- | ----------------- | ----------------- |\r\n| [Discuss] HTTP3 相关问题 | [#3030](https://github.com/apache/dubbo-go/issues/3030) | yuchen | 12-24: 已提pr,需要测试更多的场景 |\r\n| 删除 protocol/dubbo3 与 protocol/grpc | [#3093](https://github.com/apache/dubbo-go/issues/3093) | caicai | 01-18: 暂时不能删除 |\r\n| dubbo-go-hessian 2 pr 处理 | [#3078](https://github.com/apache/dubbo-go/issues/3078) | yangzheng | 12-24: 已经处理了,ci有问题 |\r\n| [FEATURE] Enhanced HTTP/3 transport configuration options with support for core QUIC parameter settings | [#3102](https://github.com/apache/dubbo-go/issues/3102) | caicai | 12-24: 先出个提案
01-18: 继续推进 |\r\n| [FEATURE] Introduce Router Cache to Enhance Routing Performance | [#3166](https://github.com/apache/dubbo-go/issues/3166) | | | | |\r\n\r\n\r\n------\r\n\r\n## ☸️ K8s\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------------------ | ------------------------------------------------------- | ------ | -------- |\r\n| 暴露 readiness 与 liveness API | [#2039](https://github.com/apache/dubbo-go/issues/2039) |xuetao | 03-01: 已实现 [#3213](https://github.com/apache/dubbo-go/pull/3213) 需要review |\r\n\r\n------\r\n\r\n## 🧠 Memory Leak\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ----------------------------------- | ------------------------------------------------------------ | -------------- | ------------------------------------------------------------ |\r\n\r\n\r\n------\r\n\r\n## 🔧 Tools\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ---- | -------- | ------ | -------- |\r\n| | | | |\r\n\r\n------\r\n\r\n## 🔧 Gost\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------- | -------------------------------------------------- | --------- | -------- |\r\n| | | | |\r\n\r\n------\r\n\r\n## 🧪 Samples\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------------ | ------------------------------------------------------- | ------ | -------- |\r\n| ChatClient & ChatModel 示例 | [#816](https://github.com/apache/dubbo-go-samples/issues/816) | - | - |\r\n| 应用级泛化调用(Go 调用 Java)报错 | [#772](https://github.com/apache/dubbo-go-samples/issues/772) | - | 10-26: 属于 config 问题,等待 config 更新 |\r\n\r\n------\r\n\r\n## 📖 Documentation\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------------ | ------------------------------------------------------- | ------ | -------- |\r\n| 是否需要 code style 指南 | [#1755](https://github.com/apache/dubbo-go/issues/1755) | - | - |\r\n\r\n------\r\n\r\n## 🚀 Long-term Work\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| -------------- | ------------------------------------------------------- | ------ | -------- |\r\n| 功能规划与思考 | [#2610](https://github.com/apache/dubbo-go/issues/2610) | - | - |",
"url": "https://github.com/apache/dubbo-go/discussions/3226",
"createdAt": "2026-03-01T12:08:44Z",
"updatedAt": "2026-03-16T12:28:47Z",
"closed": true,
"closedAt": "2026-03-16T12:28:47Z",
"isAnswered": null,
"author": {
"login": "AlexStocks"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 3254,
"title": "2026-03-16 Weekly",
"body": "# 🧭 Dubbo-go 社区周报\r\n\r\n| 项目 | 链接 |\r\n| --------------- | ------------------------------------------------------------ |\r\n| gost | https://github.com/dubbogo/gost |\r\n| hessian2 | https://github.com/apache/dubbo-go-hessian2 |\r\n| pixiu | https://github.com/apache/dubbo-go-pixiu/ |\r\n| pixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples |\r\n| dubbogo-samples | https://github.com/apache/dubbo-go-samples/issues |\r\n\r\n------\r\n\r\n## 🧩 RPC Communication\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------------------------------------------------ | ------------------------------------------------------- | ----------- | --------------- |\r\n| [提案] server/server.go中Serve优化 | [#3042](https://github.com/apache/dubbo-go/issues/3042) | junfa | 12-24: 待review |\r\n| API 易用性改进 | [#2326](https://github.com/apache/dubbo-go/issues/2326) | zecheng| 新 API 设计,已经迁了一部分 |\r\n| [讨论] Go 与 Java 互通时方法名大小写敏感性问题 | [#3162](https://github.com/apache/dubbo-go/issues/3162) | chengqian| 20260316 chengqian owned |\r\n| tag router bug | https://github.com/apache/dubbo-go/issues/3250 | jiale | 已提PR 待review\r\n| otel trace错乱 | https://github.com/apache/dubbo-go/issues/3240 | sirui | 待config后跟进\r\n------\r\n\r\n## 🧱 Registry\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ---------------- | ----------------------- | -------------- | ----------------------------------- |\r\n| Support offline gracefully without registry notification | [#1977](https://github.com/apache/dubbo-go/issues/1977) | Yingtao,hanxin | 08-18: assign
11-30: 继续推进
03-01: 已实现 [#3235](https://github.com/apache/dubbo-go/pull/3235) 需要review |\r\n\r\n------\r\n\r\n## ⚙️ Protocol\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------- | ------------------- | ----------------- | ----------------- |\r\n| 删除 protocol/dubbo3 与 protocol/grpc | [#3093](https://github.com/apache/dubbo-go/issues/3093) | caicai | 01-18: 暂时不能删除 |\r\n| dubbo-go-hessian 2 pr 处理 | [#3078](https://github.com/apache/dubbo-go/issues/3078) | yangzheng | 12-24: 已经处理了,ci有问题 |\r\n| [FEATURE] Enhanced HTTP/3 transport configuration options with support for core QUIC parameter settings | [#3102](https://github.com/apache/dubbo-go/issues/3102) | caicai | 12-24: 先出个提案
01-18: 继续推进 |\r\n| [FEATURE] Introduce Router Cache to Enhance Routing Performance | [#3166](https://github.com/apache/dubbo-go/issues/3166) | | | | |\r\n\r\n-----\r\n## Config\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ----------------------------------- | ------------------------------------------------------------ | -------------- | ------------------------------------------------------------ |\r\n| 在grpc和dubbo3中排掉config | https://github.com/apache/dubbo-go/pull/3231 | yongjia | 待review | - |\r\n| 在client中排掉config | https://github.com/apache/dubbo-go/pull/3232 | sirui | 待review | - |\r\n| config 集成测试 | https://github.com/apache/dubbo-go/issues/3255 | - | 待拆任务 | - |\r\n------\r\n## Scanned Issues by AI\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ----------------------------------- | ------------------------------------------------------------ | -------------- | ------------------------------------------------------------ |\r\n| common.URL改造 | https://github.com/apache/dubbo-go/issues/3248 https://github.com/apache/dubbo-go/issues/3246| - | - |\r\n| 全局map 改造|https://github.com/apache/dubbo-go/issues/3247 | https://github.com/xxs588 | - | - |\r\n------\r\n## 🧠 Memory Leak\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ----------------------------------- | ------------------------------------------------------------ | -------------- | ------------------------------------------------------------ |\r\n\r\n\r\n------\r\n\r\n## 🔧 Tools\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ---- | -------- | ------ | -------- |\r\n| 三方包升级 | https://github.com/apache/dubbo-go/issues/3243 | | pr https://github.com/apache/dubbo-go/pull/3245 待review |\r\n\r\n------\r\n\r\n## 🔧 Gost\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------- | -------------------------------------------------- | --------- | -------- |\r\n| | | | |\r\n\r\n------\r\n\r\n## 🧪 Samples\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------------ | ------------------------------------------------------- | ------ | -------- |\r\n| ChatClient & ChatModel 示例 | [#816](https://github.com/apache/dubbo-go-samples/issues/816) | - | - |\r\n| 应用级泛化调用(Go 调用 Java)报错 | [#772](https://github.com/apache/dubbo-go-samples/issues/772) | - | 10-26: 属于 config 问题,等待 config 更新 |\r\n| 集成测试go->go不通| https://github.com/apache/dubbo-go/issues/3241 | https://github.com/Rynzie02 | 20260316 进行中\r\n| k8s probe | https://github.com/apache/dubbo-go-samples/pull/1033| xuetao | 20260316 ci有问题\r\n------\r\n\r\n## 📖 Documentation\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------------ | ------------------------------------------------------- | ------ | -------- |\r\n| 是否需要 code style 指南 | [#1755](https://github.com/apache/dubbo-go/issues/1755) | - | - |\r\n\r\n------\r\n\r\n## 🚀 Long-term Work\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| -------------- | ------------------------------------------------------- | ------ | -------- |\r\n| 功能规划与思考 | [#2610](https://github.com/apache/dubbo-go/issues/2610) | - | - |",
"url": "https://github.com/apache/dubbo-go/discussions/3254",
"createdAt": "2026-03-15T13:00:03Z",
"updatedAt": "2026-04-13T04:09:31Z",
"closed": true,
"closedAt": "2026-04-13T04:09:31Z",
"isAnswered": null,
"author": {
"login": "robocanic"
},
"category": {
"name": "General"
},
"answer": null,
"comments": [
{
"id": "DC_kwDOCJS8R84A-BMf",
"url": "https://github.com/apache/dubbo-go/discussions/3254#discussioncomment-16257823",
"body": "https://github.com/apache/dubbo-go-samples/issues/1057",
"createdAt": "2026-03-22T13:43:45Z",
"updatedAt": "2026-03-22T13:43:45Z",
"author": {
"login": "Rynzie02"
},
"replies": []
},
{
"id": "DC_kwDOCJS8R84A-BMn",
"url": "https://github.com/apache/dubbo-go/discussions/3254#discussioncomment-16257831",
"body": "https://github.com/apache/dubbo-go/issues/3276",
"createdAt": "2026-03-22T13:44:52Z",
"updatedAt": "2026-03-22T13:44:52Z",
"author": {
"login": "Rynzie02"
},
"replies": []
},
{
"id": "DC_kwDOCJS8R84A-BNM",
"url": "https://github.com/apache/dubbo-go/discussions/3254#discussioncomment-16257868",
"body": "metadata @caicai @shibin",
"createdAt": "2026-03-22T13:53:10Z",
"updatedAt": "2026-03-22T13:53:10Z",
"author": {
"login": "Rynzie02"
},
"replies": []
}
]
},
{
"number": 3291,
"title": "2026-04-12 Weekly",
"body": "# 🧭 Dubbo-go 社区周报\r\n\r\n| 项目 | 链接 |\r\n| --------------- | ------------------------------------------------------------ |\r\n| gost | https://github.com/dubbogo/gost |\r\n| hessian2 | https://github.com/apache/dubbo-go-hessian2 |\r\n| pixiu | https://github.com/apache/dubbo-go-pixiu/ |\r\n| pixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples |\r\n| dubbogo-samples | https://github.com/apache/dubbo-go-samples/issues |\r\n\r\n------\r\n\r\n## 🧩 RPC Communication\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------------------------------------------------ | ------------------------------------------------------- | ----------- | --------------- |\r\n| [提案] server/server.go中Serve优化 | [#3042](https://github.com/apache/dubbo-go/issues/3042) | junfa | 04-12: 待提交新pr |\r\n| API 易用性改进 | [#2326](https://github.com/apache/dubbo-go/issues/2326) | zecheng| 新 API 设计,已经迁了一部分 |\r\n| otel trace错乱 | https://github.com/apache/dubbo-go/issues/3240 | sirui | 待config后跟进 04-12: 待提交pr\r\n------\r\n\r\n## 🧱 Registry\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ---------------- | ----------------------- | -------------- | ----------------------------------- |\r\n\r\n\r\n------\r\n\r\n## ⚙️ Protocol\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------- | ------------------- | ----------------- | ----------------- |\r\n| 删除 protocol/dubbo3 与 protocol/grpc | [#3093](https://github.com/apache/dubbo-go/issues/3093) | caicai | 01-18: 暂时不能删除 |\r\n| dubbo-go-hessian 2 pr 处理 | [#3078](https://github.com/apache/dubbo-go/issues/3078) | chengqian | 04-12: 已经修了一个 还有另一个pr |\r\n| [FEATURE] Enhanced HTTP/3 transport configuration options with support for core QUIC parameter settings | [#3102](https://github.com/apache/dubbo-go/issues/3102) | caicai | 12-24: 先出个提案
01-18: 继续推进 |\r\n| [FEATURE] Introduce Router Cache to Enhance Routing Performance | [#3166](https://github.com/apache/dubbo-go/issues/3166) | jiale | | | |\r\n\r\n-----\r\n## Config\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ----------------------------------- | ------------------------------------------------------------ | -------------- | ------------------------------------------------------------ |\r\n| config 集成测试 | https://github.com/apache/dubbo-go/issues/3255 | sirui | 04-12: 就差最后的测试了 | - |\r\n------\r\n## Scanned Issues by AI\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ----------------------------------- | ------------------------------------------------------------ | -------------- | ------------------------------------------------------------ |\r\n| common.URL改造 | https://github.com/apache/dubbo-go/issues/3248 https://github.com/apache/dubbo-go/issues/3246 | jintao | 已有pr: https://github.com/apache/dubbo-go/pull/3282 |\r\n| 全局map 改造|https://github.com/apache/dubbo-go/issues/3247 | https://github.com/xxs588 | - | - |\r\n| [提案] 使 dubbo-go 对 AI 编程工具更加友好|https://github.com/apache/dubbo-go/issues/3276 | shibin | - | - |\r\n------\r\n## 🧠 Memory Leak\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ----------------------------------- | ------------------------------------------------------------ | -------------- | ------------------------------------------------------------ |\r\n\r\n\r\n------\r\n\r\n## 🔧 Tools\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ---- | -------- | ------ | -------- |\r\n| 三方包升级 | https://github.com/apache/dubbo-go/issues/3243 | | pr https://github.com/apache/dubbo-go/pull/3245 待review |\r\n\r\n------\r\n\r\n## 🔧 Gost\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------- | -------------------------------------------------- | --------- | -------- |\r\n| | | | |\r\n\r\n------\r\n\r\n## 🧪 Samples\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------------ | ------------------------------------------------------- | ------ | -------- |\r\n| ChatClient & ChatModel 示例 | [#816](https://github.com/apache/dubbo-go-samples/issues/816) | - | - |\r\n\r\n------\r\n\r\n## 📖 Documentation\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------------ | ------------------------------------------------------- | ------ | -------- |\r\n| 是否需要 code style 指南 | [#1755](https://github.com/apache/dubbo-go/issues/1755) | - | - |\r\n\r\n------\r\n\r\n## 🚀 Long-term Work\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| -------------- | ------------------------------------------------------- | ------ | -------- |\r\n| 功能规划与思考 | [#2610](https://github.com/apache/dubbo-go/issues/2610) | - | - |",
"url": "https://github.com/apache/dubbo-go/discussions/3291",
"createdAt": "2026-04-12T12:53:50Z",
"updatedAt": "2026-08-15T01:26:48Z",
"closed": true,
"closedAt": "2026-08-15T01:26:48Z",
"isAnswered": null,
"author": {
"login": "Alanxtl"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 3300,
"title": "metadata",
"body": "ref:https://caicaiis.cc/4/dubbo-go-metadata/",
"url": "https://github.com/apache/dubbo-go/discussions/3300",
"createdAt": "2026-04-19T02:58:01Z",
"updatedAt": "2026-04-19T03:00:13Z",
"closed": false,
"closedAt": null,
"isAnswered": null,
"author": {
"login": "AlexStocks"
},
"category": {
"name": "General"
},
"answer": null,
"comments": [
{
"id": "DC_kwDOCJS8R84A_ZS3",
"url": "https://github.com/apache/dubbo-go/discussions/3300#discussioncomment-16618679",
"body": "文章的宏观主线基本是对的,尤其是“应用级发现里 registry 负责给实例,metadata 负责把实例恢复成服务语义”这条线;但有几处说法讲得太顺了,落到 dubbo-go 现实现状上会失真。\r\n\r\n**主要偏差**\r\n- `MetadataService` 不是“provider 默认都会暴露”的能力,它只在 `metadata-type != remote` 时才导出;如果走远端元数据存储,provider 会把 app metadata 发布到 report,但本地不会导出 metadata RPC 服务。[metadata/options.go#L63](/D:/test/github/dubbo-go/metadata/options.go#L63) [service_discovery_registry.go#L92](/D:/test/github/dubbo-go/registry/servicediscovery/service_discovery_registry.go#L92) [metadata_service_url_params_customizer.go#L58](/D:/test/github/dubbo-go/registry/servicediscovery/customizer/metadata_service_url_params_customizer.go#L58)\r\n- 文章把 `revision` 描述成“当前服务集合的一份摘要”,这个方向对,但实现上没那么强。当前 `resolveRevision` 只用了 `application + path + version + port + methods` 做 CRC 累加,并没有把 `group`、`protocol`、参数集等完整纳入;所以“服务语义变化就一定触发 revision 变化”这个说法,在现实现状下偏强。[service_revision_customizer.go#L87](/D:/test/github/dubbo-go/registry/servicediscovery/customizer/service_revision_customizer.go#L87)\r\n- 文章把 “接口 -> 应用” 映射讲成 metadata 体系里一个自然组成部分,但在 dubbo-go 里它实际上强依赖 `metadata report` 后端。`Map/Get` 都直接走 report;如果没有 metadata report,自动映射就会失败,consumer 只能靠 `provided-by` 这类显式配置兜底。[service_name_mapping.go#L65](/D:/test/github/dubbo-go/metadata/mapping/metadata/service_name_mapping.go#L65) [service_discovery_registry.go#L254](/D:/test/github/dubbo-go/registry/servicediscovery/service_discovery_registry.go#L254)\r\n- `metadata` 模块不只是维护 provider 暴露服务集合,它也在维护 consumer 的订阅 URL 集合,并计算 `dubbo.subscribed-services.revision`。文章几乎只从 provider 视角讲“服务快照”,少了 consumer 侧这半边状态模型。[metadata.go#L40](/D:/test/github/dubbo-go/metadata/metadata.go#L40) [service_revision_customizer.go#L73](/D:/test/github/dubbo-go/registry/servicediscovery/customizer/service_revision_customizer.go#L73)\r\n- “实例级元数据表达能力偏弱”这个判断可以保留,但文章写得有点过窄。当前实例 metadata 里不只有 `revision` 和 metadata 入口参数,还会写 `dubbo.endpoints`(多协议端口信息)、`meta-v`(metadata service version)、`dubbo.metadata.storage-type` 等字段,所以它不是只有最小二元组,只是离 Java 那种更丰满的实例模型还有距离。[protocol_ports_metadata_customizer.go#L49](/D:/test/github/dubbo-go/registry/servicediscovery/customizer/protocol_ports_metadata_customizer.go#L49) [metadata_service_version_customizer.go#L48](/D:/test/github/dubbo-go/registry/servicediscovery/customizer/metadata_service_version_customizer.go#L48) [service_discovery_registry.go#L117](/D:/test/github/dubbo-go/registry/servicediscovery/service_discovery_registry.go#L117)\r\n- “接口到应用映射的动态能力不够强”需要加限定条件。不是完全弱,而是“后端实现不均匀”:Nacos 和 Zookeeper 都接了 listener,consumer 订阅链路里也会注册 mapping listener;但 Etcd 实现没有真正处理 listener,所以这个能力不是全局一致的。[service_discovery_registry.go#L246](/D:/test/github/dubbo-go/registry/servicediscovery/service_discovery_registry.go#L246) [nacos/report.go#L134](/D:/test/github/dubbo-go/metadata/report/nacos/report.go#L134) [zookeeper/report.go#L111](/D:/test/github/dubbo-go/metadata/report/zookeeper/report.go#L111) [etcd/report.go#L95](/D:/test/github/dubbo-go/metadata/report/etcd/report.go#L95)\r\n\r\n**有一处值得单独强调**\r\n- 文章把 `MetadataService` 更像讲成“远程访问入口”,但在 dubbo-go 代码里,`DefaultMetadataService` 先是一个本地单例状态容器,负责存取 exported/subscribed URLs 和按 revision 查内存中的 `MetadataInfo`;RPC 导出只是它的一层暴露形式,不是它的全部定义。[metadata.go#L27](/D:/test/github/dubbo-go/metadata/metadata.go#L27) [metadata_service.go#L49](/D:/test/github/dubbo-go/metadata/metadata_service.go#L49)\r\n",
"createdAt": "2026-04-19T02:58:35Z",
"updatedAt": "2026-04-19T02:58:35Z",
"author": {
"login": "AlexStocks"
},
"replies": []
},
{
"id": "DC_kwDOCJS8R84A_ZS5",
"url": "https://github.com/apache/dubbo-go/discussions/3300#discussioncomment-16618681",
"body": "按 Provider 启动 -> 注册 -> metadata 发布/暴露 -> consumer 拉取 -> URL 恢复 这条时序重新梳一遍。\r\n\r\n**先定一个一句话**\r\n在 dubbo-go 里,`metadata` 不是“给注册中心补点描述信息”的边角模块,它本质上是应用级服务发现里的“语义补全层”:\r\n\r\n- registry / service discovery 告诉你“哪个应用实例在线”\r\n- metadata 告诉你“这些实例到底提供哪些接口、这些接口该怎么还原成调用 URL”\r\n\r\n这条主线文章是说对了的。\r\n\r\n**一、metadata 模块里真正存的是什么**\r\n本地核心状态在 [metadata.go](/D:/test/github/dubbo-go/metadata/metadata.go) 和 [metadata_service.go](/D:/test/github/dubbo-go/metadata/metadata_service.go)。\r\n\r\n它维护的不是一个单一对象,而是按 `registryId` 分桶的一组 `MetadataInfo`:\r\n\r\n- provider 暴露的服务 URL 集合\r\n- consumer 订阅过的 URL 集合\r\n- 这些 URL 抽象出来的 `Services` 视图\r\n- 对应的 `Revision`\r\n\r\n`MetadataInfo` 的结构在 [metadata_info.go](/D:/test/github/dubbo-go/metadata/info/metadata_info.go):\r\n\r\n- `App`\r\n- `Revision`\r\n- `Services map[string]*ServiceInfo`\r\n- `exportedServiceURLs`\r\n- `subscribedServiceURLs`\r\n\r\n这里有个很重要的点: \r\n`metadata` 不只是 provider 侧“服务清单”,它也保存 consumer 侧订阅集合。这一点文章基本没展开。\r\n\r\n**二、Provider 启动时 metadata 做了什么**\r\n从 provider 视角,链路大致是:\r\n\r\n1. 导出服务时,把服务 URL 加进本地 metadata\r\n2. 建立接口到应用的映射\r\n3. 生成 revision\r\n4. 把 revision 和若干 metadata 入口信息写到 service instance metadata\r\n5. 如果配置为 `remote`,把整份 app metadata 发布到 metadata report\r\n6. 如果配置为 `local`,额外导出本地 `MetadataService` RPC 服务\r\n\r\n对应代码主链路在 [service_discovery_registry.go](/D:/test/github/dubbo-go/registry/servicediscovery/service_discovery_registry.go)。\r\n\r\n先看注册单个服务:\r\n\r\n- `Register(url)` 时调用 `metadata.AddService(...)`,把 provider URL 放进本地 metadata\r\n- 然后调用 `serviceNameMapping.Map(url)`,把“接口 -> 应用”关系写入 metadata report\r\n\r\n见 [service_discovery_registry.go#L225](/D:/test/github/dubbo-go/registry/servicediscovery/service_discovery_registry.go#L225)。\r\n\r\n之后注册应用实例:\r\n\r\n- `RegisterService()` 里用本地 `MetadataInfo` 创建 `ServiceInstance`\r\n- 把 `dubbo.metadata.revision` 写进实例 metadata\r\n- 如果 `metadataType == remote`,调用 `PublishAppMetadata(...)` 发到 metadata center\r\n- 再把实例注册到 service discovery\r\n\r\n见 [service_discovery_registry.go#L85](/D:/test/github/dubbo-go/registry/servicediscovery/service_discovery_registry.go#L85)。\r\n\r\n**三、revision 在 dubbo-go 里到底是什么**\r\n文章把它叫“服务集合摘要”,方向没错,但在 dubbo-go 里实现比这个描述更窄。\r\n\r\n当前 revision 计算在 [service_revision_customizer.go](/D:/test/github/dubbo-go/registry/servicediscovery/customizer/service_revision_customizer.go):\r\n\r\n它把每个 URL 变成候选字符串,核心只用了:\r\n\r\n- `application`\r\n- `path`\r\n- `version`\r\n- `port`\r\n- `methods`\r\n\r\n然后排序后做 CRC32 累加。\r\n\r\n这意味着:\r\n\r\n- 它确实能反映“服务集合是否变化”\r\n- 但它不是完整的“元数据总摘要”\r\n- 某些参数变化未必会反映到 revision 上,比如并不是所有 service params 都纳入了 revision 计算\r\n\r\n所以更准确的说法是:\r\n\r\n`revision` 是 dubbo-go 当前用于判定“导出服务视图是否变化”的轻量摘要,而不是对全部 metadata 语义的完整哈希。\r\n\r\n**四、MetadataService 是什么,不是什么**\r\n这点很容易被讲歪。\r\n\r\n`DefaultMetadataService` 在 dubbo-go 里首先是本地内存态访问器,不是先天的远程服务。 \r\n它提供的方法包括:\r\n\r\n- `GetExportedServiceURLs()`\r\n- `GetSubscribedURLs()`\r\n- `GetMetadataInfo(revision)`\r\n- `GetMetadataServiceURL()`\r\n\r\n定义在 [metadata_service.go#L49](/D:/test/github/dubbo-go/metadata/metadata_service.go#L49)。\r\n\r\nRPC 暴露只是它的一种外化形式:\r\n\r\n- `dubbo` 协议导出 v1\r\n- `triple` 协议导出 v1 + v2\r\n\r\n见 [metadata_service.go#L171](/D:/test/github/dubbo-go/metadata/metadata_service.go#L171)。\r\n\r\n但要注意一个边界:\r\n\r\n- 当 `metadata-type=local` 时,才会导出 `MetadataService`\r\n- 当 `metadata-type=remote` 时,不导出本地 metadata RPC 服务,consumer 要去 metadata report 拉\r\n\r\n见 [options.go#L63](/D:/test/github/dubbo-go/metadata/options.go#L63)。\r\n\r\n所以更准确的话应该是:\r\n\r\nmetadata 在 dubbo-go 中既可能以“provider 暴露的 RPC 服务”形式被访问,也可能以“metadata center 存储”形式被访问,取决于 storage type。\r\n\r\n**五、实例 metadata 里到底写了哪些东西**\r\n文章说 provider 会把 `revision` 和 metadata 入口参数写进实例 metadata,这个是对的,但不完整。\r\n\r\n当前至少还有这些关键字段:\r\n\r\n- `dubbo.metadata.revision`\r\n- `dubbo.metadata.storage-type`\r\n- `dubbo.metadata-service.url-params`\r\n- `meta-v`\r\n- `dubbo.endpoints`\r\n\r\n对应代码:\r\n\r\n- revision: [service_revision_customizer.go](/D:/test/github/dubbo-go/registry/servicediscovery/customizer/service_revision_customizer.go)\r\n- storage type: [service_discovery_registry.go#L117](/D:/test/github/dubbo-go/registry/servicediscovery/service_discovery_registry.go#L117)\r\n- metadata service url params: [metadata_service_url_params_customizer.go](/D:/test/github/dubbo-go/registry/servicediscovery/customizer/metadata_service_url_params_customizer.go)\r\n- metadata version: [metadata_service_version_customizer.go](/D:/test/github/dubbo-go/registry/servicediscovery/customizer/metadata_service_version_customizer.go)\r\n- endpoints: [protocol_ports_metadata_customizer.go](/D:/test/github/dubbo-go/registry/servicediscovery/customizer/protocol_ports_metadata_customizer.go)\r\n\r\n这说明 dubbo-go 的实例级 metadata 不是“只有 revision 和入口地址”,而是已经有一套最小可运行的实例语义模型,只是比 Java 侧还薄。\r\n\r\n**六、接口 -> 应用 mapping 在这里扮演什么角色**\r\n这是应用级发现能工作起来的关键桥。\r\n\r\n因为 service discovery 看到的是“应用实例”,但 consumer 常常还是按“接口”发起订阅,所以必须先回答:\r\n\r\n“这个接口由哪些应用提供?”\r\n\r\n这层抽象就是 `ServiceNameMapping`,接口定义在 [service_name_mapping.go](/D:/test/github/dubbo-go/metadata/mapping/service_name_mapping.go),默认实现是基于 metadata report 的 [metadata/service_name_mapping.go](/D:/test/github/dubbo-go/metadata/mapping/metadata/service_name_mapping.go)。\r\n\r\n它的语义很清楚:\r\n\r\n- `Map(url)`:provider 注册时写入“接口 -> 应用”\r\n- `Get(url, listener)`:consumer 订阅时查出“这个接口对应哪些应用”\r\n- `Remove(url)`:移除监听\r\n\r\n但这块有一个比文章更现实的约束:\r\n\r\nmapping 在 dubbo-go 里不是纯本地能力,它强依赖 metadata report。 \r\n没有 metadata report,自动 mapping 会失败,consumer 就只能靠 `provided-by` 显式指定应用。\r\n\r\n这点在 [service_discovery_registry.go#L254](/D:/test/github/dubbo-go/registry/servicediscovery/service_discovery_registry.go#L254) 很明显。\r\n\r\n**七、Consumer 运行时到底怎么把实例恢复成服务 URL**\r\n这才是 metadata 最直接的运行时价值。\r\n\r\nconsumer 订阅链路大致是:\r\n\r\n1. reference 按接口发起订阅\r\n2. 先通过 mapping 找到这个接口对应的应用集合\r\n3. 再监听这些应用的实例变化\r\n4. 收到实例列表后,读取每个实例上的 `dubbo.metadata.revision`\r\n5. 根据实例 metadata 判断去哪里拿 metadata\r\n6. 拿到 `MetadataInfo` 后,把 `ServiceInfo + instance` 组合成最终可调用 URL\r\n\r\n核心逻辑在 [service_instances_changed_listener_impl.go](/D:/test/github/dubbo-go/registry/servicediscovery/service_instances_changed_listener_impl.go)。\r\n\r\n其中最关键两步:\r\n\r\n- `GetMetadataInfo(...)` 决定元数据来源 \r\n 如果 `storage-type=remote`,走 `GetMetadataFromMetadataReport` \r\n 否则走 `GetMetadataFromRpc`\r\n- 拿到 `MetadataInfo` 后,遍历里面的 `Services`\r\n- 调用 `instance.ToURLs(serviceInfo)` 恢复出最终 URL\r\n\r\n见:\r\n\r\n- [service_instances_changed_listener_impl.go#L227](/D:/test/github/dubbo-go/registry/servicediscovery/service_instances_changed_listener_impl.go#L227)\r\n- [service_instance.go#L166](/D:/test/github/dubbo-go/registry/service_instance.go#L166)\r\n\r\n所以可以把 consumer 侧理解成一句话:\r\n\r\nconsumer 不是直接消费“注册中心给的实例地址”,而是消费“实例 + metadata 还原出的服务 URL”。\r\n\r\n**八、远端拉取 metadata 时,实际有两条路**\r\n文章提到 metadata center 和 MetadataService 两条路径,这个是对的。代码里也确实是双路:\r\n\r\n- remote storage:从 metadata report 拉 \r\n [client.go#L45](/D:/test/github/dubbo-go/metadata/client.go#L45)\r\n- local storage:直接 RPC 调 provider 的 MetadataService \r\n [client.go#L53](/D:/test/github/dubbo-go/metadata/client.go#L53)\r\n\r\n而且 triple 下会优先区分:\r\n\r\n- v1\r\n- v2\r\n\r\n这不是单纯“远程访问 metadata”,而是“按实例声明的 metadata 版本和存储类型选择访问路径”。\r\n\r\n**九、和文章相比,我建议你脑子里换成这版模型**\r\n如果用更贴近 dubbo-go 当前实现的话,我会这样表述:\r\n\r\n- `metadata` 的核心职责不是“保存元数据”,而是维护一份“应用能提供什么服务”的本地视图,并把它变成可传播、可检索、可恢复的运行时语义。\r\n- provider 侧,metadata 负责收集 exported/subscribed URLs、生成 `MetadataInfo`、计算 revision、登记 interface-app mapping,并把这些信息注入 service instance 或发布到 metadata report。\r\n- consumer 侧,metadata 负责把“接口订阅”转换成“应用集合”,再把“应用实例”恢复成“最终服务 URL 列表”。\r\n- `MetadataService` 不是 metadata 的全部,而是 local storage 模式下的一种远程访问入口。\r\n- `revision` 不是完整 metadata 的强语义哈希,而是 dubbo-go 当前实现下的轻量服务视图摘要。\r\n- mapping 不是一个独立小能力,而是应用级发现和接口级调用之间真正的桥;但在 dubbo-go 里它强依赖 metadata report。\r\n- 实例 metadata 已经有最小但成体系的表达:revision、storage type、meta version、metadata service params、protocol endpoints。\r\n\r\n**最后给一个最简版时序**\r\n你可以直接拿这 8 步理解整个模块:\r\n\r\n1. provider 导出服务\r\n2. 本地 metadata 收集 exported URLs\r\n3. 计算 revision\r\n4. 写入 interface -> app mapping\r\n5. 把 revision / endpoint / metadata params 写入 service instance\r\n6. instance 注册到 service discovery\r\n7. consumer 通过 mapping 找到应用,再拿到实例\r\n8. consumer 按 revision 拉 metadata,并还原成最终服务 URL\r\n\r\n",
"createdAt": "2026-04-19T02:59:29Z",
"updatedAt": "2026-04-19T02:59:29Z",
"author": {
"login": "AlexStocks"
},
"replies": []
},
{
"id": "DC_kwDOCJS8R84A_ZS9",
"url": "https://github.com/apache/dubbo-go/discussions/3300#discussioncomment-16618685",
"body": "一个“dubbo-go metadata 全链路时序图”:\r\n\r\n下面这张图按 dubbo-go 当前实现画,把 `provider -> metadata -> service discovery -> consumer` 这条链路串起来了。\r\n\r\n```mermaid\r\nflowchart TD\r\n A[\"Provider 导出服务 URL\"] --> B[\"metadata.AddService(registryId, url)
本地收集 exported URLs\"]\r\n A --> C[\"serviceNameMapping.Map(url)
登记 接口 -> 应用 映射\"]\r\n\r\n B --> D[\"生成 MetadataInfo
services / exported URLs / app\"]\r\n D --> E[\"计算 revision
dubbo.metadata.revision\"]\r\n\r\n E --> F[\"创建 ServiceInstance\"]\r\n F --> G[\"写入实例 metadata
storage-type / revision / meta-v / endpoints / metadata-service.url-params\"]\r\n\r\n G --> H{\"metadata-type ?\"}\r\n H -->|local| I[\"导出本地 MetadataService RPC
dubbo / tri v1 / tri v2\"]\r\n H -->|remote| J[\"PublishAppMetadata(app, revision, MetadataInfo)
发布到 metadata report\"]\r\n\r\n I --> K[\"注册应用实例到 Service Discovery\"]\r\n J --> K\r\n\r\n L[\"Consumer 按接口订阅\"] --> M{\"provided-by 是否显式配置?\"}\r\n M -->|是| N[\"直接得到应用集合\"]\r\n M -->|否| O[\"serviceNameMapping.Get(url, listener)
从 metadata report 查询/监听 接口 -> 应用\"]\r\n\r\n N --> P[\"订阅这些应用实例变化\"]\r\n O --> P\r\n\r\n K --> P\r\n\r\n P --> Q[\"拿到 ServiceInstance 列表\"]\r\n Q --> R[\"读取实例 metadata 中的 revision\"]\r\n\r\n R --> S{\"storage-type ?\"}\r\n S -->|remote| T[\"GetMetadataFromMetadataReport(revision, instance)\"]\r\n S -->|local| U[\"GetMetadataFromRpc(revision, instance)
调用 provider MetadataService\"]\r\n\r\n T --> V[\"得到 MetadataInfo\"]\r\n U --> V\r\n\r\n V --> W[\"遍历 MetadataInfo.Services\"]\r\n W --> X[\"instance.ToURLs(serviceInfo)
实例 + 服务语义 => 最终 URL\"]\r\n X --> Y[\"形成 consumer 可调用 URL 列表\"]\r\n```\r\n\r\n如果你想更直观一点,也可以把它压成一句话:\r\n\r\n`注册中心给实例,mapping 把接口翻成应用,metadata 再把实例翻成服务 URL。`\r\n\r\n再补一张“模块职责图”,方便和上面的时序图对着看:\r\n\r\n```mermaid\r\nflowchart LR\r\n A[\"Service Discovery\"] -->|\"应用实例列表\"| B[\"Consumer\"]\r\n C[\"Metadata Report\"] -->|\"app metadata / mapping\"| B\r\n D[\"Provider MetadataService\"] -->|\"local metadata RPC\"| B\r\n E[\"Provider 本地 metadata\"] -->|\"生成 revision / services\"| A\r\n E -->|\"发布 app metadata\"| C\r\n E -->|\"导出 MetadataService\"| D\r\n E -->|\"登记 接口 -> 应用\"| C\r\n```\r\n\r\n最容易记混的边界是这三个:\r\n\r\n- `Service Discovery` 负责“发现哪个应用实例在线”\r\n- `Mapping` 负责“这个接口属于哪些应用”\r\n- `Metadata` 负责“这些实例到底暴露了哪些服务,以及怎么恢复成最终调用 URL”\r\n",
"createdAt": "2026-04-19T03:00:13Z",
"updatedAt": "2026-04-19T03:00:13Z",
"author": {
"login": "AlexStocks"
},
"replies": []
}
]
},
{
"number": 3306,
"title": "2026-04-26 Weekly",
"body": "# 🧭 Dubbo-go 社区周报\r\n\r\n| 项目 | 链接 |\r\n| --------------- | ------------------------------------------------------------ |\r\n| gost | https://github.com/dubbogo/gost |\r\n| hessian2 | https://github.com/apache/dubbo-go-hessian2 |\r\n| pixiu | https://github.com/apache/dubbo-go-pixiu/ |\r\n| pixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples |\r\n| dubbogo-samples | https://github.com/apache/dubbo-go-samples/issues |\r\n\r\n------\r\n\r\n## 🧩 RPC Communication\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------------------------------------------------ | ------------------------------------------------------- | ----------- | --------------- |\r\n| [提案] server/server.go中Serve优化 | [#3042](https://github.com/apache/dubbo-go/issues/3042) | junfa | 04-12: 待提交新pr |\r\n| API 易用性改进 | [#2326](https://github.com/apache/dubbo-go/issues/2326) | zecheng| 新 API 设计,已经迁了一部分 |\r\n| otel trace错乱 | https://github.com/apache/dubbo-go/issues/3240 | sirui | 待config后跟进 04-12: 待提交pr\r\n------\r\n\r\n## 🧱 Registry\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ---------------- | ----------------------- | -------------- | ----------------------------------- |\r\n\r\n\r\n------\r\n\r\n## ⚙️ Protocol\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------- | ------------------- | ----------------- | ----------------- |\r\n| 删除 protocol/dubbo3 与 protocol/grpc | [#3093](https://github.com/apache/dubbo-go/issues/3093) | caicai | 01-18: 暂时不能删除 |\r\n| [FEATURE] Enhanced HTTP/3 transport configuration options with support for core QUIC parameter settings | [#3102](https://github.com/apache/dubbo-go/issues/3102) | caicai | 12-24: 先出个提案
01-18: 继续推进 |\r\n| [FEATURE] Introduce Router Cache to Enhance Routing Performance | [#3166](https://github.com/apache/dubbo-go/issues/3166) | jiale | 待cr | | |\r\n\r\n-----\r\n## Config\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ----------------------------------- | ------------------------------------------------------------ | -------------- | ------------------------------------------------------------ |\r\n| config 集成测试 | https://github.com/apache/dubbo-go/issues/3255 | sirui | 04-12: 就差最后的测试了 | - |\r\n------\r\n## Scanned Issues by AI\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ----------------------------------- | ------------------------------------------------------------ | -------------- | ------------------------------------------------------------ |\r\n| common.URL改造 | https://github.com/apache/dubbo-go/issues/3248 https://github.com/apache/dubbo-go/issues/3246 | jintao | 已有pr: https://github.com/apache/dubbo-go/pull/3282 |\r\n| [提案] 使 dubbo-go 对 AI 编程工具更加友好|https://github.com/apache/dubbo-go/issues/3276 | shibin | - | - |\r\n------\r\n## 🧠 Memory Leak\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ----------------------------------- | ------------------------------------------------------------ | -------------- | ------------------------------------------------------------ |\r\n\r\n\r\n------\r\n\r\n## 🔧 Tools\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ---- | -------- | ------ | -------- |\r\n| 三方包升级 | https://github.com/apache/dubbo-go/issues/3243 | | pr https://github.com/apache/dubbo-go/pull/3245 待review |\r\n\r\n------\r\n\r\n## 🔧 Gost\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------- | -------------------------------------------------- | --------- | -------- |\r\n| | | | |\r\n\r\n------\r\n\r\n## 🧪 Samples\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------------ | ------------------------------------------------------- | ------ | -------- |\r\n| ChatClient & ChatModel 示例 | [#816](https://github.com/apache/dubbo-go-samples/issues/816) | - | - |\r\n\r\n------\r\n\r\n## 📖 Documentation\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------------------------ | ------------------------------------------------------- | ------ | -------- |\r\n| 是否需要 code style 指南 | [#1755](https://github.com/apache/dubbo-go/issues/1755) | - | - |\r\n\r\n------\r\n\r\n## 🚀 Long-term Work\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| -------------- | ------------------------------------------------------- | ------ | -------- |\r\n| 功能规划与思考 | [#2610](https://github.com/apache/dubbo-go/issues/2610) | - | - |",
"url": "https://github.com/apache/dubbo-go/discussions/3306",
"createdAt": "2026-04-26T12:59:49Z",
"updatedAt": "2026-08-15T01:26:41Z",
"closed": true,
"closedAt": "2026-08-15T01:26:41Z",
"isAnswered": null,
"author": {
"login": "CAICAIIs"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 3318,
"title": "nacos-go-sdk 从 v2 升级到 v3",
"body": "# apache/dubbo-go Nacos v2 to v3 升级方案\r\n\r\n## 1. 背景\r\n\r\n`dubbo-go-samples` 中的 Nacos v3 验证不应作为升级起点。Sample 只能证明某个示例链路是否跑通,无法定义 `apache/dubbo-go` 对 Nacos 3.x 的真实兼容边界。本次升级应从 `apache/dubbo-go` 主仓开始,先完成框架层的 Nacos 3.x 兼容性确认、必要改造和自动化验证,再使用 `dubbo-go-samples` 作为集成验收入口。\r\n\r\n当前 `apache/dubbo-go` 已经依赖 `github.com/nacos-group/nacos-sdk-go/v2 v2.2.5`,并且已有 Nacos 注册中心、配置中心和元数据中心实现。升级的重点不是新增 Nacos 支持,而是确认现有实现能否在 Nacos 3.x 下稳定工作,并补齐鉴权、命名空间、数据库迁移、生命周期和回滚策略。\r\n\r\n## 2. 升级目标\r\n\r\n本次升级目标如下:\r\n\r\n- 确认 `apache/dubbo-go` 对 Nacos 3.x 的支持范围和限制。\r\n- 保证注册中心、配置中心、元数据中心三条 Nacos 链路在 Nacos 3.x 下行为可验证。\r\n- 明确鉴权开启和关闭两种模式下的客户端配置方式。\r\n- 明确 Nacos 服务端数据库 schema 变更和回滚策略。\r\n- 建立可复现的自动化测试、集成测试和 samples 验收流程。\r\n- 形成一条可以灰度发布、可以回滚、可以定位失败原因的升级路径。\r\n\r\n本方案不以“只跑通 `dubbo-go-samples/registry`”为成功标准。最终成功标准必须落在 `apache/dubbo-go` 主仓能力上。\r\n\r\n## 3. 当前主仓基线\r\n\r\n### 3.1 依赖基线\r\n\r\n主仓当前使用:\r\n\r\n```text\r\ngithub.com/nacos-group/nacos-sdk-go/v2 v2.2.5\r\n```\r\n\r\n这说明当前代码已经处于 Nacos Go SDK v2 客户端体系内。根据 Nacos 官方升级文档,Nacos 3.x server 与 2.x client 兼容,因此第一阶段不应默认升级 SDK,而应先验证当前 SDK 在 dubbo-go 现有封装下的实际表现。\r\n\r\n参考:\r\n\r\n- https://nacos.io/en/docs/latest/manual/admin/upgrading/\r\n- https://github.com/apache/dubbo-go/blob/main/go.mod\r\n\r\n### 3.2 dubbo-go 中的 Nacos 入口\r\n\r\n主仓至少存在三类 Nacos 能力入口:\r\n\r\n- 注册中心:`registry/nacos`\r\n- 配置中心:`config_center/nacos`\r\n- 元数据中心:`metadata/report/nacos`\r\n\r\n底层客户端构造逻辑集中在:\r\n\r\n- `remoting/nacos/builder.go`\r\n\r\n该文件负责从 `common.URL` 中解析 Nacos 服务地址、namespace、用户名、密码、AK/SK、timeout、endpoint、cache、log 等客户端配置。因此,本次升级需要重点验证 `common.URL -> nacos ClientConfig/ServerConfig -> SDK client` 的参数映射是否完整、明确、可诊断。\r\n\r\n## 4. 升级原则\r\n\r\n### 4.1 主仓优先\r\n\r\n升级顺序必须是:\r\n\r\n1. `apache/dubbo-go` 主仓完成兼容性确认和必要改造。\r\n2. 主仓测试和集成环境验证通过。\r\n3. `dubbo-go-samples` 更新配置和运行手册。\r\n4. 使用 samples 作为最终验收和用户文档验证。\r\n\r\n不能先在 samples 中绕过主仓问题,否则容易出现示例跑通但真实用户场景失败的情况。\r\n\r\n### 4.2 不默认升级 SDK\r\n\r\n第一阶段先基于当前 `nacos-sdk-go/v2 v2.2.5` 验证 Nacos 3.x。只有出现明确的 SDK 缺陷或官方文档要求时,才升级 SDK。\r\n\r\nSDK 升级需要单独评审:\r\n\r\n- 是否引入破坏性 API 变化。\r\n- 是否改变默认超时、缓存、日志、鉴权行为。\r\n- 是否影响现有 Nacos 2.x 用户。\r\n- 是否需要同步更新 mock、单测和文档。\r\n\r\n### 4.3 鉴权分层处理\r\n\r\nNacos 3.x 的鉴权必须拆成两条线:\r\n\r\n- 控制台鉴权。\r\n- 客户端访问鉴权。\r\n\r\n官方文档中 `nacos.core.auth.enabled` 默认值为 `false`,用于客户端访问鉴权;`nacos.core.auth.console.enabled` 默认值为 `true`,用于控制台访问鉴权。Nacos 3.0 起控制台访问默认开启鉴权,但这不等价于客户端注册发现默认必须带用户名密码。\r\n\r\n因此,升级方案中不能简单写“v3 默认开启鉴权,所以客户端必须配置用户名密码”。正确表达应为:\r\n\r\n- 如果只开启控制台鉴权,dubbo-go 客户端注册发现不一定需要用户名密码。\r\n- 如果开启 `nacos.core.auth.enabled=true`,dubbo-go 客户端必须正确传递用户名密码或其他认证参数。\r\n- 鉴权失败必须在启动或注册阶段有明确日志和错误信息。\r\n\r\n参考:\r\n\r\n- https://nacos.io/docs/v3.0/manual/admin/auth/\r\n\r\n### 4.4 数据库不可被当成透明实现细节\r\n\r\nNacos 3.2.x 支持从 2.0.x ~ 3.1.x 升级,但官方文档明确说明数据库 schema 有变化,升级前需要对比并应用新的 `mysql-schema.sql`。Nacos 3.2.0 还新增 AI 相关表。\r\n\r\n因此,回滚策略不能只写“切回 Nacos v2”。如果 v2 和 v3 共用同一数据库,schema 变化可能已经影响回滚边界。首次验证必须优先使用独立数据库或由备份恢复出的数据库副本。\r\n\r\n## 5. 影响范围\r\n\r\n### 5.1 注册中心\r\n\r\n注册中心需要覆盖:\r\n\r\n- Provider 注册。\r\n- Provider 反注册。\r\n- Consumer 订阅。\r\n- Consumer 取消订阅。\r\n- 全量服务查询。\r\n- 实例列表变化监听。\r\n- Nacos 重启后的恢复。\r\n- 网络抖动后的恢复。\r\n- 鉴权失败时的错误暴露。\r\n\r\n重点代码区域:\r\n\r\n- `registry/nacos/registry.go`\r\n- `registry/nacos/listener.go`\r\n- `remoting/nacos/builder.go`\r\n\r\n重点风险:\r\n\r\n- `RegisterInstance` 返回 `false` 但 error 为空时是否有明确错误。\r\n- `Subscribe` 失败后的重试是否会退出过早或无限泄露 goroutine。\r\n- `Destroy` 中关闭监听器、反注册、关闭 client 的顺序是否稳定。\r\n- `IsAvailable` 使用 `GetAllServicesInfo` 探活时,在 Nacos 3.x 鉴权失败或异常返回下是否会误判。\r\n\r\n### 5.2 配置中心\r\n\r\n配置中心需要覆盖:\r\n\r\n- 读取配置。\r\n- 发布配置。\r\n- 删除配置。\r\n- 监听配置变更。\r\n- 取消监听。\r\n- 按 group 查询配置 key。\r\n- 空 namespace 与 `public` namespace 的兼容。\r\n\r\n重点代码区域:\r\n\r\n- `config_center/nacos/impl.go`\r\n- `config_center/nacos/client.go`\r\n- `config_center/nacos/facade.go`\r\n- `remoting/nacos/builder.go`\r\n\r\n重点风险:\r\n\r\n- Nacos 3.0 对 config namespace 做了迁移和兼容处理,`namespaceId=\"\"` 与 `namespaceId=\"public\"` 的行为需要显式验证。\r\n- `Destroy` 直接关闭 `done`,需要确认重复调用或异常初始化失败时不会 panic。\r\n- 配置不存在错误不能被误判为连接失败。\r\n\r\n### 5.3 元数据中心\r\n\r\n元数据中心需要覆盖:\r\n\r\n- 应用元数据发布。\r\n- 应用元数据读取。\r\n- 服务到应用映射发布。\r\n- 服务到应用映射读取。\r\n- 映射监听。\r\n- 映射取消监听。\r\n\r\n重点代码区域:\r\n\r\n- `metadata/report/nacos/report.go`\r\n- `remoting/nacos/builder.go`\r\n\r\n重点风险:\r\n\r\n- 元数据中心复用 Nacos config client,容易被配置中心 namespace 迁移影响。\r\n- 当前实现兼容 Java 元数据格式和 dubbo-go 旧格式,升级测试必须同时覆盖两种 dataId/group 组合。\r\n- `CreateMetadataReport` 返回 `nil` 时上层是否能明确处理。\r\n\r\n## 6. 目标版本与环境矩阵\r\n\r\n### 6.1 Nacos 服务端版本\r\n\r\n建议至少准备以下环境:\r\n\r\n| 环境 | Nacos 版本 | 用途 |\r\n| --- | --- | --- |\r\n| 基线环境 | 当前生产或样例使用的 Nacos 2.x | 对照组 |\r\n| 目标环境 | Nacos 3.2.x | 本次主要升级目标 |\r\n| 兼容环境 | Nacos 3.0.x 或 3.1.x | 如需声明泛 3.x 支持时使用 |\r\n\r\n如果只计划支持 Nacos 3.2.x,不要在文档中承诺“支持所有 3.x”。可以写成“本次以 Nacos 3.2.x 为验收目标,其他 3.x 小版本仅做兼容参考”。\r\n\r\n### 6.2 鉴权矩阵\r\n\r\n必须验证两种模式:\r\n\r\n| 模式 | 服务端配置 | 客户端期望 |\r\n| --- | --- | --- |\r\n| 客户端鉴权关闭 | `nacos.core.auth.enabled=false` | 不配置用户名密码也能注册、发现、读写配置 |\r\n| 客户端鉴权开启 | `nacos.core.auth.enabled=true` | 必须配置用户名密码,认证失败要有明确错误 |\r\n\r\n控制台鉴权单独验证,不作为客户端兼容结论。\r\n\r\n### 6.3 数据库矩阵\r\n\r\n首次升级验证建议使用:\r\n\r\n| 数据库 | 策略 |\r\n| --- | --- |\r\n| v2 基线库 | 保持不变,只读对照 |\r\n| v3 验证库 | 从 v2 备份恢复后执行 schema 升级 |\r\n| 回滚验证库 | 从升级前备份恢复,验证回滚步骤 |\r\n\r\n禁止在没有备份和回滚演练的情况下让 v3 首次验证直接连接生产 v2 数据库。\r\n\r\n## 7. 实施阶段\r\n\r\n### 7.1 阶段一:事实盘点\r\n\r\n输出一份影响清单,包含:\r\n\r\n- 当前 dubbo-go 依赖的 `nacos-sdk-go` 版本。\r\n- 所有 Nacos 相关 package。\r\n- 所有 Nacos 配置项。\r\n- 注册中心、配置中心、元数据中心是否都在目标业务中启用。\r\n- samples 中实际依赖 Nacos 的 demo 清单。\r\n\r\n建议命令:\r\n\r\n```bash\r\ngo list -m github.com/nacos-group/nacos-sdk-go/v2\r\ngrep -R \"nacos\" -n registry config_center metadata remoting config common\r\n```\r\n\r\nWindows 环境可使用 PowerShell:\r\n\r\n```powershell\r\nGet-ChildItem -Recurse -File | Select-String -Pattern \"nacos\"\r\n```\r\n\r\n阶段退出标准:\r\n\r\n- 影响范围明确。\r\n- 不存在“只知道 registry,遗漏 config center 或 metadata report”的情况。\r\n\r\n### 7.2 阶段二:本地兼容性验证\r\n\r\n启动两套 Nacos:\r\n\r\n- Nacos 2.x:基线。\r\n- Nacos 3.2.x:目标。\r\n\r\n每套环境都跑同一批 dubbo-go 测试和最小集成链路。\r\n\r\n验证内容:\r\n\r\n- 当前 `nacos-sdk-go/v2 v2.2.5` 是否能连接 Nacos 3.2.x。\r\n- `remoting/nacos/builder.go` 生成的 `ServerConfig` 和 `ClientConfig` 是否正确。\r\n- 地址、context path、namespace、group、username、password、timeout 是否按预期传入 SDK。\r\n\r\n阶段退出标准:\r\n\r\n- Nacos 3.2.x 下注册中心最小链路可运行。\r\n- 鉴权关闭和开启模式各有明确结论。\r\n- 如果失败,能定位到服务端配置、dubbo-go 参数映射、SDK 行为或样例配置中的某一类。\r\n\r\n### 7.3 阶段三:主仓改造\r\n\r\n根据阶段二结果决定是否需要改代码。\r\n\r\n优先改造项:\r\n\r\n- 补齐 Nacos 3.x 鉴权配置文档和示例。\r\n- 增强 Nacos client 初始化错误信息,避免把认证失败、地址错误、namespace 错误全部包装成模糊错误。\r\n- 补充 `remoting/nacos/builder.go` 的单元测试,覆盖 Nacos 3.x 关键参数。\r\n- 补充 registry/config center/metadata report 在鉴权失败、连接失败、配置不存在下的错误路径测试。\r\n- 如发现生命周期问题,修复 `Destroy`、listener、retry、client close 顺序。\r\n\r\nSDK 升级不是默认动作。只有满足以下条件之一时才升级:\r\n\r\n- Nacos 3.x 目标功能要求新版 SDK。\r\n- 当前 SDK 在 Nacos 3.x 下存在已确认缺陷。\r\n- 官方文档或 issue 明确建议升级。\r\n- 新版 SDK 修复了本次升级阻塞问题,且对 Nacos 2.x 用户无破坏性影响。\r\n\r\n阶段退出标准:\r\n\r\n- 主仓单测通过。\r\n- Nacos 相关新增测试覆盖关键分支。\r\n- 不引入对 Nacos 2.x 的兼容性回退。\r\n\r\n### 7.4 阶段四:集成测试\r\n\r\n集成测试需要覆盖三条链路。\r\n\r\n注册中心:\r\n\r\n- Provider 启动并注册成功。\r\n- Consumer 发现 provider。\r\n- RPC 调用成功。\r\n- Provider 停止后 Nacos 实例下线。\r\n- Provider 重启后 Consumer 能恢复调用。\r\n- Nacos 重启后实例和订阅最终恢复。\r\n\r\n配置中心:\r\n\r\n- 发布配置成功。\r\n- 读取配置成功。\r\n- 监听配置变更成功。\r\n- 删除配置后读取行为符合预期。\r\n- `namespaceId=\"\"` 和 `namespaceId=\"public\"` 场景有明确结论。\r\n\r\n元数据中心:\r\n\r\n- 应用元数据发布成功。\r\n- 应用元数据读取成功。\r\n- 服务应用映射发布成功。\r\n- 映射监听能收到变更。\r\n- Java 兼容格式和 dubbo-go 旧格式都能覆盖。\r\n\r\n阶段退出标准:\r\n\r\n- 三条链路在 Nacos 3.2.x 下全部通过。\r\n- 失败路径有日志,有错误,有归因。\r\n\r\n### 7.5 阶段五:samples 验收\r\n\r\n主仓通过后,才进入 samples。\r\n\r\nsamples 的职责:\r\n\r\n- 验证用户可理解的配置方式。\r\n- 验证 README 和命令是否可复现。\r\n- 验证 registry、config center、metadata 场景是否能作为用户示例。\r\n\r\nsamples 不负责定义主仓兼容策略。\r\n\r\n需要输出:\r\n\r\n- Nacos 2.x 运行结果。\r\n- Nacos 3.2.x 运行结果。\r\n- 鉴权关闭运行结果。\r\n- 鉴权开启运行结果。\r\n- 失败样例和原因列表。\r\n\r\n阶段退出标准:\r\n\r\n- samples 文档能指导用户启动 Nacos 3.x。\r\n- 用户不需要读主仓源码即可配置用户名、密码、namespace、group。\r\n- 失败场景有明确排查入口。\r\n\r\n## 8. 数据库升级方案\r\n\r\n### 8.1 首次验证\r\n\r\n首次验证不得直接改生产或共享 v2 数据库。\r\n\r\n推荐步骤:\r\n\r\n1. 备份 v2 Nacos 数据库。\r\n2. 恢复到独立 v3 验证库。\r\n3. 对比当前版本和目标版本的 `mysql-schema.sql`。\r\n4. 执行 Nacos 官方要求的 schema 变更。\r\n5. 启动 Nacos 3.2.x。\r\n6. 查看 `logs/startup.log` 和 `logs/nacos.log`。\r\n7. 通过 dubbo-go 注册、配置、元数据链路验证数据可用。\r\n\r\n### 8.2 回滚边界\r\n\r\n如果 v3 使用独立数据库,回滚方式是切回 v2 Nacos 地址和 v2 数据库。\r\n\r\n如果 v2 和 v3 共用数据库,回滚必须满足:\r\n\r\n- 升级前有完整数据库备份。\r\n- 已演练从备份恢复到 v2。\r\n- 明确 schema 变更是否可逆。\r\n- 明确 v3 运行期间写入的新数据是否需要迁回 v2。\r\n\r\n不能在共库方案里承诺“配置切换即可回滚”。\r\n\r\n### 8.3 Config Namespace 迁移\r\n\r\nNacos 3.0 将配置中心的空 namespace 与 `public` namespace 做了统一和兼容处理。官方文档说明,兼容模式默认开启,可通过 `nacos.config.namespace.compatible.mode` 关闭;关闭后将不再具备平滑降级能力。\r\n\r\n因此:\r\n\r\n- 升级初期保持兼容模式开启。\r\n- 验证配置中心读写和监听后,再评估是否关闭兼容模式。\r\n- 关闭兼容模式前必须确认不再需要平滑回退到旧行为。\r\n- 如果日志中出现 namespace 迁移冲突,需要先清理冲突配置,再继续验证。\r\n\r\n## 9. 鉴权升级方案\r\n\r\n### 9.1 服务端配置\r\n\r\n如果开启客户端鉴权,Nacos 服务端至少需要配置:\r\n\r\n```properties\r\nnacos.core.auth.system.type=nacos\r\nnacos.core.auth.enabled=true\r\nnacos.core.auth.admin.enabled=true\r\nnacos.core.auth.console.enabled=true\r\nnacos.core.auth.plugin.nacos.token.secret.key=${custom_base64_token_secret_key}\r\nnacos.core.auth.server.identity.key=${custom_server_identity_key}\r\nnacos.core.auth.server.identity.value=${custom_server_identity_value}\r\n```\r\n\r\nDocker 环境至少需要:\r\n\r\n```bash\r\nNACOS_AUTH_ENABLE=true\r\nNACOS_AUTH_TOKEN=${custom_base64_token_secret_key}\r\nNACOS_AUTH_IDENTITY_KEY=${custom_server_identity_key}\r\nNACOS_AUTH_IDENTITY_VALUE=${custom_server_identity_value}\r\n```\r\n\r\n### 9.2 dubbo-go 客户端配置\r\n\r\ndubbo-go 侧应通过现有配置字段传递认证信息:\r\n\r\n```yaml\r\ndubbo:\r\n registries:\r\n nacos:\r\n protocol: nacos\r\n address: 127.0.0.1:8848\r\n username: nacos\r\n password: ${NACOS_PASSWORD}\r\n namespace: public\r\n group: DEFAULT_GROUP\r\n```\r\n\r\n配置中心和元数据中心也需要分别验证用户名、密码、namespace、group 是否正确透传。不能只验证 registry。\r\n\r\n### 9.3 失败行为\r\n\r\n必须覆盖以下失败场景:\r\n\r\n- 未配置用户名密码但服务端开启客户端鉴权。\r\n- 用户名错误。\r\n- 密码错误。\r\n- namespace 不存在。\r\n- group 配置错误。\r\n- token secret 或 server identity 配置不一致。\r\n\r\n验收要求:\r\n\r\n- 错误不能被吞掉。\r\n- 日志必须能区分认证失败和网络失败。\r\n- Provider 不应在注册失败后表现为“启动成功但不可发现”。\r\n\r\n## 10. 测试方案\r\n\r\n### 10.1 单元测试\r\n\r\n建议补充或确认以下测试:\r\n\r\n- `remoting/nacos/builder.go`:URL 到 Nacos config 的映射。\r\n- `registry/nacos`:注册、反注册、订阅、取消订阅参数构造。\r\n- `config_center/nacos`:配置不存在、发布失败、删除失败、监听失败。\r\n- `metadata/report/nacos`:metadata dataId/group 兼容格式。\r\n\r\n### 10.2 集成测试\r\n\r\n建议通过 Docker Compose 或 CI service 启动 Nacos 2.x 和 3.2.x。\r\n\r\n测试矩阵:\r\n\r\n| 链路 | Nacos 2.x | Nacos 3.2.x 鉴权关 | Nacos 3.2.x 鉴权开 |\r\n| --- | --- | --- | --- |\r\n| Registry register/unregister | 必测 | 必测 | 必测 |\r\n| Registry subscribe/unsubscribe | 必测 | 必测 | 必测 |\r\n| RPC provider/consumer | 必测 | 必测 | 必测 |\r\n| Config get/publish/delete/listen | 如当前支持 | 必测 | 必测 |\r\n| Metadata publish/read/listen | 如当前支持 | 必测 | 必测 |\r\n\r\n### 10.3 稳定性测试\r\n\r\n稳定性测试至少包含:\r\n\r\n- 长稳运行 24 小时。\r\n- Provider 每 30 秒重启一次,持续 30 分钟。\r\n- Nacos 单节点重启。\r\n- Nacos 全集群滚动重启。\r\n- Consumer 持续调用,观察错误率和恢复时间。\r\n- 注册实例数量放大到至少 100 个。\r\n- 订阅服务数量放大到至少 100 个。\r\n\r\n### 10.4 资源泄露测试\r\n\r\n重点观察:\r\n\r\n- goroutine 数量。\r\n- Nacos SDK client 数量。\r\n- listener cache 大小。\r\n- 连接数。\r\n- 日志错误频率。\r\n- 进程内存。\r\n\r\n特别关注订阅失败重试、Nacos 重启、Consumer 销毁、配置监听取消这些路径。\r\n\r\n## 11. 发布方案\r\n\r\n### 11.1 发布阶段\r\n\r\n建议按以下顺序推进:\r\n\r\n1. 本地验证:开发者本地运行 Nacos 3.2.x。\r\n2. CI 验证:新增 Nacos 3.2.x 集成测试。\r\n3. 测试环境:业务应用连接 Nacos 3.2.x 验证。\r\n4. 预发环境:开启与生产一致的鉴权、namespace、group、数据库配置。\r\n5. 生产灰度:少量 Provider 和 Consumer 切到 Nacos 3.2.x。\r\n6. 全量切换:观察稳定后全量切换。\r\n\r\n### 11.2 灰度策略\r\n\r\n优先采用双环境灰度:\r\n\r\n- Nacos 2.x 保持原链路。\r\n- Nacos 3.2.x 使用独立地址和数据库。\r\n- dubbo-go 应用通过配置切换 registry/config/metadata 地址。\r\n\r\n如果业务允许,可评估双注册:\r\n\r\n- Provider 同时注册到 v2 和 v3。\r\n- Consumer 分批切到 v3。\r\n- 灰度期间对比 v2/v3 实例数、健康状态和调用成功率。\r\n\r\n双注册需要单独评审,不应默认纳入第一阶段。\r\n\r\n### 11.3 观测指标\r\n\r\n发布期间必须观察:\r\n\r\n- 注册成功率。\r\n- 反注册成功率。\r\n- 订阅成功率。\r\n- RPC 成功率。\r\n- RPC P99 延迟。\r\n- Consumer 实例列表为空次数。\r\n- Provider 频繁上下线次数。\r\n- Nacos 登录或鉴权失败次数。\r\n- Nacos server CPU、内存、连接数、数据库 QPS。\r\n- dubbo-go 进程 goroutine、内存、日志错误数。\r\n\r\n## 12. 回滚方案\r\n\r\n### 12.1 可快速回滚的前提\r\n\r\n只有满足以下条件时,才能承诺快速回滚:\r\n\r\n- v2 Nacos 环境保持运行。\r\n- v2 数据库未被 v3 schema 或 v3 写入破坏。\r\n- 应用配置可以快速切回 v2 地址。\r\n- 没有关闭 Nacos 3.x config namespace 兼容模式。\r\n- 业务没有只写入 v3 而未同步回 v2 的关键配置或元数据。\r\n\r\n### 12.2 回滚步骤\r\n\r\n推荐步骤:\r\n\r\n1. 停止继续扩大 v3 灰度。\r\n2. 将 Consumer 配置切回 v2 Nacos。\r\n3. 将 Provider 配置切回 v2 Nacos。\r\n4. 确认 Provider 在 v2 控制台可见。\r\n5. 确认 Consumer 能发现实例。\r\n6. 确认 RPC 调用恢复。\r\n7. 保留 v3 环境现场日志和数据库,不立即清理。\r\n8. 汇总失败原因后再决定是否重试升级。\r\n\r\n### 12.3 不可快速回滚场景\r\n\r\n以下情况不能写作快速回滚:\r\n\r\n- v2 和 v3 共用数据库且无恢复演练。\r\n- 关闭了 namespace 兼容模式。\r\n- 业务配置只在 v3 修改,v2 不具备同等数据。\r\n- 应用代码已经依赖只在 Nacos 3.x 存在的行为。\r\n\r\n## 13. 验收标准\r\n\r\n本次升级完成必须满足:\r\n\r\n- `apache/dubbo-go` 主仓明确声明支持的 Nacos 3.x 版本。\r\n- registry、config center、metadata report 三条链路均有验证结论。\r\n- 鉴权开启和关闭两种模式均有测试结果。\r\n- 数据库升级和回滚策略可执行。\r\n- Nacos 2.x 回归通过,不破坏存量用户。\r\n- `dubbo-go-samples` 能作为用户示例跑通 Nacos 3.x。\r\n- 文档中说明 username、password、namespace、group、auth 开关和数据库 schema 注意事项。\r\n- 所有 P0/P1 问题关闭后才能进入生产灰度。\r\n\r\n## 14. 待办清单\r\n\r\n### P0\r\n\r\n- 确认目标 Nacos 3.x 小版本,禁止泛化承诺所有 3.x。\r\n- 使用独立数据库完成 v3 schema 升级验证。\r\n- 验证 registry/config center/metadata report 三条链路。\r\n- 验证客户端鉴权开启时 username/password 透传。\r\n- 验证回滚流程,不能只写配置切回。\r\n\r\n### P1\r\n\r\n- 补充 `remoting/nacos/builder.go` 参数映射测试。\r\n- 补充 Nacos 鉴权失败、namespace 错误、连接失败的错误路径测试。\r\n- 补充 samples 的 Nacos 3.x 配置示例。\r\n- 补充 Nacos 3.x 运行手册,包括 Docker 环境变量和管理员密码初始化。\r\n- 补充长稳和资源泄露测试记录。\r\n\r\n## 15. 最终结论\r\n\r\nNacos v2 到 v3 的升级应从 `apache/dubbo-go` 主仓开始,而不是从 `dubbo-go-samples` 开始。主仓需要先证明自身 Nacos 适配层在 Nacos 3.x 下的行为稳定、可诊断、可回滚,再让 samples 作为用户侧验收。\r\n\r\n本次升级的核心风险不在“能不能连接 Nacos 3.x”,而在:\r\n\r\n- 鉴权是否被正确理解和配置。\r\n- 数据库 schema 变更是否破坏回滚边界。\r\n- config namespace 迁移是否影响配置中心和元数据中心。\r\n- 注册、订阅、监听、销毁生命周期是否在异常场景下稳定。\r\n- Nacos 2.x 存量用户是否被兼容性改造影响。\r\n\r\n只有这些风险都有明确结论后,才能认为 dubbo-go 对 Nacos 3.x 的升级方案完成。\r\n",
"url": "https://github.com/apache/dubbo-go/discussions/3318",
"createdAt": "2026-05-06T11:13:20Z",
"updatedAt": "2026-05-06T11:22:30Z",
"closed": false,
"closedAt": null,
"isAnswered": null,
"author": {
"login": "AlexStocks"
},
"category": {
"name": "General"
},
"answer": null,
"comments": [
{
"id": "DC_kwDOCJS8R84BAMBD",
"url": "https://github.com/apache/dubbo-go/discussions/3318#discussioncomment-16826435",
"body": "补充:\r\n\r\n\r\n从 `apache/dubbo-go` 主仓开始升级,再用 `dubbo-go-samples` 做验证层”的思路,从零写一版完整方案。\r\n\r\n先给结论:**这不是 sample 的升级文档,而是 dubbo-go 对 Nacos 3.x 的兼容改造与验证方案**。样例只负责证明主仓改造后的行为是对的,不应该反过来主导方案。\r\n\r\n**升级目标**\r\n把 `apache/dubbo-go` 当前基于 `nacos-sdk-go/v2` 的注册中心、配置中心、元数据报告能力,升级成一套能稳定对接 Nacos 3.x 的实现,并给出可回滚、可验证、可分阶段发布的落地路径。\r\n\r\n**当前基线**\r\n仓库里现在已经在用 `github.com/nacos-group/nacos-sdk-go/v2 v2.2.5`,而且 `RegistryConfig` 已经具备 `username/password/namespace/accessKey/secretKey` 这些透传字段,`registry/nacos/registry.go` 也已经把这些参数映射进 Nacos 客户端初始化流程。所以这次升级的重点不是“从零接入 Nacos”,而是“把现有接入改造成可稳定支持 Nacos 3.x 的形态”。 \r\n参考:[go.mod](D:\\test\\github\\dubbo-go\\go.mod:38),[config/registry_config.go](D:\\test\\github\\dubbo-go\\config\\registry_config.go:43),[registry/nacos/registry.go](D:\\test\\github\\dubbo-go\\registry\\nacos\\registry.go:141)\r\n\r\n**推荐路径**\r\n我建议走下面这条主线:\r\n\r\n1. 先锁定兼容边界,不先动 sample。\r\n2. 在 `apache/dubbo-go` 中梳理所有 Nacos 入口,明确 registry、config center、metadata report 三条链路各自是否受影响。\r\n3. 补齐 Nacos 3.x 的环境约束、鉴权约束、数据库约束和回滚约束。\r\n4. 先做兼容性改造和自动化测试,再让 samples 做集成验收。\r\n5. 最后再决定是否需要单独升级 SDK 版本。\r\n\r\n**为什么不是先从 samples 开始**\r\n因为 samples 只能暴露“现象”,不能定义“能力边界”。真正的升级风险在主库里:\r\n- 注册/订阅的生命周期管理\r\n- 鉴权参数透传\r\n- 命名空间和分组兼容\r\n- 监听器和重试逻辑\r\n- 元数据和配置中心是否一起受影响\r\n\r\n这些都在 `apache/dubbo-go` 里,不在 samples 里。\r\n\r\n**方案正文**\r\n\r\n### 1. 升级目标版本与范围\r\n先明确目标不是“所有 3.x 都一次性覆盖”,而是“以业务实际准备上线的 Nacos 3.x 小版本为目标,先完成主干兼容,再做版本回归”。\r\n\r\n范围建议分三层:\r\n- 第一层:注册中心 `nacos` 兼容\r\n- 第二层:配置中心 `nacos` 兼容\r\n- 第三层:元数据上报/发现链路兼容\r\n\r\n如果你们当前只用了注册中心,第二层和第三层可以作为后续波次,但必须在方案里显式写明,不要默认跳过。\r\n\r\n### 2. 前置调研与风险确认\r\n这一阶段只做事实确认,不改代码。\r\n\r\n要确认四件事:\r\n- Nacos 3.x 目标版本号\r\n- 是否启用鉴权\r\n- 是否共用数据库\r\n- 是否启用配置中心和 metadata center\r\n\r\n官方文档明确说明:Nacos 3.x server 与 2.x client 是兼容的;同时 Nacos 3.x 的客户端鉴权开关默认是 `false`,但控制台鉴权默认是开启的。也就是说,升级方案不能把“控制台能登录”和“客户端能注册”混为一谈。 \r\n参考:[Nacos 升级手册](https://nacos.io/en/docs/latest/manual/admin/upgrading/),[Nacos 权限校验](https://nacos.io/docs/v3.0/manual/admin/auth/)\r\n\r\n### 3. 主仓改造项\r\n这部分才是方案核心。\r\n\r\n#### 3.1 配置透传与初始化校验\r\n检查并补强 `RegistryConfig` 到 Nacos 客户端的映射,至少覆盖:\r\n- namespace\r\n- username/password\r\n- accessKey/secretKey\r\n- timeout\r\n- group\r\n- registry type\r\n\r\n目标不是简单“能传进去”,而是:\r\n- 参数缺失时有明确报错\r\n- 参数冲突时能在启动期失败\r\n- 不要把认证失败包装成模糊的注册失败\r\n\r\n#### 3.2 注册与订阅生命周期\r\n重点核查 `registry/nacos/registry.go` 里的几个行为:\r\n- 注册后是否有完整注销路径\r\n- 订阅失败后的重试是否会泄露 goroutine\r\n- `Destroy()` 是否会正确关闭监听器、关闭 client、等待退出\r\n- `IsAvailable()` 的缓存逻辑在 Nacos 3.x 下是否会导致假阳性或假阴性\r\n\r\n这部分不一定要改接口,但必须做针对性回归,因为 Nacos 3.x 的连接、心跳、鉴权失败表现,往往会直接暴露在这里。\r\n\r\n#### 3.3 命名空间和分组语义\r\n如果升级涉及 config center,就必须补一段关于 namespace 迁移的说明。Nacos 3.0 对 config namespace 做过兼容和迁移处理,默认存在兼容模式,且关闭后无法再平滑降级。 \r\n这意味着方案里要写清楚:\r\n- 是否允许 `public` 和空 namespace 并存\r\n- 是否要先做 namespace 数据迁移\r\n- 是否允许关闭兼容模式\r\n- 如何验证迁移完成\r\n\r\n参考:[Nacos 升级手册](https://nacos.io/en/docs/next/manual/admin/upgrading/)\r\n\r\n### 4. 数据库与环境准备\r\n这是原方案最容易写虚的地方,我建议写得硬一点。\r\n\r\n#### 4.1 数据库策略\r\n不要把 v2 和 v3 放在同一个数据库实例里做首次验证。建议:\r\n- v2 保持原库,冻结不动\r\n- v3 使用独立数据库或独立备份恢复出来的库\r\n- 首次升级前先做 schema diff\r\n- 先验证升级脚本,再验证业务数据迁移\r\n\r\n如果必须共库,那就必须写清楚:\r\n- 回滚点\r\n- 备份策略\r\n- 恢复步骤\r\n- 哪些表可以回退,哪些不能回退\r\n\r\n#### 4.2 鉴权策略\r\n分成两条线写:\r\n- 控制台鉴权\r\n- 客户端鉴权\r\n\r\n验证时要明确:\r\n- 是否开启客户端鉴权\r\n- `username/password` 是否必须配置\r\n- 未配置时是否应当启动失败\r\n- 密钥和 token secret 是否由谁管理\r\n\r\n不要把“能打开控制台”当成“客户端可用”。\r\n\r\n### 5. 测试矩阵\r\n这部分建议写成验收清单,不要只写“跑 demo”。\r\n\r\n#### 5.1 必测项\r\n- Provider 注册成功\r\n- Consumer 能发现实例\r\n- RPC 调用成功\r\n- 实例心跳稳定\r\n- Nacos 重启后可恢复\r\n- 服务重启后可恢复\r\n- 网络抖动后可恢复\r\n- 鉴权开启时可正常注册/发现\r\n- 鉴权关闭时行为符合预期\r\n- 订阅和反订阅不会泄露资源\r\n\r\n#### 5.2 稳定性项\r\n- 长稳运行至少 24h\r\n- 高并发注册/发现/调用\r\n- 频繁上下线场景\r\n- 重试风暴场景\r\n- 客户端短暂不可达恢复场景\r\n\r\n#### 5.3 回归项\r\n- `dubbo-go-samples` 中所有受 Nacos 影响的 demo\r\n- registry demo\r\n- config center demo\r\n- metadata 相关 demo\r\n- 你们实际业务依赖的最小链路 demo\r\n\r\n### 6. 发布与回滚\r\n这是必须单独成节的内容。\r\n\r\n#### 发布策略\r\n建议分三步:\r\n1. 开发环境验证\r\n2. 测试环境双跑 v2/v3\r\n3. 预发灰度\r\n4. 生产切换\r\n\r\n#### 回滚策略\r\n回滚不能只写“切回 v2”。\r\n要明确:\r\n- 数据库是否可回滚\r\n- 业务配置是否可回滚\r\n- 客户端是否支持双注册\r\n- 配置切换是否只改一个入口\r\n- 回滚后是否要清理 v3 侧数据\r\n\r\n如果数据库已经做了不可逆迁移,那就不能写“秒级回滚”,这会误导评审。\r\n\r\n### 7. 验收标准\r\n这版方案的验收标准我建议直接写成硬条件:\r\n- 主仓中 Nacos 相关链路在 Nacos 3.x 下通过自动化测试\r\n- 注册、发现、调用、订阅、反注册都稳定\r\n- 鉴权配置明确,失败路径可解释\r\n- 数据库迁移步骤可复现\r\n- 回滚路径可执行\r\n- samples 验证结果与主仓结论一致\r\n\r\n**我对这版方案的建议结论**\r\n这次升级的主战场应当是 `apache/dubbo-go`,不是 samples。samples 只能放在最后做“验收场”,不能当成升级起点。真正要把方案写实,就要把“兼容边界、数据库策略、鉴权策略、生命周期、回滚”这五件事写死。",
"createdAt": "2026-05-06T11:22:30Z",
"updatedAt": "2026-05-06T11:22:30Z",
"author": {
"login": "AlexStocks"
},
"replies": []
}
]
},
{
"number": 3342,
"title": "Dubbo-go Metadata Design Spec — 综合审查报告",
"body": "**审查日期**: 2026-05-24 \r\n**审查基准**: dubbo-go-metadata-design-spec-zh.md (61,504 字符, 20 章节) \r\n**对照参考**: Java Dubbo 3.3 源码 (MetadataServiceV2 proto, MetadataInfo, ServiceInstanceHostPortCustomizer)\r\n\r\n---\r\n\r\n## 总体评价\r\n\r\n这是一份**高质量的设计文档**。结构清晰、问题识别准确、实施路径合理。作者对 Java Dubbo 和 dubbo-go 的差异有深入理解,并且明确区分了\"协议兼容性\"和\"实现风格\"的边界。\r\n\r\n但仍存在多个 CRITICAL 级别和 WARNING 级别的问题需要在实施前解决。\r\n\r\n**综合评分**: ★★★☆ (3.5/5) — 方向正确,细节需补强\r\n\r\n---\r\n\r\n## 一、架构师审查 — 关键发现\r\n\r\n### CRITICAL (必须修复)\r\n\r\n#### C-1: ServiceInfo key 格式必须与 Java 字节级对齐\r\n\r\nJava Dubbo 的 ServiceInfo key 格式为 `{group}/{interface}:{version}:{protocol}`。 \r\n方案中提到了 key 格式但未明确规定分隔符和字段顺序。\r\n\r\ndubbo-go 当前已有 `common.ServiceKey(intf, group, version)` 和 `common.MatchKey(serviceKey, protocol)`,生成逻辑接近 Java,但方案没有把这个作为 wire contract 写死。\r\n\r\n**风险**: 如果 Go 使用不同分隔符或字段顺序,Java/Go 之间的 revision 对比永远不匹配,导致消费者持续重新获取元数据。\r\n\r\n**建议**: 在方案中明确定义 key 格式,包括:\r\n- 分隔符 (`/`, `:`)\r\n- 空值处理:group 为空时省略前缀;version 为空或等于 `0.0.0` 时省略版本段\r\n- 字段顺序:group → interface → version → protocol\r\n\r\n**关键实现细节**: 当前 `common.MatchKey(serviceKey, protocol)` 无条件追加 `\":\" + protocol`,当 protocol 为空时会生成尾随冒号(如 `\"group/interface:version:\"`)。Java 的行为是 protocol 非空才追加。设计文档必须明确 Go 实现需与 Java 对齐:**protocol 为空时不追加冒号**,否则空 protocol 边界场景下的 revision 会与 Java 不一致。\r\n\r\n---\r\n\r\n#### C-2: Go map 迭代随机性 — revision 计算实现验收约束\r\n\r\nJava 使用 `TreeMap` 保证迭代顺序确定性。Go 的 `map[string]*ServiceInfo` 迭代顺序是**完全随机的**。\r\n\r\n方案第 8.2 节已正确处理了两层排序:外层 `sort.Strings(keys)` 排序 service keys,`ToDescString()` 内部也使用了 `sortedParamsString(s.Params)` 处理 params map 随机迭代问题,方向是正确的。\r\n\r\n**实现验收约束**: 排序要求不止一层。Java 使用 `TreeMap` / `TreeSet` 保证所有层级确定,Go 实现必须覆盖所有 map 层级,包括 Services、Params、method-level params、exported/subscribed URL sets。\r\n\r\n**建议**: 以下测试用例必须全部覆盖:\r\n- `TestRevision_Deterministic_ServiceInsertionOrder`:相同服务不同插入顺序 → 相同 revision\r\n- `TestRevision_Deterministic_ParamInsertionOrder`:params key/value 顺序不同 → 相同 revision\r\n- `TestRevision_Deterministic_MethodParamInsertionOrder`:method-level params 顺序不同 → 相同 revision\r\n- `TestRevision_JavaGoldenVectors`:同一 metadata,Go/Java revision 完全一致\r\n\r\n---\r\n\r\n#### C-3: Hash 算法必须与 Java 一致\r\n\r\nJava `RevisionResolver.calRevision()` 使用 **MD5**。方案中说用 `revision.Resolve()` 但未指明具体算法。\r\n\r\n**风险**: 如果 Go 用 SHA-256 而 Java 用 MD5,相同元数据会产生不同 revision,导致消费者误判元数据变更。\r\n\r\n**建议**: 这是互操作契约,不是实现偏好,方案中应明确写\"**必须** MD5\"而不是\"建议 MD5\"。完整规格:\r\n\r\n```text\r\nrevision.Resolve 必须等价于 Java Dubbo RevisionResolver.calRevision:\r\n- 输入:app + sorted ServiceInfo.toDescString()\r\n- 算法:MD5\r\n- 输出格式:与 Java MD5Utils.getMd5(metadata) 完全一致\r\n- 空 services:EMPTY_REVISION = \"0\"(见 C-6)\r\n```\r\n\r\n添加跨语言 revision 一致性测试(golden vector 测试)。\r\n\r\n---\r\n\r\n#### C-4: map 并发安全 — 不能返回可变引用\r\n\r\nJava `synchronized` 天然保护了所有访问。Go 的 `RWMutex` 如果只保护 `GetMetadataInfo()` 调用,但返回 `*MetadataInfo` 指针,调用方可以在锁外读写 `Services` map。\r\n\r\n**风险**: Go map 并发读写会 panic。即使有 RWMutex,返回的指针被并发访问仍然崩溃。\r\n\r\n设计文档虽然要求 `MetadataManager` 加 `RWMutex`,也要求 `Clone()` 深拷贝,但同时保留了 `GetMetadataInfo(registryId string) *info.MetadataInfo` 这个返回 live pointer 的 API。Manager 的锁只能保护 map lookup,不能保护返回对象后的访问。\r\n\r\n**建议**:\r\n1. 明确 API 语义分层:\r\n - `GetMetadataInfoSnapshot(registryID string) *info.MetadataInfo`:返回 deep clone,用于发布/cache/consumer 读取\r\n - `MutateMetadataInfo(registryID string, fn func(*info.MetadataInfo) error) error`:受锁保护的写路径\r\n - 原 `GetMetadataInfo` 如需保留兼容,注明\"仅用于兼容旧调用,不应用于新写路径\"\r\n2. `Clone()` 方法必须深度复制所有 map(Services、exported URLs、subscribed URLs)\r\n3. `MetadataInfo.Services` 不应直接暴露可变 map;getters 返回 copy 或只读视图\r\n\r\n---\r\n\r\n#### C-5: 持久化 cache 的 key/format 迁移策略不明确\r\n\r\n方案将 cache key 从 `{revision}` 改为 `{app}:{revision}`,这是正确的设计,但方案未明确持久化 cache 文件的版本化或清理策略。\r\n\r\n当前代码确认:`revisionToMetadata` 是 `map[string]*info.MetadataInfo`(key 只有 revision);`metaCache.Get(revision)` 也只用 revision;`cacheOnce` 用第一个 app 初始化 cache manager。\r\n\r\n**风险**: 如果 dubbo-go 存在 file-based 本地持久化 cache,key 格式变更后旧格式条目可能被新代码误读,导致错误 metadata 复用。进程内内存 cache miss 是正常的升级行为,不是核心风险。\r\n\r\n**建议**:\r\n1. 明确持久化 cache 文件是否存在;如果存在,key 格式变更时需清理旧格式文件或给 storage format 加版本号(方案 §8.2 已提到\"旧 revision cache 和新 revision cache 不能混用\",但未说明具体处理方式)\r\n2. `cacheOnce` 用第一个 app 初始化的问题需要修复:改为 app-neutral 共享 cache 或 per-provider-app cache manager\r\n\r\n### WARNING (强烈建议修复)\r\n\r\n#### W-1: RWMutex 粒度 — 锁竞争问题\r\n\r\n方案提出单个 `MetadataManager` 用一把 RWMutex 保护所有 registry 的 MetadataInfo。\r\n\r\n**问题**: 如果 `calRevision()` 持写锁计算哈希(可能遍历大量服务),会阻塞所有并发读取。多 registry 场景下,一个 registry 的 revision 变更会阻塞其他 registry 的读取。\r\n\r\n**建议**: 考虑按 `registryId` 分片加锁,或使用 `MetadataInfo` 级别的 mutex。\r\n\r\n---\r\n\r\n#### W-2: `updated` 标志的竞态条件\r\n\r\nJava 在 `synchronized` 块内读写 `updated`。Go 如果将 `updated` 作为普通 `bool` 字段,在锁外读取可能读到脏值。\r\n\r\n**建议**: 使用 `atomic.Bool` 或确保所有 `updated` 访问都在锁内。\r\n\r\n---\r\n\r\n#### W-3: extendParams vs instanceParams 的语义未完全明确\r\n\r\nJava MetadataInfo 有 `extendParams`(扩展参数)和 `instanceParams`(实例参数)两个独立 map。\r\n\r\n设计文档 §8.2 已写\"instance-level params 和 service-level revision params 保持分离\",方向正确,但未明确这两个 map 在 Go 侧是否需要字段级等价模型。\r\n\r\n**风险**: 如果 Go 将两者合并,可能丢失 Java wire format 里的 params 分层语义,影响互操作。\r\n\r\n**建议**: 方案应补充说明:\r\n- Go 侧是否需要与 Java `extendParams` / `instanceParams` 字段语义对等\r\n- 这两个 map 是否参与 JSON wire format\r\n- 是否仅作为运行时派生字段,不序列化\r\n\r\n---\r\n\r\n#### W-4: 多协议端点选择优先级规则需量化\r\n\r\n设计文档 §11.4 已写了主地址选择原则(preferred business protocol → 第一个 exported service URL → metadata-service port 兜底),方向正确,但 preferred/default business protocol 的配置来源、协议优先级顺序和 same-protocol multi-port 的 tie-breaker 仍未量化。\r\n\r\n**风险**: \"第一个 exported service URL\"在 Go map 或并发 export 场景里可能不稳定,导致 primary address 非确定性。\r\n\r\n**建议**: 将选择规则写成可测试的确定性规格:\r\n1. 显式配置的 preferred protocol(来自 `dubbo.application.preferred-protocol` 或同等配置)\r\n2. application/default protocol\r\n3. stable sorted business endpoints 中的第一个(排序键:`(protocol priority, host, port, service key)`)\r\n4. 仅当没有 business endpoint 时,使用 metadata-service endpoint\r\n\r\n明确协议优先级顺序(如 tri > dubbo > rest),否则 step 3 的 sort key 无法确定。\r\n\r\n---\r\n\r\n#### W-5: 启动时的 revision 计算防抖(优化项,非第一阶段硬要求)\r\n\r\nJava 的 `synchronized` 天然串行化 revision 计算。Go 的 RWMutex 如果处理不当,50 个服务同时 export 可能触发 50 次 revision 计算。\r\n\r\n设计文档的 PR 5 已将 revision 计算放到 `CalAndGetRevision()`,并用 `updated` 标志避免未变化时重复计算,这已经是基础保护。\r\n\r\n**建议**: 第一阶段不必引入 debounce,以免改变注册时序。应先保证 dirty 标志正确和注册时单点计算;如果 benchmark 显示大量服务 export 时 revision 计算成为瓶颈,再引入批量/防抖机制作为后续优化。\r\n\r\n---\r\n\r\n#### W-6: Provider 侧 MetadataService export failure 处理不明确\r\n\r\n方案第 14 节讨论了 consumer 侧的错误处理,但 provider 侧 MetadataService export failure 的行为策略不够明确。Go 服务端不应在设计文档里承诺 goroutine 自动重启,除非已有 supervisor 模型。\r\n\r\n**建议**: 方案应补充 provider 侧的 fail-safe 规则:\r\n- `local` 模式下,若计划导出 V1 失败,应返回启动错误,或至少不注册 `storage-type=local` 的 instance\r\n- `metadata-service-protocol=tri` 且 V2 导出失败但 V1 成功,capability 只能声明 V1,写 `meta-v=1.0.0`\r\n- V1/V2 全部失败,不能注册 `dubbo.metadata.storage-type=local` 的 provider instance\r\n- `remote` 模式下,本地 MetadataService export failure 不影响启动\r\n\r\n---\r\n\r\n#### W-7: 大规模场景下的内存管理(后续扩展风险)\r\n\r\nMetadataInfo 包含所有服务的完整描述。100+ 服务 x 1000+ 方法 = MB 级元数据。此项不应阻塞 PR 1-3,但需要在方案中有明确的阈值策略。\r\n\r\n**建议**: 第一阶段增加 metadata size warning 阈值,而非实现压缩:\r\n- metadata JSON size > 1 MiB 时 warning\r\n- > 4 MiB 时可配置 fail-fast 或跳过 remote publish\r\n\r\n具体阈值需结合 Nacos/ZK/etcd backend 的 value size 限制评估,适合在 PR 5/6 阶段补充。\r\n\r\n---\r\n\r\n#### W-8: Go nil 安全性\r\n\r\nJava 对 null 处理较宽容(空字符串、空 map)。Go 读 nil map 不 panic,但写 nil map 会 panic,风险主要在 `AddService` / mutation 路径和外部反序列化后的对象初始化。\r\n\r\n**建议**:\r\n1. 所有 MetadataInfo/ServiceInfo 构造函数必须初始化 map 字段\r\n2. 以下测试用例必须覆盖:\r\n - `TestMetadataInfo_ZeroValueSafeRead`\r\n - `TestMetadataInfo_DeserializedNilServices_AddService`\r\n - `TestServiceInfo_NilParams_ToDescString`\r\n - `TestServiceInfo_NilParams_GetMethods`\r\n\r\n---\r\n\r\n#### W-9: EMPTY_REVISION 常量命名未明确\r\n\r\nJava Dubbo 3.3 `RevisionResolver.EMPTY_REVISION` 的值是 `\"0\"`,与设计文档 §8.2 的 `revision=\"0\"` 一致,**值已对齐**。\r\n\r\n**文档缺口**: 方案未显式引用该常量名,读者可能误以为 `\"0\"` 是 dubbo-go 自定义值,或者在实现时随意改为其他哨兵值。\r\n\r\n**建议**: 在设计文档中补充:\r\n```text\r\n空 services 时 revision 返回 RevisionResolver.EMPTY_REVISION,即 \"0\",与 Java Dubbo 3.3 一致。\r\n```\r\n并在代码中定义对应常量,不要直接使用字面量 `\"0\"`。\r\n\r\n---\r\n\r\n#### W-10: `common.MatchKey` 对空 protocol 的行为必须与 Java 对齐\r\n\r\n当前 dubbo-go `common.MatchKey(serviceKey, protocol)` 无条件追加 `\":\" + protocol`,当 protocol 为空时会生成尾随冒号(如 `\"group/interface:version:\"`)。Java 的行为是 protocol 非空才追加冒号。\r\n\r\n**风险**: 边界场景下(protocol 字段为空字符串),Go 生成的 match key 与 Java 不一致,导致 revision 计算偏差。这是 C-1 里\"字节级对齐\"的具体实现要求,需要单独列出以确保实现时不被忽略。\r\n\r\n**建议**: 修改 `MatchKey` 实现,protocol 为空时不追加 `\":\"`,并增加对应边界 case 测试。\r\n\r\n---\r\n\r\n## 二、测试人员审查 — 测试计划缺口\r\n\r\n### 现有测试规范质量评分\r\n\r\n| 维度 | 评分 | 说明 |\r\n|------|------|------|\r\n| 单元测试覆盖 | ★★★ | 基本覆盖核心组件,但缺少并发/边界场景 |\r\n| 集成测试覆盖 | ★★ | 涵盖本地/远程元数据、Java 兼容性,但场景不足 |\r\n| 兼容性测试 | ★★ | 有多协议/多注册中心覆盖,但缺少升级/降级路径 |\r\n| 验收标准可测性 | ★★ | 24 条标准中有模糊项,部分缺少量化指标 |\r\n| 回归保护 | ★ | 仅提及多提供者 URL 生成,覆盖面严重不足 |\r\n\r\n**综合评分**: ★★ (2/5) — 框架存在但存在显著缺口\r\n\r\n### P0 测试缺口 (必须修复)\r\n\r\n| # | 测试项 | 风险 |\r\n|---|--------|------|\r\n| 1 | **MetadataManager 并发安全** (`go test -race`,100 goroutines 并发 Add/Remove/Clone/CalAndGetRevision) | 数据竞争 → panic |\r\n| 2 | **部分 export 失败场景** (V1 成功 V2 失败、V2 成功但 capability 未写入、remote publish 失败) | meta-v 与实际能力不符 |\r\n| 3 | **nil/空 metadata 不 panic、不写 cache** | consumer metadata fetch crash |\r\n| 4 | **Java golden vector**:同一 metadata,Go/Java revision 完全一致 | Java/Go 互操作 revision 永远不匹配 |\r\n| 5 | **Multi-app same revision cache 隔离**:appA:0 与 appB:0 不串 | 跨应用 metadata 错乱 |\r\n\r\n### P1 测试缺口 (重要)\r\n\r\n| # | 测试项 | 风险 |\r\n|---|--------|------|\r\n| 6 | 资源泄漏检测 (goroutine/memory/connection,使用 goleak) | 长期运行 OOM |\r\n| 7 | 缓存 TTL/淘汰策略 | 内存泄漏、过期数据 |\r\n| 8 | 多注册中心完整场景 (故障转移、数据一致性) | 生产部署故障 |\r\n| 9 | 性能基准测试 + CI benchstat 回归 | 无性能 SLA |\r\n| 10 | 升级/降级兼容性测试 (滚动升级、版本共存) | 升级中断服务 |\r\n\r\n### P2 测试缺口 (后续扩展,不应阻塞 phase 1)\r\n\r\n- 灰度发布场景\r\n- 服务治理联动 (路由/限流/熔断)\r\n- 配置热更新\r\n- 1000+ 服务实例压力测试\r\n- 接口级↔应用级动态切换\r\n- 网络分区与 toxiproxy 超时恢复\r\n\r\n### 测试基础设施需求\r\n\r\n| 基础设施 | 用途 |\r\n|----------|------|\r\n| 嵌入式 Nacos / testcontainers-go | 集成测试注册中心 |\r\n| Mock Metadata Report | 单元测试 + 故障注入 |\r\n| Java Dubbo Docker 容器 | 互操作性双向测试 |\r\n| toxiproxy | 网络故障注入 |\r\n| 独立 benchmark CI runner | 性能回归检测 |\r\n\r\n---\r\n\r\n## 三、与 Java Dubbo 3.3 源码对比验证\r\n\r\n### 已验证对齐的项 ✓\r\n\r\n| 项 | Java Dubbo 3.3 | 方案 | 状态 |\r\n|----|----------------|------|------|\r\n| MetadataServiceV2 proto | GetMetadataInfo + GetOpenAPIInfo | 对齐 (PR2) | ✓ |\r\n| ServiceInfoV2.Port | int32 port 字段存在 | 保留 Port 字段 | ✓ |\r\n| Revision 计算 | app + sorted services + toDescString | 方案第 8.2 节 | ✓ (方向正确) |\r\n| calAndGetRevision | synchronized + updated 标志 | 方案第 8.2 节 | ✓ (概念对齐) |\r\n| EMPTY_REVISION | Java `RevisionResolver.EMPTY_REVISION = \"0\"` | 方案用 `\"0\"`,值已对齐;需补充常量名引用 | ✓(需澄清命名) |\r\n| ServiceInstance 主地址 | preferred protocol endpoint | 方案第 11.4 节 | ✓ (方向正确) |\r\n| 日志格式 | [METADATA_REGISTER] 前缀 | 方案第 15 节 | ✓ |\r\n\r\n### 需要对齐但方案未明确的项 ⚠️\r\n\r\n| 项 | Java Dubbo 3.3 | 方案 | 状态 |\r\n|----|----------------|------|------|\r\n| ServiceInfo key 格式 | `{group}/{interface}:{version}:{protocol}`,空值省略 | 未明确分隔符和空值规则 | ⚠️ C-1 |\r\n| `MatchKey` 空 protocol | protocol 为空时不追加冒号 | 当前 Go 实现无条件追加 | ⚠️ W-10 |\r\n| extendParams/instanceParams | 两个独立 map | 未说明 Go 侧是否需要字段级等价 | ⚠️ W-3 |\r\n| MetadataParamsFilter | SPI 过滤运行时参数 | 提到轻量过滤但未定义 SPI | ⚠️ |\r\n| EMPTY 常量命名 | `RevisionResolver.EMPTY_REVISION` | 值 `\"0\"` 已对齐,但未引用常量名 | ⚠️ W-9 |\r\n| rawMetadataInfo | JSON 缓存与 revision 绑定 | 未提及 | ⚠️ |\r\n\r\n---\r\n\r\n## 四、方案优点 (值得肯定的设计决策)\r\n\r\n1. **Go-first 约束清晰** — 明确拒绝照搬 Java 架构 (ApplicationModel/ConfigManager),保持 Go 的包结构\r\n2. **Strategy + Capability 分离** — \"计划导出什么\" vs \"实际导出了什么\" 分离,这是修复 meta-v 问题的关键\r\n3. **meta-v 硬规则** — \"meta-v=2.0.0 only if V2 actually exported\" 是正确的核心原则\r\n4. **6 个 PR 的分步策略** — 每个 PR 范围可控,风险隔离好\r\n5. **双模型审查意识** — 方案本身就体现了区分 wire contract 和实现的理念\r\n6. **错误处理原则** — 第 14 节明确了 \"metadata 获取失败不 panic\" 的原则\r\n7. **24 条验收标准** — 虽然部分需要量化,但覆盖面是充分的\r\n\r\n---\r\n\r\n## 五、实施建议优先级\r\n\r\n### Phase 0: 方案修订 (在开始编码前)\r\n\r\n1. 明确 ServiceInfo key/match key 格式,包括空值规则和 `common.MatchKey` 空 protocol 修复 (C-1, W-10)\r\n2. 明确 revision 哈希算法**必须 MD5**,补充完整计算规格 (C-3)\r\n3. 补充 MetadataInfo 并发安全 API 语义分层,明确哪些路径必须用 snapshot (C-4)\r\n4. 明确持久化 cache key/format 迁移策略,`cacheOnce` 作用域修复 (C-5)\r\n5. 补充 EMPTY_REVISION 常量名引用 (W-9)\r\n6. 量化所有验收标准中的模糊项\r\n\r\n### Phase 1: PR 1-2 (低风险基础设施)\r\n\r\n按方案原文执行 PR 1 (配置验证) 和 PR 2 (proto 对齐)。这两步风险低,可以先行。\r\n\r\n### Phase 2: PR 3-5 (核心变更,需先补测试)\r\n\r\n在执行 PR 3-5 之前,先补充 P0 测试项。核心变更需要并发测试和失败场景测试保护。\r\n\r\n### Phase 3: PR 6 (注册语义变更,最后做)\r\n\r\nOne-instance registration 是最大风险的变更,必须在前面所有 PR 稳定且有回归测试保护后再做。\r\n\r\n---\r\n\r\n## 六、总结\r\n\r\n| 维度 | 评分 | 说明 |\r\n|------|------|------|\r\n| 问题识别 | ★★★★ | 准确识别了 meta-v、revision、cache key 等核心问题 |\r\n| 架构设计 | ★★★☆ | Go-first 方向正确,但并发安全和迁移路径需补强 |\r\n| Java 兼容性 | ★★★☆ | 大部分对齐,key 格式和 hash 算法需明确 |\r\n| 测试计划 | ★★ | 框架存在,但并发/故障/性能测试严重缺失 |\r\n| 实施计划 | ★★★★ | 6 PR 分步合理,风险隔离好 |\r\n| **总体** | **★★★☆** | **方向正确、结构清晰,细节需补强** |\r\n\r\n**核心建议**: 在开始编码前,先修订方案中的 CRITICAL 问题(重点是 revision wire contract、并发安全 API 语义、持久化 cache 迁移),补充 P0 测试基础设施,再按 PR 1→2→3→4→5→6 的顺序执行。PR 6 (one-instance registration) 应作为最后的收敛步骤,不要提前。",
"url": "https://github.com/apache/dubbo-go/discussions/3342",
"createdAt": "2026-05-24T05:48:22Z",
"updatedAt": "2026-06-25T09:08:40Z",
"closed": true,
"closedAt": "2026-06-25T09:08:40Z",
"isAnswered": null,
"author": {
"login": "AlexStocks"
},
"category": {
"name": "General"
},
"answer": null,
"comments": [
{
"id": "DC_kwDOCJS8R84BA_uh",
"url": "https://github.com/apache/dubbo-go/discussions/3342#discussioncomment-17038241",
"body": "This evaluation is related to the article dubbo-go-metadata-design-spec-zh.version-0\r\n\r\n# Dubbo-go Metadata 设计方案\r\n\r\n> 目标仓库:[apache/dubbo-go](https://github.com/apache/dubbo-go) \r\n> 基准分支:`develop` \r\n> 相关讨论:[apache/dubbo-go discussions #3300](https://github.com/apache/dubbo-go/discussions/3300) \r\n> 相关问题示例:\r\n>\r\n> - [#2939: MetadataService V1 exported but meta-v=2.0.0](https://github.com/apache/dubbo-go/issues/2939)\r\n> - [#3188: dubbo-go metadata report discussion](https://github.com/apache/dubbo-go/issues/3188)\r\n> - [#3302: Nacos multi-provider directory only exposes one instance](https://github.com/apache/dubbo-go/issues/3302)\r\n\r\n## 1. 背景\r\n\r\nDubbo 3 正在逐步把服务发现模型从 **接口级注册** 演进到 **应用级注册**。\r\n\r\n在应用级注册模式下,注册中心应该只保存轻量的应用实例信息。完整的服务元数据,包括导出的服务、协议、端口、方法、参数和服务定义,应通过 metadata 系统获取。\r\n\r\ndubbo-go 已经具备 metadata 基础能力:\r\n\r\n- `metadata/metadata_service.go`\r\n - `MetadataService`\r\n - `DefaultMetadataService`\r\n - MetadataService V1 导出\r\n - MetadataService V2 导出\r\n- `metadata/info/metadata_info.go`\r\n - `MetadataInfo`\r\n - `ServiceInfo`\r\n- `metadata/client.go`\r\n - 本地 metadata RPC 获取\r\n - 远程 metadata report 获取\r\n- `registry/servicediscovery/service_discovery_registry.go`\r\n - provider 侧服务发现注册\r\n- `registry/servicediscovery/service_instances_changed_listener_impl.go`\r\n - consumer 侧实例变更处理\r\n - 按 revision 获取 metadata\r\n - 生成服务 URL\r\n\r\n但是当前实现仍然存在几个问题:\r\n\r\n1. MetadataService V1 / V2 的导出策略还不够显式。\r\n2. `meta-v` 可能和实际导出的 MetadataService 版本不一致。\r\n3. `metadata-service-protocol` 已经存在于配置中,但不是所有 metadata 初始化路径都会把它传入 metadata options。它的默认行为、测试,以及它和 MetadataService V1/V2 导出策略之间的关系,都需要明确。\r\n4. `MetadataInfo` revision 计算还没有完全对齐 Java Dubbo。\r\n5. consumer 侧 metadata cache 只使用 `revision`,可能导致不同应用之间互相冲突。\r\n6. `develop` 上已经增强了多 provider URL 生成能力,但应用级实例语义、endpoint metadata 和回归覆盖仍需收敛。\r\n7. dubbo-go 的 MetadataServiceV2 proto 落后于当前 Java Dubbo 契约。\r\n\r\n本设计的目标是让 dubbo-go metadata 机制具备更好的兼容性、确定性和生产可用性。\r\n\r\n---\r\n\r\n## 2. 目标\r\n\r\n### 2.1 功能目标\r\n\r\n1. 支持 provider 侧 MetadataService V1 和 V2 导出。\r\n2. 支持 `local` 和 `remote` 两种 metadata 存储模式。\r\n3. 支持将应用 metadata 发布到 metadata report。\r\n4. 支持 consumer 按应用实例 revision 获取 metadata。\r\n5. 支持 Java Dubbo 3.3 consumer -> dubbo-go provider 的 metadata 互操作。\r\n6. 支持 dubbo-go consumer -> Java Dubbo 3.3 provider 的 metadata 互操作。\r\n7. 支持同一应用下的多个 provider 实例。\r\n8. 支持同一应用实例下的多个协议 endpoint。\r\n9. 确保 `meta-v` 严格匹配实际导出的 MetadataService 版本。\r\n10. 避免 metadata 获取失败导致 consumer panic。\r\n\r\n### 2.2 非目标\r\n\r\n第一阶段不需要实现完整 OpenAPI 生成。\r\n\r\n但是 MetadataServiceV2 proto 和服务描述应该对齐 Java Dubbo,并包含 `GetOpenAPIInfo`。该方法第一阶段可以返回空定义。\r\n\r\n---\r\n\r\n## 3. 当前状态\r\n\r\n### 3.1 MetadataInfo\r\n\r\n当前 dubbo-go 有一个类似如下的 `MetadataInfo` 模型:\r\n\r\n```go\r\ntype MetadataInfo struct {\r\n App string\r\n Revision string\r\n Tag string\r\n Services map[string]*ServiceInfo\r\n\r\n exportedServiceURLs map[string][]*common.URL\r\n subscribedServiceURLs map[string][]*common.URL\r\n}\r\n```\r\n\r\n`MetadataInfo` 负责记录当前应用导出和订阅的服务。\r\n\r\n主要文件:\r\n\r\n```text\r\nmetadata/info/metadata_info.go\r\n```\r\n\r\n### 3.2 MetadataService\r\n\r\n当前 dubbo-go 有一个类似如下的 `MetadataService` 接口:\r\n\r\n```go\r\ntype MetadataService interface {\r\n GetExportedURLs(serviceInterface string, group string, version string, protocol string) ([]*common.URL, error)\r\n GetExportedServiceURLs() ([]*common.URL, error)\r\n GetSubscribedURLs() ([]*common.URL, error)\r\n Version() (string, error)\r\n GetMetadataInfo(revision string) (*info.MetadataInfo, error)\r\n GetMetadataServiceURL() (*common.URL, error)\r\n}\r\n```\r\n\r\n主要文件:\r\n\r\n```text\r\nmetadata/metadata_service.go\r\n```\r\n\r\n### 3.3 MetadataService V2 Proto\r\n\r\n当前 dubbo-go V2 proto 只包含:\r\n\r\n```proto\r\nservice MetadataServiceV2 {\r\n rpc GetMetadataInfo(MetadataRequest) returns (MetadataInfoV2);\r\n}\r\n```\r\n\r\n主要文件:\r\n\r\n```text\r\nmetadata/triple_api/proto/metadata_service_v2.proto\r\n```\r\n\r\n当前 Java Dubbo V2 proto 同时包含:\r\n\r\n```proto\r\nservice MetadataServiceV2 {\r\n rpc GetMetadataInfo(MetadataRequest) returns (MetadataInfoV2);\r\n rpc GetOpenAPIInfo(OpenAPIRequest) returns (OpenAPIInfo);\r\n}\r\n```\r\n\r\n因此,dubbo-go 应该对齐 Java Dubbo 的 V2 proto 契约。\r\n\r\n### 3.4 ServiceInstance Metadata Keys\r\n\r\ndubbo-go 已经定义了重要的 metadata 常量:\r\n\r\n```go\r\nExportedServicesRevisionPropertyName = \"dubbo.metadata.revision\"\r\nSubscribedServicesRevisionPropertyName = \"dubbo.subscribed-services.revision\"\r\nMetadataStorageTypePropertyName = \"dubbo.metadata.storage-type\"\r\nMetadataServiceURLParamsPropertyName = \"dubbo.metadata-service.url-params\"\r\nMetadataServiceURLsPropertyName = \"dubbo.metadata-service.urls\"\r\nMetadataVersion = \"meta-v\"\r\nServiceInstanceEndpoints = \"dubbo.endpoints\"\r\n```\r\n\r\n主要文件:\r\n\r\n```text\r\ncommon/constant/key.go\r\n```\r\n\r\n这些 key 和 Java Dubbo 的服务实例 metadata 模型整体对齐。\r\n\r\n---\r\n\r\n## 4. 设计概览\r\n\r\n### 4.1 Dubbo-go 适配边界\r\n\r\nJava Dubbo 应该被视为 wire format、metadata key、MetadataService V2 proto、revision 语义和应用级服务发现行为的互操作契约。不应该把 Java Dubbo 的实现架构直接复制到 dubbo-go。\r\n\r\ndubbo-go 实现应保持以下 Go-first 约束:\r\n\r\n1. metadata 状态继续保留在现有 `metadata` package 中,按 `registryId` 组织,并通过同步和快照 helper 增强。不要引入 Java 风格的 `ApplicationModel` 或 `ConfigManager` 层。\r\n2. MetadataService 导出策略和导出能力应实现为当前 metadata/export 路径内的小型 Go struct 或 resolver function。除非现有包结构自然需要,否则不要创建 Java 风格的 exporter framework。\r\n3. metadata report 集成继续通过现有 `metadata/report.MetadataReport` 接口完成,并把选中的 report 传递到 registry / service discovery 路径中。consumer 路径不要依赖全局第一个 report。\r\n4. one-instance registration 应作为协议、metadata fetch、cache 和 mapping 修复都有测试覆盖之后的最终收敛步骤。第一阶段实现可以在这些前置条件稳定之前保留当前 per-exported-URL registration 作为兼容桥。\r\n5. 只有当某个 URL 参数确实是实例级,并且在所有导出服务上只有一个一致值时,才把它提升到 ServiceInstance metadata。如果不同服务值不同,应保留在 `ServiceInfo.Params` 中,并在 consumer 侧从服务 metadata 恢复。\r\n6. 除非 Java 兼容性要求修改 wire contract,否则保留当前 dubbo-go 默认行为。例如第一阶段继续让空 `metadata-service-protocol` 解析为 `dubbo`,而不是静默加入 Java 风格的 tri 自动探测。\r\n\r\n简而言之:\r\n\r\n```text\r\n用 Java Dubbo 对齐协议和 metadata 兼容性。\r\n用 dubbo-go 现有 metadata、registry、report package 边界落地实现。\r\n```\r\n\r\n### 4.2 流程\r\n\r\nmetadata 流程应为:\r\n\r\n```text\r\nProvider Service Export\r\n |\r\n v\r\nMetadataInfo Manager\r\n |\r\n +--------------------+\r\n | |\r\n v v\r\nLocal MetadataService Remote MetadataReport\r\nV1 / V2 Nacos / ZK / etcd\r\n | |\r\n +---------+----------+\r\n |\r\n v\r\nServiceInstance Metadata\r\nrevision / storage-type / meta-v / url-params / endpoints\r\n |\r\n v\r\nConsumer ServiceInstancesChangedListener\r\n |\r\n v\r\nFetch Metadata by revision\r\n |\r\n v\r\nConvert ServiceInfo to provider URLs\r\n |\r\n v\r\nNotify Registry Directory\r\n```\r\n\r\n### 4.3 核心原则\r\n\r\n1. 注册中心里的实例 metadata 应保持轻量。\r\n2. 完整服务信息应存储在 `MetadataInfo` 中。\r\n3. consumer 应使用 `revision` 判断是否需要再次获取 metadata。\r\n4. `local` 模式下,consumer 通过 provider MetadataService RPC 获取 metadata。\r\n5. `remote` 模式下,consumer 从 metadata report 获取 metadata。\r\n6. `meta-v` 必须匹配实际导出的 MetadataService 版本。\r\n\r\n---\r\n\r\n## 5. Metadata 存储模式\r\n\r\n### 5.1 Local 模式\r\n\r\n配置:\r\n\r\n```yaml\r\ndubbo:\r\n application:\r\n metadata-type: local\r\n```\r\n\r\n行为:\r\n\r\n1. Provider 导出本地 MetadataService。\r\n2. Provider 将以下 key 写入服务实例 metadata:\r\n - `dubbo.metadata.storage-type=local`\r\n - `dubbo.metadata.revision={revision}`\r\n - `dubbo.endpoints=[...]`\r\n - `dubbo.metadata-service.url-params={...}`\r\n - `meta-v=1.0.0` 或 `meta-v=2.0.0`\r\n - 可选写入 `dubbo.metadata-service.urls=[...]`,仅用于需要完整 metadata service URL 的兼容场景\r\n3. Consumer 收到服务实例事件。\r\n4. Consumer 根据实例 metadata 构造 MetadataService URL。\r\n5. Consumer 调用 MetadataService RPC 获取完整 `MetadataInfo`。\r\n\r\n### 5.2 Remote 模式\r\n\r\n配置:\r\n\r\n```yaml\r\ndubbo:\r\n application:\r\n metadata-type: remote\r\n\r\n metadata-report:\r\n protocol: nacos\r\n address: 127.0.0.1:8848\r\n```\r\n\r\n行为:\r\n\r\n1. Provider 不需要暴露本地 MetadataService。\r\n2. Provider 将 `MetadataInfo` 发布到 metadata report。\r\n3. Provider 将以下 key 写入服务实例 metadata:\r\n - `dubbo.metadata.storage-type=remote`\r\n - `dubbo.metadata.revision={revision}`\r\n - `dubbo.endpoints=[...]`\r\n4. Consumer 通过 `app + revision` 从 metadata report 获取 `MetadataInfo`。\r\n\r\n主要文件:\r\n\r\n```text\r\nmetadata/report_instance.go\r\nmetadata/client.go\r\n```\r\n\r\n---\r\n\r\n## 6. MetadataService 版本策略\r\n\r\n### 6.1 问题\r\n\r\n一个已知兼容性问题是:\r\n\r\n```text\r\ninstance metadata:\r\n meta-v = 2.0.0\r\n\r\nprovider actually exported:\r\n org.apache.dubbo.metadata.MetadataService, version=1.0.0\r\n```\r\n\r\n这种情况下,Java Dubbo 3.x consumer 可能会尝试调用:\r\n\r\n```text\r\norg.apache.dubbo.metadata.MetadataServiceV2:2.0.0\r\n```\r\n\r\n但 dubbo-go provider 实际只导出了 MetadataService V1,可能出现类似错误:\r\n\r\n```text\r\ndon't have this exporter, key: {app}/org.apache.dubbo.metadata.MetadataServiceV2:2.0.0\r\n```\r\n\r\n因此,`meta-v` 不能只从业务协议或 endpoint 信息推断,必须来自实际 MetadataService 导出结果。\r\n\r\n### 6.2 Strategy 和 Capability 模型\r\n\r\n不要把期望导出的行为和实际导出的能力混在一起。\r\n\r\n`MetadataServiceExportStrategy` 表示 dubbo-go 计划导出什么。它来自:\r\n\r\n- `metadata-type`\r\n- `metadata-service-protocol`\r\n- 默认协议解析\r\n\r\n```go\r\ntype MetadataServiceExportStrategy struct {\r\n Protocol string\r\n ExportV1 bool\r\n ExportV2 bool\r\n}\r\n```\r\n\r\n建议策略规则,以及请求的导出全部成功时预期的 metadata version:\r\n\r\n| metadata-type | metadata-service-protocol | planned Export V1 | planned Export V2 | meta-v from capability |\r\n| ------------- | ------------------------- | ----------------: | ----------------: | ---------------------- |\r\n| local | dubbo | yes | no | 1.0.0 |\r\n| local | tri | yes | yes | 2.0.0 |\r\n| remote | any | no | no | not required |\r\n| local | empty | yes | no | 1.0.0 |\r\n\r\n导出前,strategy 必须 normalize 并校验 `metadata-service-protocol`:\r\n\r\n1. 空值保持当前 dubbo-go 默认行为,解析为 `dubbo`。\r\n2. `dubbo` 只导出 MetadataService V1。\r\n3. `tri` 导出 MetadataService V1 + V2。\r\n4. 任何其他显式配置的值都必须配置校验失败。不能把它隐式当成 triple,也不应该静默 fallback 到 `dubbo`,否则会隐藏拼写错误并产生误导性的 metadata capability。\r\n\r\n当前 dubbo-go 需要修复的实现细节:`metadata.NewOptions()` 默认 protocol 是 `dubbo`,但调用 `WithMetadataProtocol(\"\")` 会把这个默认值覆盖成空字符串。由于当前 exporter 把非 `dubbo` 当成 triple,空 protocol 可能意外导出 V1 + V2。option 层或 strategy resolver 必须在导出前 normalize 空值。\r\n\r\nV2-only metadata export 不是 dubbo-go 现有配置,第一阶段不应引入。Java Dubbo 有 V2-only metadata export 逻辑,但 dubbo-go phase 1 应使用保守兼容策略:\r\n\r\n```text\r\nlocal + tri 同时导出 V1 和 V2。\r\n只有 V2 实际导出成功时才声明 V2。\r\n```\r\n\r\n第一阶段中,空 `metadata-service-protocol` 应保持当前 dubbo-go 默认行为,解析为 `dubbo` / V1。Java Dubbo 可以从已配置的业务协议自动探测 triple,但 dubbo-go 如果要加入同样的自动探测,应作为单独的兼容性变更,并配套显式测试。\r\n\r\n如果社区后续需要 V2-only export,应作为单独的兼容性决策提出。\r\n\r\n`MetadataServiceExportCapability` 表示实际导出了什么。只有 exporter 创建成功之后才写入:\r\n\r\n```go\r\ntype MetadataServiceExportCapability struct {\r\n Protocol string\r\n\r\n V1Exported bool\r\n V1URL *common.URL\r\n\r\n V2Exported bool\r\n V2URL *common.URL\r\n}\r\n```\r\n\r\n这不需要新框架。在 dubbo-go phase 1 中,capability 可以放在现有 `metadata` package 中,靠近 `serviceExporter`;由 `exportDubbo`、`exportTripleV1` 和 `exportV2` 设置;再由当前负责写 `meta-v` 的 ServiceInstance customizer 读取。\r\n\r\n硬规则:\r\n\r\n```text\r\nmeta-v=2.0.0 only if MetadataServiceV2 is actually exported and reachable.\r\n```\r\n\r\n实现不应只从 `dubbo.metadata-service.url-params` 推断 `meta-v`。应在导出完成后根据 export capability 解析:\r\n\r\n```go\r\nfunc ResolveMetadataVersion(cap MetadataServiceExportCapability) string {\r\n if cap.V2Exported && cap.V2URL != nil {\r\n return constant.MetadataServiceV2Version\r\n }\r\n if cap.V1Exported && cap.V1URL != nil {\r\n return constant.MetadataServiceV1Version\r\n }\r\n return \"\"\r\n}\r\n```\r\n\r\n如果某个协议导出路径目前无法返回 error,导出代码仍然应该只在 exporter 对象创建成功后记录 capability。V2 导出失败或被跳过时,绝不能发布 `meta-v=2.0.0`。\r\n\r\n---\r\n\r\n## 7. 配置设计\r\n\r\n当前 `ApplicationConfig` 已经有类似字段:\r\n\r\n```go\r\nMetadataType string\r\nMetadataServicePort string\r\nMetadataServiceProtocol string\r\n```\r\n\r\n主要文件:\r\n\r\n```text\r\nglobal/application_config.go\r\nconfig/application_config.go\r\n```\r\n\r\n当前 `develop` 有多个 metadata 初始化路径。`server.go` 在 server startup 期间已经把 `Application.MetadataServiceProtocol` 传给 metadata options,但 `config/metadata_config.go` 当前还没有这么做。需要更新它,确保基于 config 的启动路径使用同一个 protocol 值。\r\n\r\n当前预期初始化形态:\r\n\r\n```go\r\nfunc initMetadata(rc *RootConfig) error {\r\n opts := metadata.NewOptions(\r\n metadata.WithAppName(rc.Application.Name),\r\n metadata.WithMetadataType(rc.Application.MetadataType),\r\n metadata.WithPort(getMetadataPort(rc)),\r\n metadata.WithMetadataProtocol(rc.Application.MetadataServiceProtocol),\r\n )\r\n return opts.Init()\r\n}\r\n```\r\n\r\n第一阶段最小改动是打通并测试所有活跃 metadata 初始化路径,明确默认行为,并在 `metadata-service-protocol` 为空时保持当前行为。基于 `rc.Protocols` 的协议自动探测可以后续再加,但必须有显式兼容性测试覆盖。\r\n\r\n这必须在依赖后续 server startup 路径之前修复,因为当前 dubbo-go metadata export 被 package-level `exportOnce` 保护。第一次 `Options.Init()` 调用会生效;如果第一次调用没有传入 `MetadataServiceProtocol`,后续即使传入 `tri` 也不会重新导出 MetadataServiceV2。\r\n\r\nMetadataService port 解析也应该感知 protocol。Java Dubbo 的内部 metadata service builder 会先使用显式配置的 metadata service port,然后从选中协议的运行中 server 或 protocol config 获取端口,最后 fallback 到随机端口。Dubbo-go 应保持同样的优先级语义,但不要引入 startup-order coupling:\r\n\r\n1. 如果配置了 `metadata-service-port`,使用它。\r\n2. 如果 `metadata-service-protocol=tri` 且没有配置 metadata service port,优先使用 `RootConfig.Protocols` 中配置的 tri protocol port;只有在不改变启动顺序、不制造 import cycle 的前提下,才使用已经可用的 running tri server port。\r\n3. 如果 `metadata-service-protocol=dubbo` 或为空,保留当前 dubbo/default protocol fallback。\r\n4. 如果没有匹配的 protocol port,使用随机端口并清晰记录日志。\r\n5. 不要把这个 metadata service port 用作应用实例 primary port;primary instance port 仍然从业务 endpoints 中选择。\r\n\r\n建议用户配置:\r\n\r\n```yaml\r\ndubbo:\r\n application:\r\n name: demo-provider\r\n metadata-type: local\r\n metadata-service-protocol: tri\r\n metadata-service-port: 20881\r\n\r\n protocols:\r\n tri:\r\n name: tri\r\n port: 50051\r\n\r\n registries:\r\n nacos:\r\n protocol: nacos\r\n address: 127.0.0.1:8848\r\n registry-type: service\r\n```\r\n\r\n主要更新文件:\r\n\r\n```text\r\nconfig/metadata_config.go\r\nmetadata/options.go\r\nserver/server.go\r\n```\r\n\r\n---\r\n\r\n## 8. MetadataInfo 设计\r\n\r\n### 8.1 增加线程安全\r\n\r\n当前 metadata 使用全局 map,应通过 manager 封装。\r\n\r\n建议模型:\r\n\r\n```go\r\ntype MetadataManager struct {\r\n mu sync.RWMutex\r\n infos map[string]*info.MetadataInfo\r\n}\r\n```\r\n\r\n保持现有 package-level API 兼容,并增加 service unexport / unsubscribe 需要的缺失 remove helper:\r\n\r\n```go\r\nfunc GetMetadataInfo(registryId string) *info.MetadataInfo\r\nfunc AddService(registryId string, url *common.URL)\r\nfunc RemoveService(registryId string, url *common.URL)\r\nfunc AddSubscribeURL(registryId string, url *common.URL)\r\nfunc RemoveSubscribeURL(registryId string, url *common.URL)\r\n```\r\n\r\n`MetadataInfo` 还应暴露不可变发布快照 / deep copy helper:\r\n\r\n```go\r\nfunc (m *MetadataInfo) Clone() *MetadataInfo\r\n```\r\n\r\nclone 必须深度复制 `App`、`Revision`、`Tag`、`Services`、exported service URLs 和 subscribed service URLs,确保发布 remote metadata 或写入 consumer cache 后,不会观察到 provider live metadata object 后续的原地 mutation。\r\n\r\n主要文件:\r\n\r\n```text\r\nmetadata/metadata.go\r\nmetadata/info/metadata_info.go\r\n```\r\n\r\n### 8.2 Revision 计算\r\n\r\nRevision 计算应迁移到 `MetadataInfo`。\r\n\r\n建议 API:\r\n\r\n```go\r\nfunc (m *MetadataInfo) CalAndGetRevision() string {\r\n m.mu.Lock()\r\n defer m.mu.Unlock()\r\n\r\n if m.Revision != \"\" && !m.updated {\r\n return m.Revision\r\n }\r\n\r\n if len(m.Services) == 0 {\r\n m.Revision = \"0\"\r\n m.updated = false\r\n return m.Revision\r\n }\r\n\r\n m.Revision = m.calRevisionLocked()\r\n m.updated = false\r\n return m.Revision\r\n}\r\n```\r\n\r\n建议确定性计算方式:\r\n\r\n```go\r\nfunc (m *MetadataInfo) calRevisionLocked() string {\r\n keys := make([]string, 0, len(m.Services))\r\n for key := range m.Services {\r\n keys = append(keys, key)\r\n }\r\n sort.Strings(keys)\r\n\r\n var builder strings.Builder\r\n builder.WriteString(m.App)\r\n\r\n for _, key := range keys {\r\n builder.WriteString(m.Services[key].ToDescString())\r\n }\r\n\r\n return revision.Resolve(builder.String())\r\n}\r\n```\r\n\r\n`ServiceInfo.ToDescString()`:\r\n\r\n```go\r\nfunc (s *ServiceInfo) ToDescString() string {\r\n return s.GetMatchKey() +\r\n strconv.Itoa(s.Port) +\r\n s.Path +\r\n sortedParamsString(s.Params)\r\n}\r\n```\r\n\r\n只有稳定的服务语义应参与 revision。timestamp、进程本地地址等 runtime-only 或 noisy value,以及不会改变可调用服务行为的其他值,必须排除。\r\n\r\n不要直接把当前 dubbo-go `IncludeKeys` 当成最终 revision 参数集合。现有集合包含 `timestamp` 等值,它们对 URL metadata 有用,但对稳定服务 revision 来说过于 noisy。\r\n\r\n对 dubbo-go 来说,第一阶段先在 `metadata/info` 附近实现一个小型 internal filter function 或静态 include/exclude table,不要新增 Java 风格 SPI:\r\n\r\n1. 为 revision input 定义显式 service metadata 参数过滤函数。\r\n2. 只有当 service-level params 和 method-level params 会影响可调用服务语义时,才把它们纳入 revision。\r\n3. 排除 timestamp、pid、bind address、generated local address 等 runtime-only params 和其他进程本地值。\r\n4. instance-level params 和 service-level revision params 保持分离。\r\n5. 只有当 dubbo-go 有明确用例,并且有第三方定制测试覆盖时,后续再引入扩展 hook。\r\n\r\n这更接近 Java Dubbo 当前 `MetadataInfo.calRevision()` 的设计,即 revision 基于:\r\n\r\n```text\r\napp + sorted service desc strings\r\n```\r\n\r\n修改 revision algorithm 会影响 cache。旧 revision cache 和新 revision cache 不能混用。实现上应在 algorithm 变化时清理本地 metadata cache,或给 cache key/storage format 加版本,避免意外复用旧 revision entry。\r\n\r\n主要更新文件:\r\n\r\n```text\r\nmetadata/info/metadata_info.go\r\nregistry/servicediscovery/customizer/service_revision_customizer.go\r\n```\r\n\r\n---\r\n\r\n## 9. MetadataService V1 / V2 导出\r\n\r\n### 9.1 MetadataService V1\r\n\r\n服务名:\r\n\r\n```text\r\norg.apache.dubbo.metadata.MetadataService\r\n```\r\n\r\n版本:\r\n\r\n```text\r\n1.0.0\r\n```\r\n\r\n用途:\r\n\r\n- 保留 MetadataService V1 作为 legacy 和迁移 fallback。\r\n- V2 不可用时,支持 dubbo protocol metadata service。\r\n- 避免破坏仍依赖 V1 metadata 调用的现有 dubbo-go 用户。\r\n\r\nDubbo 2.7 兼容性不是本工作的主要设计目标。主要目标应是 Java Dubbo 3.3 和当前 dubbo-go `develop`。V1 应作为低成本 fallback 保留,但第一阶段不应增加 2.7 专属行为,也不应把它作为硬性验收要求。\r\n\r\n### 9.2 MetadataService V2\r\n\r\n服务名:\r\n\r\n```text\r\norg.apache.dubbo.metadata.MetadataServiceV2\r\n```\r\n\r\n版本:\r\n\r\n```text\r\n2.0.0\r\n```\r\n\r\n协议:\r\n\r\n```text\r\ntri\r\n```\r\n\r\n必需方法:\r\n\r\n```text\r\nGetMetadataInfo\r\nGetOpenAPIInfo\r\n```\r\n\r\n建议第一阶段 `GetOpenAPIInfo` 实现:\r\n\r\n```go\r\nfunc (m *MetadataServiceV2) GetOpenAPIInfo(\r\n ctx context.Context,\r\n req *tripleapi.OpenAPIRequest,\r\n) (*tripleapi.OpenAPIInfo, error) {\r\n return &tripleapi.OpenAPIInfo{Definition: \"\"}, nil\r\n}\r\n```\r\n\r\n主要更新文件:\r\n\r\n```text\r\nmetadata/triple_api/proto/metadata_service_v2.proto\r\nmetadata/metadata_service.go\r\n```\r\n\r\nMetadataInfo conversion 必须在两个方向都保留 `ServiceInfo.Port`。\r\n\r\nProvider 侧 conversion:\r\n\r\n```go\r\nfunc convertV2(serviceInfos map[string]*info.ServiceInfo) map[string]*tripleapi.ServiceInfoV2 {\r\n serviceInfoV2s := make(map[string]*tripleapi.ServiceInfoV2, len(serviceInfos))\r\n for key, serviceInfo := range serviceInfos {\r\n serviceInfoV2s[key] = &tripleapi.ServiceInfoV2{\r\n Name: serviceInfo.Name,\r\n Group: serviceInfo.Group,\r\n Version: serviceInfo.Version,\r\n Protocol: serviceInfo.Protocol,\r\n Port: int32(serviceInfo.Port),\r\n Path: serviceInfo.Path,\r\n Params: serviceInfo.Params,\r\n }\r\n }\r\n return serviceInfoV2s\r\n}\r\n```\r\n\r\nConsumer 侧 conversion:\r\n\r\n```go\r\nfunc convertMetadataInfoV2(v2 *tripleapi.MetadataInfoV2) *info.MetadataInfo {\r\n services := make(map[string]*info.ServiceInfo, len(v2.Services))\r\n for key, service := range v2.Services {\r\n services[key] = &info.ServiceInfo{\r\n Name: service.Name,\r\n Group: service.Group,\r\n Version: service.Version,\r\n Protocol: service.Protocol,\r\n Port: int(service.Port),\r\n Path: service.Path,\r\n Params: service.Params,\r\n }\r\n }\r\n return info.NewMetadataInfoWithParams(v2.App, v2.Version, services)\r\n}\r\n```\r\n\r\n---\r\n\r\n## 10. ServiceInstance Metadata\r\n\r\nProvider 应根据 metadata storage mode 写入不同的 service instance metadata。\r\n\r\n### 10.1 通用 Metadata\r\n\r\n以下 metadata 应在 local 和 remote 模式下都写入:\r\n\r\n```text\r\ndubbo.metadata.storage-type = local | remote\r\ndubbo.metadata.revision = {revision}\r\ndubbo.endpoints = [{\"protocol\":\"tri\",\"port\":50051},{\"protocol\":\"dubbo\",\"port\":20880}]\r\n```\r\n\r\n`dubbo.endpoints` 描述同一应用实例暴露的 protocol ports:\r\n\r\n```json\r\n[\r\n {\"protocol\": \"tri\", \"port\": 50051},\r\n {\"protocol\": \"dubbo\", \"port\": 20880}\r\n]\r\n```\r\n\r\nConsumer URL expansion 应保留 dubbo-go 的 `ServiceInstance.ToURLs(serviceInfo)` 形态,但调整选择规则以匹配 Dubbo 3 metadata contract:\r\n\r\n1. 如果 `ServiceInfo.Port > 0`,使用 `ServiceInfo.Protocol` 和 `ServiceInfo.Port` 构造 URL。\r\n2. 如果 `ServiceInfo.Port` 缺失或为 0,根据 `ServiceInfo.Protocol` 从 `dubbo.endpoints` 中选择 endpoint。\r\n3. 如果同一个 protocol 存在多个 endpoint,`ServiceInfo.Port` 是唯一可靠的消歧方式;测试必须覆盖该情况,或者显式拒绝 same-protocol multi-port export。\r\n\r\nDubbo-go customizer 必须从当前 instance 的 `ServiceMetadata` / 当前 registry `MetadataInfo` 计算 `dubbo.endpoints`,不能从全局 metadata service 的聚合 exported URL list 计算。当前 `DefaultMetadataService.GetExportedServiceURLs()` 会跨 registry id 聚合 metadata,因此在 instance customizer 中使用它可能把一个 registry context 的 endpoint 或 revision 泄漏到另一个 context。\r\n\r\n`dubbo.subscribed-services.revision` 和 `dubbo.metadata.revision` 不是同一个值,不应该从 exported-services revision 复制。如果 dubbo-go 保留该 key 用于 subscribed URL metadata,它必须从 subscribed URLs 独立计算,不应被当成通用 provider instance metadata。\r\n\r\n主要文件:\r\n\r\n```text\r\nregistry/service_instance.go\r\nregistry/servicediscovery/customizer/\r\n```\r\n\r\n### 10.2 本地 MetadataService Metadata\r\n\r\n当 `metadata-type=local` 且本地 MetadataService 已导出时,provider 还应额外写入:\r\n\r\n```text\r\ndubbo.metadata-service.url-params = {...}\r\nmeta-v = 1.0.0 | 2.0.0\r\n```\r\n\r\n这些 key 用于 consumer 构造 MetadataService URL,并从 provider 获取完整 `MetadataInfo`。\r\n\r\n`dubbo.metadata-service.urls` 是可选兼容 metadata,不是每个 dubbo-go local provider 都应该默认写出的标准字段。\r\n\r\n#### `dubbo.metadata-service.url-params`\r\n\r\n示例:\r\n\r\n```json\r\n{\r\n \"protocol\": \"tri\",\r\n \"port\": \"20881\",\r\n \"version\": \"2.0.0\",\r\n \"release\": \"dubbo-golang-3.x.x\"\r\n}\r\n```\r\n\r\n主要文件:\r\n\r\n```text\r\nregistry/servicediscovery/customizer/metadata_service_url_params_customizer.go\r\n```\r\n\r\n该 JSON 必须描述 metadata service endpoint,而不是 business service endpoint。如果 V1 和 V2 都通过 triple 导出,该字段可以指向优先使用的 V2-capable endpoint,但 export capability 仍然是 `meta-v` 的事实来源。\r\n\r\n#### `dubbo.metadata-service.urls`\r\n\r\n`dubbo.metadata-service.urls` 是 Java Dubbo 为 Dubbo Spring Cloud 和 metadata discovery 兼容使用的兼容字段。标准 dubbo-go 应用级注册不应默认写出它。\r\n\r\n重要 Java 兼容性说明:\r\n\r\n```text\r\nJava Dubbo 不会把 dubbo.metadata-service.urls 当成 url-params 后面的 fallback。\r\n如果 dubbo.metadata-service.urls 存在,Java Dubbo 可能选择 SpringCloudMetadataServiceURLBuilder 路径。\r\n```\r\n\r\n因此,dubbo-go 只有在该值确实是可完整使用的 metadata service URL list,并且目标就是该兼容路径时,才应写入该 key。\r\n\r\n推荐格式:\r\n\r\n```json\r\n[\r\n \"tri://127.0.0.1:20881/org.apache.dubbo.metadata.MetadataServiceV2?group=demo-provider&interface=org.apache.dubbo.metadata.MetadataServiceV2&version=2.0.0\",\r\n \"tri://127.0.0.1:20881/org.apache.dubbo.metadata.MetadataService?group=demo-provider&interface=org.apache.dubbo.metadata.MetadataService&version=1.0.0&serialization=hessian2\"\r\n]\r\n```\r\n\r\n规则:\r\n\r\n1. 该值是 metadata service URL string 的 JSON array。\r\n2. URL 描述 MetadataService endpoint,而不是 business service endpoint。\r\n3. 如果 V2 和 V1 都已导出,优先列出 V2 URL,再列出 V1。\r\n4. 当该 key 存在时,Java Dubbo consumer 必须能够直接使用这个 URL list。\r\n5. dubbo-go consumer 可以在 `url-params` 缺失、非法或无法构造可用 MetadataService URL 时,把这个 key 作为 local fallback。\r\n6. 解析出的 URL capability 仍必须和 `meta-v` 校验;`urls` 不能导致在 V2 实际没有导出时推断出 `meta-v=2.0.0`。\r\n\r\n#### `meta-v`\r\n\r\n`meta-v` 应来自实际 export capability:\r\n\r\n```go\r\nfunc ResolveMetadataVersion(cap MetadataServiceExportCapability) string {\r\n if cap.V2Exported && cap.V2URL != nil {\r\n return constant.MetadataServiceV2Version\r\n }\r\n if cap.V1Exported && cap.V1URL != nil {\r\n return constant.MetadataServiceV1Version\r\n }\r\n return \"\"\r\n}\r\n```\r\n\r\n主要文件:\r\n\r\n```text\r\nregistry/servicediscovery/customizer/metadata_service_version_customizer.go\r\n```\r\n\r\n当前 customizer 从 `dubbo.metadata-service.url-params` 推导 `meta-v`。这不充分,因为 URL params 可以写 `tri`,但 V2 export 未必真的成功。customizer 应读取已记录的 metadata service export capability。\r\n\r\n### 10.3 Remote Metadata Report 模式\r\n\r\n当 `metadata-type=remote` 时,provider 不需要 MetadataService RPC metadata key:\r\n\r\n```text\r\ndubbo.metadata-service.url-params\r\ndubbo.metadata-service.urls\r\nmeta-v\r\n```\r\n\r\n完整 `MetadataInfo` 会发布到 metadata report,consumer 使用 `app + revision` 获取。\r\n\r\n---\r\n\r\n## 11. Provider 生命周期\r\n\r\n### 11.1 服务导出\r\n\r\n预期流程:\r\n\r\n```text\r\nServiceOptions.Export()\r\n -> build provider URL\r\n -> registry protocol Register(url)\r\n -> metadata.AddService(registryId, url)\r\n -> serviceNameMapping.Map(url)\r\n```\r\n\r\n主要文件:\r\n\r\n```text\r\nserver/action.go\r\nregistry/servicediscovery/service_discovery_registry.go\r\nmetadata/metadata.go\r\n```\r\n\r\n### 11.2 接口到应用 Mapping\r\n\r\n应用级服务发现仍然需要 interface-to-application mapping。\r\n\r\n这里有两条独立的发现链路:\r\n\r\n```text\r\ninterface -> provider applications mapping\r\nprovider application instance -> MetadataInfo\r\n```\r\n\r\nProvider 侧:\r\n\r\n1. 每个 exported provider URL 仍必须写入 service name mapping。\r\n2. 注册一个 ServiceInstance 并不意味着可以移除 `serviceNameMapping.Map(url)`。\r\n3. `MetadataInfo` 描述一个应用导出了什么,但 mapping 告诉 consumer 应该订阅哪些应用。\r\n\r\nConsumer 侧:\r\n\r\n1. 如果配置了 `provided-by`,consumer 可以直接订阅这些应用。\r\n2. 如果没有配置 `provided-by`,consumer 必须通过 service name mapping 解析 provider applications。\r\n3. 解析出 applications 后,consumer 订阅 application instances,并按 `{providerApp}:{revision}` 获取 `MetadataInfo`。\r\n\r\nRemote metadata report 和 service name mapping 是两类职责:\r\n\r\n1. Metadata report 存储和获取完整 `MetadataInfo`。\r\n2. Service name mapping 解析 interface -> provider applications。\r\n3. 它们可以共享同一个后端,但不能被当成同一份数据。\r\n\r\n当前 dubbo-go 默认的 metadata-based service name mapping 依赖 metadata report instances。没有 metadata report backend 时,consumer 应使用 `provided-by` 或其他显式 mapping source。因此,mapping 的验收测试应包含一个配置好的、支持 service app mapping 的 metadata report backend。\r\n\r\nMapping listener 能力和 backend 有关。当前 dubbo-go 中 Nacos 和 Zookeeper 有 listener-oriented 实现,而 Etcd 没有提供同等动态 mapping listener 行为。因此,验证动态 interface -> application mapping 的测试必须指定支持 listener 的 backend,而不是假设所有 metadata report backend 行为相同。\r\n\r\n多 registry 场景下,mapping lookup 和 mapping listener 也应该使用当前 registry/service discovery context 关联的 metadata report,而不是全局第一个 metadata report。当前 provider mapping 会写入所有 metadata reports,因为 exported provider URLs 不携带 registry id;但 consumer 侧 `Get` / listener registration 仍需要使用正确 backend,避免监听错误的 mapping source。\r\n\r\n### 11.3 注册和刷新应用实例\r\n\r\n建议 provider 侧注册流程:\r\n\r\n```go\r\nfunc (s *serviceDiscoveryRegistry) RegisterService() error {\r\n registryId := s.url.GetParam(constant.RegistryIdKey, constant.DefaultKey)\r\n\r\n metaInfo := metadata.GetMetadataInfo(registryId)\r\n if metaInfo == nil {\r\n return fmt.Errorf(\"metadata info not found, registry id = %s\", registryId)\r\n }\r\n\r\n revision := metaInfo.CalAndGetRevision()\r\n\r\n if metadata.GetMetadataType() == constant.RemoteMetadataStorageType {\r\n report := metadata.GetMetadataReportByRegistry(registryId)\r\n if report == nil {\r\n return errors.New(\"metadata report not found\")\r\n }\r\n if err := report.PublishAppMetadata(metaInfo.App, revision, metaInfo.Clone()); err != nil {\r\n return err\r\n }\r\n }\r\n\r\n instance := createInstance(metaInfo)\r\n instance.GetMetadata()[constant.ExportedServicesRevisionPropertyName] = revision\r\n\r\n return s.serviceDiscovery.Register(instance)\r\n}\r\n```\r\n\r\nApplication instance registration 必须做到每个进程、每个 registry 幂等。\r\n\r\nJava Dubbo 把生命周期拆成:\r\n\r\n```text\r\nregisterMetadataAndInstance -> serviceDiscovery.register()\r\nrefreshMetadataAndInstance -> serviceDiscovery.update()\r\nunregisterMetadataAndInstance -> serviceDiscovery.unregister()\r\n```\r\n\r\nDubbo-go 应遵循同样的语义模型:\r\n\r\n1. 初始 provider service export 将 exported URLs 收集到 `MetadataInfo`。\r\n2. 第一次 application registration 为进程注册一个 ServiceInstance。\r\n3. 后续 service export/unexport 或 metadata 语义变化会重新计算 revision。\r\n4. 如果 revision 或 instance metadata 变化,remote 模式下先发布更新后的 metadata。\r\n5. 然后更新或重新注册已有 ServiceInstance,而不是为同一个进程新增另一个 instance。\r\n6. shutdown 时注销这个单一 application instance。\r\n\r\n如果某个 registry implementation 没有 native `Update` 操作,dubbo-go 可以用相同 stable instance ID 执行 unregister + register 来实现 refresh。\r\n\r\n重要语义变更:\r\n\r\n```text\r\n一个应用进程应只注册一个应用实例。\r\n```\r\n\r\n这是目标状态,不是第一步必须完成的实现。不要在 metadata fetch、cache key、endpoint expansion 和 service name mapping 都有回归覆盖之前切换到该模型。早期 PR 中,dubbo-go 可以保留当前 per-exported-URL registration 作为兼容桥。\r\n\r\n多协议和多端口应通过:\r\n\r\n```text\r\ndubbo.endpoints\r\n```\r\n\r\n表示。\r\n\r\n这是 dubbo-go 在 Dubbo 3 应用级服务发现上长期应收敛的模型。实现仍需要尊重 dubbo-go 当前 registry abstraction 和 rollout 风险:短期实现可以继续把每个 exported service URL 注册为一个 instance 作为 bug-fix bridge,但这不是目标设计,因为注册中心应存应用实例,而 Dubbo metadata 应描述服务和 endpoints。\r\n\r\n### 11.4 ServiceInstance 主地址\r\n\r\n当每个进程只注册一个 application instance 时,provider 必须选择稳定的 primary instance address。\r\n\r\n这和 Java Dubbo `ServiceInstanceHostPortCustomizer` 的方向一致:如果 instance 还没有 port,就从 exported business service URLs 里选一个,优先选择配置的 application protocol,找不到则 fallback 到第一个 exported URL。\r\n\r\n建议规则:\r\n\r\n1. `Host`:使用进程注册 IP / advertised host。\r\n2. `Port`:使用 primary business endpoint。优先使用配置的 preferred/default business protocol endpoint port;如果不可用,使用第一个 exported service URL port。metadata-service port 不应作为 primary instance port,除非不存在 business endpoint。\r\n3. `ID`:使用稳定 instance ID,优先为 `{host}:{primaryPort}`,除非 registry implementation 需要其他格式。\r\n4. 所有实际 business protocol ports 必须写入 `dubbo.endpoints`。\r\n5. MetadataService address 在 local 模式下通过 `dubbo.metadata-service.url-params` 写入,`dubbo.metadata-service.urls` 仅用于可选兼容场景。它不能作为主要 instance identity。\r\n6. Instance-level metadata 只能包含整个 application instance 一致的值。service-specific 或冲突值必须保留在 `ServiceInfo.Params`。\r\n\r\n原因:\r\n\r\n```text\r\nServiceInstance 主地址代表应用实例身份。\r\nMetadataService 只是用于获取 metadata 的内部地址。\r\n```\r\n\r\n如果把 metadata-service port 作为 primary port,instance identity 可能变得不稳定,尤其是 metadata-service port 是随机端口时。\r\n\r\n---\r\n\r\n## 12. Consumer 生命周期\r\n\r\n当前 consumer 流程应保留并增强:\r\n\r\n```text\r\nInterface subscribe\r\n -> if provided-by exists, use configured applications\r\n -> otherwise resolve applications through service name mapping\r\n -> subscribe provider application instances\r\nServiceInstancesChangedEvent\r\n -> group instances by app + revision\r\n -> get MetadataInfo from cache\r\n -> if cache miss:\r\n local: fetch from MetadataService RPC\r\n remote: fetch from MetadataReport\r\n -> MetadataInfo.Services\r\n -> instance.ToURLs(serviceInfo), preferring ServiceInfo.Port when present\r\n -> notify registry directory\r\n```\r\n\r\n主要文件:\r\n\r\n```text\r\nregistry/servicediscovery/service_instances_changed_listener_impl.go\r\n```\r\n\r\n### 12.1 Metadata 获取\r\n\r\nMetadata fetch 应保留当前基于 storage-type 的判断:\r\n\r\n```go\r\nif storageType == constant.RemoteMetadataStorageType {\r\n metadataInfo, err = metadata.GetMetadataFromMetadataReport(revision, instance)\r\n} else {\r\n metadataInfo, err = metadata.GetMetadataFromRpc(revision, instance)\r\n}\r\n```\r\n\r\n主要文件:\r\n\r\n```text\r\nmetadata/client.go\r\nregistry/servicediscovery/service_discovery_registry.go\r\nregistry/servicediscovery/service_instances_changed_listener_impl.go\r\n```\r\n\r\nRemote metadata fetch 必须使用当前 registry / service discovery context 关联的 metadata report,而不是任意全局第一个 report。Java Dubbo 在获取 remote metadata 时会把 metadata report 通过当前 service discovery flow 传递下去。Dubbo-go 应避免把 `GetMetadataReport()` 作为唯一 lookup path;需要把 registry id、registry cluster 或已选中的 metadata report 传入 listener/client 路径,确保 provider publish 和 consumer fetch 使用同一个 backend。\r\n\r\n### 12.2 本地 RPC 获取 Fallback\r\n\r\n建议 fallback 顺序:\r\n\r\n```text\r\n1. 如果 meta-v=2.0.0,优先调用 MetadataServiceV2.GetMetadataInfo。\r\n2. 如果 V2 失败且存在 V1 参数,fallback 到 MetadataService V1。\r\n3. 如果响应是 string,为迁移兼容按 JSON 解析。\r\n4. 如果某个 instance 失败,尝试同一 app + revision 下的其他 instance。\r\n5. 如果所有尝试都失败,跳过该 revision 并记录 warning,不要 panic。\r\n```\r\n\r\n必需实现细节:\r\n\r\n```text\r\n1. 如果 dubbo.metadata-service.url-params 缺失或非法,不要解引用 nil URL。\r\n2. 标准路径优先使用 dubbo.metadata-service.url-params。\r\n3. 对 dubbo-go consumer,如果 url-params 不能构造可用 URL,且 optional key 存在,则尝试 dubbo.metadata-service.urls。\r\n4. V2 fallback 到 V1 时,用以下信息重建 URL:\r\n - interface/path = org.apache.dubbo.metadata.MetadataService\r\n - version = 1.0.0\r\n - method = getMetadataInfo\r\n5. 只有返回非 nil 且包含 services 的 MetadataInfo 后,才写入 cache。\r\n```\r\n\r\n### 12.3 Cache Key\r\n\r\n当前 cache 不应只使用 revision。\r\n\r\n推荐 cache key:\r\n\r\n```text\r\n{app}:{revision}\r\n```\r\n\r\n`app` 部分必须是 provider application,通常是 `instance.GetServiceName()`,而不是 listener 中保存的 consumer application。\r\n\r\n建议 helper:\r\n\r\n```go\r\nfunc buildMetadataCacheKey(instance registry.ServiceInstance, revision string) string {\r\n return instance.GetServiceName() + \":\" + revision\r\n}\r\n```\r\n\r\n两层 cache 都应使用这个 key:\r\n\r\n```go\r\ncacheKey := buildMetadataCacheKey(instance, revision)\r\n\r\nif metadataInfo, ok := metaCache.Get(cacheKey); ok {\r\n return metadataInfo.(*info.MetadataInfo), nil\r\n}\r\n\r\nmetaCache.Set(cacheKey, metadataInfo)\r\n```\r\n\r\n`ServiceInstancesChangedListenerImpl.revisionToMetadata` 也应使用 `{app}:{revision}` 作为 key。否则内存 cache 仍然可能把不同 provider application 中碰巧 revision 相同的 metadata 混在一起。\r\n\r\ncache manager 作用域也需要检查。当前 dubbo-go 使用 package-level `metaCache` 和 `cacheOnce`,并用第一个 app name 初始化。改成 `{app}:{revision}` key 后,要么使用一个明确 app-neutral 的共享 metadata cache 文件,要么按 provider app 维护 cache manager。不能让第一个订阅到的 app 决定后续所有 provider app 的持久化 cache storage。\r\n\r\n原因:\r\n\r\n```text\r\n不同应用可能生成相同 revision。\r\n只使用 revision 会导致跨应用 metadata cache 冲突。\r\n```\r\n\r\n---\r\n\r\n## 13. 兼容性矩阵\r\n\r\n| Provider | Consumer | metadata-type | MetadataService | 预期 |\r\n| -------------- | -------------- | ------------- | ------------------------- | ----------------------------- |\r\n| dubbo-go | dubbo-go | local | V1/V2 | OK |\r\n| dubbo-go | dubbo-go | remote | metadata report | OK |\r\n| dubbo-go | Java Dubbo 3.3 | local + tri | V2 preferred, V1 fallback | OK |\r\n| dubbo-go | Java Dubbo 3.3 | remote | metadata report | OK |\r\n| Java Dubbo 3.3 | dubbo-go | local | V2 preferred, V1 fallback | OK |\r\n| Java Dubbo 3.3 | dubbo-go | remote | metadata report | OK |\r\n| dubbo-go | Java Dubbo 2.7 | local | V1 | Best effort / legacy fallback |\r\n| Java Dubbo 2.7 | dubbo-go | local | V1 | Best effort / legacy fallback |\r\n\r\n关键兼容性规则:\r\n\r\n```text\r\nmeta-v 必须匹配实际导出的 MetadataService version。\r\n```\r\n\r\nJava Dubbo 2.7 兼容性应视为 legacy migration support。本设计不应围绕 Dubbo 2.7 应用级服务发现优化,因为目标基准是 Dubbo 3.x metadata 和 service-discovery 行为。\r\n\r\n---\r\n\r\n## 14. 错误处理\r\n\r\nMetadata 是服务发现关键路径的一部分。单个异常 provider instance 不应导致 consumer 崩溃。\r\n\r\n必需行为:\r\n\r\n1. Metadata RPC 失败返回 error,不 panic。\r\n2. Metadata 反序列化失败时跳过当前 instance。\r\n3. 如果一个 instance 失败,尝试同一 `app + revision` 下的其他 instance。\r\n4. 空 metadata 不应写入 cache。\r\n5. 缺失 revision 时记录 warning 并跳过。\r\n6. `meta-v=2.0.0` 且 V2 call 失败时,应在可能的情况下尝试 V1 fallback。\r\n7. 当 optional key 存在时,dubbo-go consumer 可以从非法 `url-params` fallback 到 `dubbo.metadata-service.urls`。\r\n\r\n---\r\n\r\n## 15. 指标和日志\r\n\r\n建议指标:\r\n\r\n```text\r\nmetadata.push.rt\r\nmetadata.subscribe.rt\r\nmetadata.rpc.fetch.rt\r\nmetadata.report.fetch.rt\r\nmetadata.cache.hit\r\nmetadata.cache.miss\r\nmetadata.fetch.error\r\n```\r\n\r\n建议日志:\r\n\r\n```text\r\n[METADATA_REGISTER] metadata revision changed: old -> new, app: demo, services: 3\r\n[METADATA_REGISTER] publish remote metadata app=demo revision=xxx\r\n[METADATA_SERVICE] export V1 url=...\r\n[METADATA_SERVICE] export V2 url=...\r\n[METADATA_SUBSCRIBE] fetch metadata app=demo revision=xxx storage=local\r\n[METADATA_SUBSCRIBE] cache hit app=demo revision=xxx\r\n[METADATA_SUBSCRIBE] fallback V2 -> V1 app=demo revision=xxx\r\n```\r\n\r\n---\r\n\r\n## 16. 测试计划\r\n\r\n### 16.1 单元测试\r\n\r\n#### MetadataInfo\r\n\r\n- `AddService` 正确更新 services。\r\n- `RemoveService` 正确更新 services。\r\n- 相同 services 以不同插入顺序加入时生成相同 revision。\r\n- 参数变化会导致 revision 变化。\r\n- 方法级参数变化会导致 revision 变化。\r\n- runtime-only 参数变化,例如 timestamp 或 bind address,不会导致 revision 变化。\r\n- 空 services 返回 revision `\"0\"`。\r\n- `MetadataInfo.Clone()` 返回 publish/cache snapshot,后续 `AddService` / `RemoveService` 调用不会改变该 snapshot。\r\n\r\n#### MetadataService Strategy and Capability\r\n\r\n- `metadata-service-protocol=dubbo` 只导出 V1。\r\n- `metadata-service-protocol=tri` 导出 V1 + V2。\r\n- `metadata-service-protocol=tri` 且没有 `metadata-service-port` 时,如果配置了 tri protocol port,则使用它。\r\n- 不支持的 `metadata-service-protocol` 值不会静默导出 V2。\r\n- `metadata-type=remote` 不导出本地 MetadataService。\r\n- Export capability 只在 exporter 创建成功后记录。\r\n- `meta-v` 匹配已记录的 export capability。\r\n- V2 export failure 绝不会产生 `meta-v=2.0.0`。\r\n- 标准 dubbo-go registration 不默认写出 `dubbo.metadata-service.urls`。\r\n- 当写出 `dubbo.metadata-service.urls` 时,它是 metadata service URL string 的 JSON array,并且 Java Dubbo Spring Cloud compatibility builder 可以直接使用。\r\n- Dubbo-go consumer 优先使用 `url-params`,只有当 `url-params` 不可用或无法使用时才 fallback 到 `urls`。\r\n\r\n#### Proto Conversion\r\n\r\n- `MetadataInfo -> MetadataInfoV2` 不丢字段。\r\n- `MetadataInfoV2 -> MetadataInfo` 不丢字段。\r\n- `ServiceInfo.Port`、`Path` 和 `Params` 正确转换。\r\n- V2 conversion 保留 `ServiceInfo.Port`。\r\n\r\n#### Metadata Cache\r\n\r\n- 相同 app 和相同 revision 复用 metadata。\r\n- 不同 app 即使 revision 相同,也不共享 metadata cache entries。\r\n- nil 或空 metadata 不写入 cache。\r\n- revision algorithm 改变后,不复用旧 algorithm 生成的本地 metadata cache entries。\r\n\r\n#### ServiceInstance Metadata\r\n\r\n- 一致的 instance-level metadata,例如所有 exported services 上只有一个 `environment` 值时,会写入 application instance,并复制到生成的 consumer URLs。\r\n- 冲突的 per-service values 不会提升到 ServiceInstance metadata;它们保留在各自服务的 `ServiceInfo.Params` 中。\r\n- one-instance registration 不会把第一个 exported URL 的任意参数复制到整个 application instance。\r\n- ServiceInstance customizers 从 instance 自己的 `ServiceMetadata` / 当前 registry metadata 计算 revision 和 endpoints,而不是从全局聚合 exported URLs 计算。\r\n\r\n#### Service Name Mapping\r\n\r\n- Provider export 仍会为每个 exported provider URL 调用 service name mapping。\r\n- 当没有配置 `provided-by` 且 metadata report backend 可用时,consumer 通过 service name mapping 解析 provider applications。\r\n- Metadata report data 和 service name mapping data 通过独立的逻辑 API 存取。\r\n- Dynamic mapping listener 测试使用支持 mapping listener 的 backend,例如 Nacos 或 Zookeeper;没有等价 listener 能力的 backend 应由 fallback behavior tests 覆盖。\r\n- Multi-registry mapping lookup/listener 使用当前 registry/service discovery context 关联的 metadata report。\r\n\r\n### 16.2 集成测试\r\n\r\n#### Local Metadata\r\n\r\n```text\r\nGo provider:\r\n metadata-type=local\r\n metadata-service-protocol=tri\r\n\r\nGo consumer:\r\n service discovery subscribe\r\n fetch MetadataServiceV2\r\n generate provider URL\r\n invoke successfully\r\n```\r\n\r\n#### Remote Metadata\r\n\r\n```text\r\nGo provider:\r\n metadata-type=remote\r\n metadata-report=nacos\r\n\r\nGo consumer:\r\n service discovery subscribe\r\n fetch metadata from metadata report\r\n invoke successfully\r\n```\r\n\r\n还应覆盖 multi-registry remote metadata:\r\n\r\n```text\r\nregistry A 将 app metadata 发布到 metadata report A\r\nregistry B 将 app metadata 发布到 metadata report B\r\n\r\n通过 registry B 订阅的 consumer 必须从 metadata report B 获取,\r\n而不是从全局第一个 metadata report 获取。\r\n```\r\n\r\n#### Java Dubbo 3.3 Compatibility\r\n\r\n```text\r\nJava Dubbo 3.3 consumer -> Go provider V2\r\nJava Dubbo 3.3 consumer -> Go provider V1 fallback\r\nGo consumer -> Java Dubbo 3.3 provider V2\r\nGo consumer -> Java Dubbo 3.3 provider V1 fallback\r\n```\r\n\r\nDubbo 2.7 应继续作为 best-effort legacy 场景,在可行时由 V1 fallback 覆盖,但不应阻塞第一阶段验收标准。\r\n\r\n#### Multi-provider\r\n\r\n```text\r\nsame application, 3 provider instances:\r\n port=20000\r\n port=20001\r\n port=20002\r\n\r\nconsumer 应看到 3 个 provider URLs。\r\n```\r\n\r\n#### Multi-protocol\r\n\r\n```text\r\n同一个 provider 暴露:\r\n tri:50051\r\n dubbo:20880\r\n\r\ninstance metadata 应包含:\r\n dubbo.endpoints=[tri, dubbo]\r\n\r\nconsumer 应根据 ServiceInfo.Protocol 生成 URLs。\r\n\r\n同一个 provider 在不同端口暴露同一个 protocol:\r\n tri:50051 for GreetService\r\n tri:50052 for UserService\r\n\r\nconsumer 应根据 ServiceInfo.Protocol + ServiceInfo.Port 生成 URLs。\r\n```\r\n\r\n#### Application-level Mapping\r\n\r\n```text\r\nconsumer reference without provided-by:\r\n interface=org.apache.dubbo.samples.GreetService\r\n\r\nmetadata report backend:\r\n service app mapping is enabled\r\n\r\nmapping:\r\n GreetService -> greet-provider\r\n\r\nconsumer 应订阅 greet-provider instances,\r\n按 greet-provider:{revision} 获取 MetadataInfo,\r\n并成功调用。\r\n```\r\n\r\n---\r\n\r\n## 17. 实施计划\r\n\r\n### PR 1:验证 MetadataService Protocol 配置\r\n\r\n范围:\r\n\r\n```text\r\nconfig/metadata_config.go\r\nmetadata/options.go\r\nserver/server.go\r\n```\r\n\r\n任务:\r\n\r\n- 保留并测试当前把 `Application.MetadataServiceProtocol` 传给 metadata options 的路径。\r\n- 同样通过 `config/metadata_config.go` 传递 `Application.MetadataServiceProtocol`。\r\n- 增加回归测试,证明第一个 metadata `Options.Init()` 调用在 `exportOnce` 阻止重新导出前已经收到配置的 protocol。\r\n- 确保 `metadata-type=remote` 不导出本地 metadata service。\r\n- 确保 `WithMetadataProtocol(\"\")` 不会覆盖默认 dubbo protocol,也不会意外导出 triple MetadataService。\r\n- 当 `metadata-service-protocol` 为空时,保留现有默认行为:phase 1 解析为 dubbo / V1,而不是 Java 风格 protocol auto-detection。\r\n- 校验 metadata service protocol 值,任意非 dubbo/non-tri 值都应 fail fast,而不是静默导出 triple 或 fallback 到 dubbo。\r\n- 让 metadata service port fallback 感知 protocol:显式 metadata service port 优先,然后是选中 metadata service protocol port,最后随机端口并记录清晰 warning。\r\n- 增加单元测试。\r\n\r\n### PR 2:对齐 MetadataService V2 Proto\r\n\r\n范围:\r\n\r\n```text\r\nmetadata/triple_api/proto/metadata_service_v2.proto\r\nmetadata/metadata_service.go\r\n```\r\n\r\n任务:\r\n\r\n- 增加 `GetOpenAPIInfo`。\r\n- 增加 `OpenAPIRequest`。\r\n- 增加 `OpenAPIInfo`。\r\n- 增加 `OpenAPIFormat`。\r\n- 实现空 `GetOpenAPIInfo`。\r\n- 在 `MetadataInfo -> MetadataInfoV2` conversion 中保留 `ServiceInfo.Port`。\r\n- 在 `MetadataInfoV2 -> MetadataInfo` conversion 中保留 `ServiceInfo.Port`。\r\n- 重新生成 generated code。\r\n- 更新 service descriptor。\r\n\r\n### PR 3:增加 Export Capability 并修复 `meta-v` 生成\r\n\r\n范围:\r\n\r\n```text\r\nregistry/servicediscovery/customizer/metadata_service_version_customizer.go\r\nmetadata/metadata_service.go\r\nmetadata/options.go\r\n```\r\n\r\n任务:\r\n\r\n- 增加 `MetadataServiceExportStrategy` 表示计划导出行为。\r\n- 增加 `MetadataServiceExportCapability` 存储实际导出结果。\r\n- 只在 exporter 创建成功后记录 capability。\r\n- 根据实际 export capability 生成 `meta-v`。\r\n- 确保只有 V2 已导出时才写出 `meta-v=2.0.0`。\r\n- 停止只从 `dubbo.metadata-service.url-params` 推导 `meta-v`。\r\n- 将 `dubbo.metadata-service.urls` 定义为可选兼容 JSON array,内容为 metadata service URL strings。\r\n- 标准 dubbo-go registration 不默认写出 `dubbo.metadata-service.urls`。\r\n- 如果写出 `dubbo.metadata-service.urls`,确保 Java Dubbo 可以直接使用 URL list。\r\n- 保持 dubbo-go phase 1 策略:local + tri 导出 V1 + V2,不引入 V2-only export。\r\n- 增加 Java Dubbo 3.3 consumer 兼容测试。\r\n\r\n### PR 4:改进 Consumer Metadata Fetch\r\n\r\n范围:\r\n\r\n```text\r\nmetadata/client.go\r\nregistry/servicediscovery/service_discovery_registry.go\r\nregistry/servicediscovery/service_instances_changed_listener_impl.go\r\n```\r\n\r\n任务:\r\n\r\n- 将持久化 cache key 改为 provider `{app}:{revision}`。\r\n- 将 `revisionToMetadata` 内存 map key 改为 provider `{app}:{revision}`。\r\n- 修复 cache manager 作用域,避免 package-level `cacheOnce` 让第一个订阅到的 app 拥有所有 provider app 的持久化 cache storage。\r\n- 增加 V2 -> V1 fallback。\r\n- 避免 nil metadata panic。\r\n- 对 dubbo-go consumer,当 `url-params` 非法时,如果 optional key 存在,则 fallback 到 `dubbo.metadata-service.urls`。\r\n- 将 `dubbo.metadata-service.urls` 解析为 metadata service URL string 的 JSON array,并按 `meta-v` 和 fallback 顺序选择 V2/V1。\r\n- 不缓存 nil 或空 metadata。\r\n- 尝试同 revision 下的其他 instance。\r\n- 使用当前 registry/service discovery context 关联的 metadata report,而不是全局第一个 metadata report。\r\n- 增加集成测试。\r\n\r\n### PR 5:改进 MetadataInfo Revision 和 Snapshot\r\n\r\n范围:\r\n\r\n```text\r\nmetadata/metadata.go\r\nmetadata/info/metadata_info.go\r\nregistry/servicediscovery/customizer/service_revision_customizer.go\r\n```\r\n\r\n任务:\r\n\r\n- 用同步机制封装全局 metadata maps,并增加 package-level `RemoveService` / `RemoveSubscribeURL` helper。\r\n- 增加 `CalAndGetRevision()`。\r\n- 增加 `MetadataInfo.Clone()`,或等价的 publish snapshot helper,用于 remote metadata publication 和 consumer cache write。\r\n- 增加 `ServiceInfo.ToDescString()`。\r\n- 替换 customizer revision 逻辑,让 exported-services revision 从当前 instance `ServiceMetadata` / registry `MetadataInfo` 计算,而不是从全局聚合 exported URLs 计算。\r\n- 增加轻量 internal service metadata parameter filter,排除 timestamp、pid、bind address、generated local address 等 runtime-only params。phase 1 不增加新的 extension SPI。\r\n- 清理或 version local metadata cache,避免旧 revision entries 和新 revision entries 混用。\r\n- 增加确定性 revision 测试。\r\n\r\n### PR 6:收敛应用级实例语义\r\n\r\n范围:\r\n\r\n```text\r\nregistry/servicediscovery/service_discovery_registry.go\r\nregistry/service_instance.go\r\nregistry/servicediscovery/customizer/\r\nmetadata/mapping/metadata/service_name_mapping.go\r\n```\r\n\r\n任务:\r\n\r\n- 用回归测试保护 `develop` 的 multi-provider URL generation 行为。\r\n- 将 provider registration 逐步迁移到每个进程一个 application instance。\r\n- 将所有 exported services 存储到 `MetadataInfo`。\r\n- 将 protocol ports 存储到 `dubbo.endpoints`,并让 consumer URL expansion 在 `ServiceInfo.Port` 存在时优先使用它。\r\n- 从当前 instance `ServiceMetadata` / registry metadata 计算 `dubbo.endpoints`,不要从 `metadata.GetMetadataService().GetExportedServiceURLs()` 计算。\r\n- 选择稳定的 ServiceInstance primary address:host 来自进程注册 IP / advertised host;port 来自 preferred/default business protocol endpoint,否则使用第一个 exported service URL;只有没有 business endpoint 时才使用 metadata-service port;ID 优先使用 `{host}:{primaryPort}`,除非 registry 要求其他格式。\r\n- 每个进程、每个 registry 保持一个已注册 application instance。\r\n- metadata 变化通过 service discovery update 刷新;如果没有 native update,则使用相同 stable instance ID 执行 unregister + register。\r\n- revision 变化或导出额外服务时,不追加重复 ServiceInstances。\r\n- instance-level metadata,例如 `environment`,只有在所有 exported services 上只有一个一致值时才写到 registered application instance。如果不同 exported service 的值不同,保留在 `ServiceInfo.Params` 并在 consumer 侧从 service metadata 恢复。\r\n- 为每个 exported provider URL 保留 `serviceNameMapping.Map(url)`。\r\n- 验证当没有 `provided-by`,且配置了支持 service app mapping 的 metadata report backend 时,consumer 可以通过 service name mapping 发现。\r\n- 在支持 listener 的 backend 上验证 dynamic mapping listener 行为,例如 Nacos 或 Zookeeper;对没有 listener 支持的 backend 验证 fallback behavior。\r\n- 验证 multi-registry service name mapping lookup/listener 不使用无关的全局第一个 metadata report。\r\n- 在改变 registration semantics 之前,增加 Nacos multi-provider 和 multi-protocol 集成测试。\r\n- 不要把 registration semantics 改动和 metadata protocol 或 `meta-v` 修复放在同一个 PR。\r\n\r\n---\r\n\r\n## 18. 验收标准\r\n\r\n1. 当配置 `metadata-service-protocol: tri` 时,provider 实际导出 `MetadataServiceV2`。\r\n2. 当 `meta-v=2.0.0` 时,Java Dubbo 3.3 consumer 可以调用 dubbo-go provider 的 `MetadataServiceV2.GetMetadataInfo`。\r\n3. 当配置 `metadata-service-protocol: dubbo` 时,不得写出 `meta-v=2.0.0`。\r\n4. 当配置 `metadata-service-protocol: tri` 且省略 `metadata-service-port` 时,metadata service port fallback 使用可用的 tri protocol port,而不是 dubbo protocol port。\r\n5. 当 `metadata-type=remote` 时,provider 不依赖本地 MetadataService,consumer 可以从 metadata report 获取 metadata。\r\n6. 在 multi-provider 场景下,consumer directory 能看到所有 provider URLs,并且有回归测试保护。\r\n7. 在 multi-protocol 场景下,consumer 根据 `ServiceInfo.Protocol` 选择正确 endpoint,并使用 `ServiceInfo.Port` 消歧 same-protocol multi-port services。\r\n8. Metadata fetch failures 不会 panic。\r\n9. 相同 `{app}:{revision}` 不会触发重复 metadata fetch。\r\n10. Revision 变化会触发 metadata refresh。\r\n11. Go / Java Dubbo 3.3 双向 metadata 兼容测试通过。\r\n12. Remote metadata fetch 使用当前 registry/service discovery context 关联的 metadata report。\r\n13. 不同 applications 即使 revision 相同,也不会共享 cached metadata。\r\n14. Metadata cache manager scope 是 app-neutral 或 per-provider-app;不会意外绑定到第一个 subscribed app。\r\n15. 长期应用级注册使用每个 application process 一个 ServiceInstance,services 存储在 `MetadataInfo`,ports 存储在 `dubbo.endpoints`。\r\n16. One-instance registration 选择稳定 primary business endpoint 作为 ServiceInstance address,不优先使用 metadata-service port 作为 primary port。\r\n17. 当没有配置 `provided-by`,并且配置了支持 mapping 的 metadata report backend 时,consumer 可以通过 service name mapping 发现 provider applications。\r\n18. Multi-registry service name mapping lookup/listener 使用当前 registry/service discovery context 关联的 metadata report,并且 dynamic listener 断言仅限支持 mapping listener 的 backend。\r\n19. Revision algorithm 变化不会复用旧 algorithm 的 stale local metadata cache entries。\r\n20. Service export/unexport 刷新现有 application instance metadata 和 revision,而不是注册 duplicate instances。\r\n21. Remote metadata publication 和 consumer metadata cache 存储稳定 metadata snapshots,而不是共享的 mutable provider metadata objects。\r\n22. One-instance registration 只提升 application instance 级一致的 metadata values;冲突的 service-level values 保留在 `ServiceInfo.Params`。\r\n23. Revision 和 endpoint customizers 使用当前 instance / registry metadata,不会跨 registry contexts 泄漏全局聚合 exported URLs。\r\n24. `dubbo.metadata-service.urls` 有明确 JSON URL-list 格式,不默认写出;一旦写出,Java Dubbo 的 Spring Cloud compatibility path 可以直接使用。\r\n\r\n---\r\n\r\n## 19. 推荐第一步\r\n\r\n推荐顺序:\r\n\r\n1. 验证 `metadata-service-protocol` wiring 和默认行为,并补测试。\r\n2. 对齐 MetadataServiceV2 proto 与 Java Dubbo,包括 `GetOpenAPIInfo` 和 `ServiceInfo.Port` conversion。\r\n3. 增加 export strategy / capability recording,并根据实际 export capability 修复 `meta-v` 生成。\r\n4. 改进 consumer metadata fetch、fallback 和 `{providerApp}:{revision}` cache keys。\r\n5. 将 revision calculation 移入 `MetadataInfo`,并清理或 version 旧 metadata cache。\r\n6. 最后收敛 provider registration 到每个进程一个 application instance,并由 multi-provider、multi-protocol 和 service name mapping 回归测试保护。\r\n\r\n这些改动足够小,社区更容易接受;同时也足够重要,可以修复真实的 Java / Go 互操作问题。\r\n\r\n---\r\n\r\n## 20. 总结\r\n\r\ndubbo-go 不需要从零重建 metadata。\r\n\r\n正确方向是增强现有架构:\r\n\r\n```text\r\nMetadataInfo\r\n+ MetadataService V1/V2\r\n+ ServiceInstance metadata\r\n+ MetadataReport\r\n+ Consumer metadata fetch by revision\r\n```\r\n\r\n最重要的设计规则是:\r\n\r\n```text\r\nService instance metadata 必须描述实际 provider capability。\r\n```\r\n\r\n具体来说:\r\n\r\n```text\r\nmeta-v=2.0.0 表示 MetadataServiceV2 已实际导出且可访问。\r\n```\r\n\r\n只要保证这一点,Java Dubbo 和 dubbo-go 的 metadata 互操作就会更可预测。",
"createdAt": "2026-05-24T05:57:56Z",
"updatedAt": "2026-05-24T05:57:56Z",
"author": {
"login": "Oxidaner"
},
"replies": []
},
{
"id": "DC_kwDOCJS8R84BBUGG",
"url": "https://github.com/apache/dubbo-go/discussions/3342#discussioncomment-17121670",
"body": "复盘下来,删减的直接原因很明确:**#2534 是按 #2432 的方案做的一次主动瘦身,不是误删**。\r\n\r\n时间线大概是这样:\r\n\r\n1. 2023-09 的 [#2432](https://github.com/apache/dubbo-go/issues/2432) 先把当时 metadata 模块梳理了一遍,指出 metadata 逻辑散在 `common/extension`、`config/instance`、`metadata/definition`、`metadata/identifier`、`metadata/service`、`registry/event` 等很多地方。\r\n2. #2432 的评论里给了“优化 draft”:目标是简化 metadata center 处理逻辑,把 metadata 逻辑集中到 `metadata` 模块。\r\n3. 2024-03 的 [#2534](https://github.com/apache/dubbo-go/pull/2534) 落地了这个方案,commit 是 `d6464e40 Refactor metadata`,一次性 `1703 insertions / 5227 deletions`。\r\n4. 后面 [#2760](https://github.com/apache/dubbo-go/pull/2760) 合 `dev-3.3` 时,又把这套删减后的形态带进开发线,所以现在看起来就是 metadata 被“大幅删了”。\r\n\r\n它当时的设计假设是:**dubbo-go 3.x 主要服务发现路径已经转向应用级服务发现,所以 metadata center 不再重点存 provider/consumer/service-definition 级元数据,只保留应用级 MetadataInfo、service-app mapping、MetadataService。**\r\n\r\n所以被删的核心东西是:\r\n\r\n- `metadata/definition`:provider service definition / method definition 这套被判断为“不再需要”\r\n- `metadata/identifier`:老的 service/provider/consumer identifier 被判断为“不再需要”\r\n- `metadata/service/local|remote|exporter`:拆开的 MetadataService 本地/远程/exporter 抽象被压扁到 [metadata_service.go](/dubbo-go/metadata/metadata_service.go:51)\r\n- `metadata/report/delegate`:带失败重试、周期上报、provider/consumer metadata 上报的 delegate 层被删\r\n- `common/extension/metadata_*`、`config/instance/metadata_report*`:扩展点和全局实例缓存被认为太分散,迁到/收缩到 metadata 包内部\r\n\r\n保留下来的新模型就是现在这套:`MetadataInfo` 作为应用级服务发现元数据容器,见 [metadata_info.go](/dubbo-go/metadata/info/metadata_info.go:58);`MetadataReport` 只负责 app metadata 和 mapping,见 [report.go](/dubbo-go/metadata/report/report.go:29);服务发现过程通过 revision 拿远端 app metadata。\r\n\r\n我觉得当时这个删减有它的工程动机:老 metadata 模块确实重、散、和 config/registry/server lifecycle 纠缠很深,而且很多能力对 dubbo-go 当时的应用级服务发现主路径不是必需的。",
"createdAt": "2026-05-31T09:35:29Z",
"updatedAt": "2026-05-31T09:35:29Z",
"author": {
"login": "Alanxtl"
},
"replies": []
},
{
"id": "DC_kwDOCJS8R84BCfwL",
"url": "https://github.com/apache/dubbo-go/discussions/3342#discussioncomment-17431563",
"body": "close via https://github.com/apache/dubbo-go/issues/3188",
"createdAt": "2026-06-25T09:08:40Z",
"updatedAt": "2026-06-25T09:08:40Z",
"author": {
"login": "Alanxtl"
},
"replies": []
}
]
},
{
"number": 3374,
"title": "2026-06-07 Weekly",
"body": "# 🧭 Dubbo-go 社区周报\r\n\r\n| 项目 | 链接 |\r\n| --------------- | ------------------------------------------------------------ |\r\n| gost | https://github.com/dubbogo/gost |\r\n| hessian2 | https://github.com/apache/dubbo-go-hessian2 |\r\n| pixiu | https://github.com/apache/dubbo-go-pixiu/ |\r\n| pixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples |\r\n| dubbogo-samples | https://github.com/apache/dubbo-go-samples/issues |\r\n\r\n------\r\n\r\n## 🧩 RPC Communication\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------- | -------- | --------- | ---------- |\r\n| [提案] server/server.go中Serve优化 | [#3042](https://github.com/apache/dubbo-go/issues/3042) | junfa | 04-12: 待提交新pr |\r\n| API 易用性改进 | [#2326](https://github.com/apache/dubbo-go/issues/2326) | zecheng| 新 API 设计,已经迁了一部分 |\r\n| otel trace错乱 | https://github.com/apache/dubbo-go/issues/3240 | sirui | 待config后跟进 04-12: 待提交pr |\r\n| Generic | | YongJia&Zerui | | \r\n\r\n------\r\n\r\n## 🧱 Registry\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------- | -------- | --------- | ---------- |\r\n\r\n------\r\n\r\n## 🧱 Config\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------- | -------- | --------- | ---------- |\r\n| Config | https://github.com/apache/dubbo-go/issues/3329 | chenxinran | | |\r\n\r\n------\r\n\r\n## ⚙️ Protocol\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------- | -------- | --------- | ---------- |\r\n| 删除 protocol/dubbo3 与 protocol/grpc | [#3093](https://github.com/apache/dubbo-go/issues/3093) | caicai | 01-18: 暂时不能删除 |\r\n| [FEATURE] Enhanced HTTP/3 transport configuration options with support for core QUIC parameter settings | [#3102](https://github.com/apache/dubbo-go/issues/3102) | caicai | 12-24: 先出个提案
01-18: 继续推进 |\r\n| [FEATURE] Introduce Router Cache to Enhance Routing Performance | [#3166](https://github.com/apache/dubbo-go/issues/3166) | jiale | 待cr | | |\r\n\r\n-----\r\n## Config\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------- | -------- | --------- | ---------- |\r\n| config 集成测试 | https://github.com/apache/dubbo-go/issues/3255 | sirui | 04-12: 就差最后的测试了 | - |\r\n\r\n------\r\n## Scanned Issues by AI\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------- | -------- | --------- | ---------- |\r\n| common.URL改造 | https://github.com/apache/dubbo-go/issues/3248 https://github.com/apache/dubbo-go/issues/3246 | jintao | 已有pr: https://github.com/apache/dubbo-go/pull/3282 |\r\n| [提案] 使 dubbo-go 对 AI 编程工具更加友好|https://github.com/apache/dubbo-go/issues/3276 | shibin | - | - |\r\n\r\n-----\r\n## Meta\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------- | -------- | --------- | ---------- |\r\n| Metadata | | QiaoYuqi & ZhangShibin&LvYuxuan | | |\r\n\r\n\r\n------\r\n\r\n## 🔧 Tools\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ---- | -------- | ------ | -------- |\r\n| 三方包升级 | https://github.com/apache/dubbo-go/issues/3243 | \r\n| pr https://github.com/apache/dubbo-go/pull/3245 待review |\r\n\r\n------\r\n\r\n## 🔧 可观测性\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ---- | -------- | ------ | -------- |\r\n| Metrics&Log&Tracing | https://github.com/apache/dubbo-go/issues/3292 | shibin | Metrics 是在 caiyuyang 这里,https://github.com/apache/dubbo-go/issues/3337 |\r\n\r\n------\r\n\r\n## 🔧 Gost\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------- | -------- | --------- | ---------- |\r\n| | | | |\r\n\r\n------\r\n\r\n## 🧪 Samples\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------- | -------- | --------- | ---------- || ChatClient & ChatModel 示例 | [#816](https://github.com/apache/dubbo-go-samples/issues/816) | - | - |\r\n\r\n------\r\n\r\n## 📖 Documentation\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------- | -------- | --------- | ---------- |\r\n| 是否需要 code style 指南 | [#1755](https://github.com/apache/dubbo-go/issues/1755) | - | - |\r\n\r\n\r\n------\r\n\r\n## AI\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------- | -------- | --------- | ---------- |\r\n| SKILL | https://github.com/apache/dubbo-go/pull/3340/changes | SHIBIN | | \r\n\r\n------\r\n\r\n## 🚀 Long-term Work\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------- | -------- | --------- | ---------- |\r\n| 功能规划与思考 | [#2610](https://github.com/apache/dubbo-go/issues/2610) | - | - |",
"url": "https://github.com/apache/dubbo-go/discussions/3374",
"createdAt": "2026-06-07T12:28:32Z",
"updatedAt": "2026-08-15T01:26:30Z",
"closed": true,
"closedAt": "2026-08-15T01:26:30Z",
"isAnswered": null,
"author": {
"login": "AlexStocks"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 3454,
"title": "[提案] AI 时代 apache/dubbo-go 的演进方向:聚焦 AI-ready 基础设施,而非另一个 AI 框架",
"body": "# [提案] AI 时代 apache/dubbo-go 的演进方向:聚焦 AI-ready 基础设施,而非另一个 AI 框架\n\n经过对当前 `develop` 分支的多轮内部分析,我认为 `apache/dubbo-go` 在 AI 时代最务实的方向,**不是**变成又一个 AI 应用框架。\n\n相反,`dubbo-go` 更适合演进为**面向 AI 服务的高性能 Go RPC + 治理基础设施**。\n\n本提案试图回答一个问题:\n\n> 在 AI 时代,`dubbo-go` 应该朝哪个方向演进,才能既有意义又与其既有优势保持一致?\n\n---\n\n## 1. 重要的边界:`dubbo-go` 应该成为什么,不应该成为什么\n\n### `dubbo-go` 应该成为什么\n\n为 Go 生态中的 AI 服务提供坚实基础,包括:\n- 流式友好的 RPC\n- 模型/服务能力发现\n- 治理感知的路由\n- AI 专用的可观测性\n- 向外部工具/Agent 安全暴露服务\n- 策略驱动的成本/延迟/租户控制\n\n### `dubbo-go` **不应该**成为什么\n\n它不应该试图将以下内容纳入核心:\n- Prompt 工程框架\n- 记忆/对话历史管理\n- RAG 编排\n- Agent 工作流运行时\n- 将向量数据库集成作为一等公民的核心关注点\n- 特定模型提供商的 SDK 逻辑\n\n原因很简单:这些是产品层或生态层的关注点,而 `dubbo-go` 最擅长的是通信/治理/生命周期/互操作性基础设施。\n\n---\n\n## 2. 为什么这个方向比泛泛的\"AI 集成\"更适合当前仓库\n\n从当前仓库的信号来看,`dubbo-go` 已经在以下方面具备坚实基础:\n- Triple / gRPC 兼容通信\n- 泛化调用\n- 服务发现/元数据/注册中心集成\n- 动态配置/路由更新\n- 流量治理\n- OTel / 指标 / 链路追踪\n- OpenAPI / 代码生成工具\n\n因此,最好的 AI 相关演进不是从零开始,而是**针对 AI 工作负载重新诠释这些既有优势**。\n\n换句话说:\n\n- 不要在核心中构建\"AI 应用运行时\"\n- 在现有 Dubbo-go 原语之上构建\"AI 服务运行时治理\"\n\n---\n\n## 3. 建议的优先方向\n\n## P0:AI-ready 的服务治理\n\n### 3.1 模型/服务能力发现\n\n今天,服务发现主要回答:*实例在哪里?*\n\n对于 AI 工作负载,消费者还需要知道:\n- 模型系列/模型名称\n- 上下文窗口\n- 模态(文本/图像/Embedding/音频/工具)\n- 地域/合规标签\n- 延迟 SLA\n- 成本层级\n- 租户可见性\n- 版本/发布阶段\n\n这指向一个自然的演进方向:\n- 扩展元数据/注册中心语义,支持 AI 能力感知的服务发现\n- 让消费者能够按**能力**订阅,而不仅仅是按端点身份\n\n这与 `dubbo-go` 非常契合。\n\n---\n\n### 3.2 治理感知的模型路由\n\n一旦能力元数据存在,下一步就是路由。\n\n`dubbo-go` 应该能够支持针对 AI 工作负载的策略驱动路由,例如:\n- 按成本预算路由\n- 按延迟目标路由\n- 按租户/合规级别路由\n- 按模型质量层级路由\n- 按降级策略路由\n- 按金丝雀/实验阶段路由\n\n这里的关键点是:这应该是**规则驱动且可审计的**,而不是\"让 LLM 在线决定路由\"。\n\n这样可以让系统在保持 AI 感知的同时,仍然是确定性的、可审查的。\n\n---\n\n### 3.3 AI 专用的可观测性\n\n传统 RPC 可观测性对 AI 服务来说是不够的。\n\n对于 AI 流量,我们还关心:\n- TTFT(首 Token 延迟)\n- 流式分块间隔\n- 输入 Token 数/输出 Token 数\n- 会话/Prompt/模型标识符\n- 降级频率\n- 因模型/服务退化导致的重试\n- 成本归因\n\n`dubbo-go` 的一个有力方向是扩展其现有的可观测性栈,使 AI 工作负载成为追踪和指标中的一等公民。\n\n这具有即时的运维价值,而且不需要将项目变成 AI 框架。\n\n---\n\n## P1:工具/Agent 生态赋能,但不进入 Agent 运行时核心\n\n### 3.4 泛化调用 + Schema 暴露给工具\n\n一个强有力的机会是让现有的 Dubbo 服务更容易暴露为机器可消费的工具。\n\n由于 `dubbo-go` 已经具备泛化调用和代码生成/工具基础,它完全有能力支持:\n- 服务 → 工具描述符生成\n- Schema 优先的服务暴露\n- 结构化输入/输出约束\n- 为外部工具消费者提供安全元数据\n\n这可以让 `dubbo-go` 成为 MCP/工具调用生态的强大后端基础设施,**同时**又不必将 Agent 编排强塞进核心。\n\n---\n\n### 3.5 一份契约,多个消费者\n\n一个务实的方向是演进 IDL / OpenAPI / Triple 工具链,使一份契约可以服务于:\n- RPC 客户端\n- OpenAPI 消费者\n- AI 工具消费者\n- 结构化输出验证器\n\n这种 Schema 优先的投入,比起将快速变化的 AI 产品抽象嵌入框架核心,风险更低、更持久。\n\n---\n\n## P2:面向 AI 流量的流式与长会话语义\n\nAI 工作负载对通信的压力与传统 RPC 不同:\n- 更长生命周期的会话\n- 流式输出\n- 对取消的敏感性\n- 背压处理\n- 大载荷/上下文窗口\n\n`dubbo-go` 在协议层的一个有意义的演进方向是加固和优化:\n- 流式语义\n- 取消传播\n- 会话元数据传播\n- 流量控制/背压行为\n- 围绕流生命周期的可观测性\n\n这直接惠及 AI 服务,同时仍然完全处于 RPC/协议领域之内。\n\n---\n\n## 4. 判断某个 AI 方向是否应纳入核心的简单原则\n\n我建议使用以下过滤条件:\n\n如果某个方向满足以下条件,就是好的 `dubbo-go` 核心方向:\n1. 建立在现有优势之上,如协议/注册中心/路由/配置/可观测性\n2. 同时服务于传统微服务和 AI 服务,或者至少干净地复用同一基础设施\n3. 保持提供商中立\n4. 可审计、确定性、对生产治理友好\n5. 不将产品层的 Agent 逻辑强塞进框架核心\n\n如果某个提案依赖于:\n- Prompt 模板\n- 向量存储选型\n- 模型厂商 SDK 频繁变更\n- 对话记忆策略\n- Agent 状态机\n\n那么它可能更适合放在**生态项目/适配器/插件**中,而不是 `dubbo-go` 核心。\n\n---\n\n## 5. 推荐的路线图形态\n\n### 阶段一:AI-ready 基础设施\n\n聚焦于:\n- 能力元数据模型\n- AI 感知的服务发现\n- 路由策略扩展\n- AI 可观测性指标/标签\n- 流式/取消加固\n\n### 阶段二:AI 集成的工具链\n\n聚焦于:\n- 工具 Schema 生成\n- 泛化调用 → 工具暴露\n- 更好地对齐 OpenAPI / Triple / AI 消费者的契约/工具链\n\n### 阶段三:生态孵化\n\n在核心之外孵化:\n- MCP 适配器\n- 服务到工具的桥接\n- AI 网关集成模式\n- 运维助手/诊断工具\n\n这样可以让核心保持干净,同时仍然能够在 `dubbo-go` 周围赋能 AI 生态。\n\n---\n\n## 6. 我的具体建议\n\n如果社区想用一句话描述这个方向,我建议:\n\n> `apache/dubbo-go` 应该演进为面向 AI 服务的高性能 Go RPC 和治理基础设施,而不是又一个 AI 应用框架。\n\n如果我们想要一个简短的优先级列表,我会这样排序:\n\n1. **AI 能力感知的元数据和发现**\n2. **治理感知的模型/服务路由**\n3. **AI 专用的可观测性**\n4. **面向 AI 流量的流式/取消/会话加固**\n5. **基于泛化调用和代码生成的工具/Schema 暴露**\n6. **将 Agent/Prompt/RAG 编排留在生态中,而非核心**\n\n---\n\n## 7. 给社区的问题\n\n我认为下一步有用的工作不是立即写代码,而是对齐边界和优先级。\n\n问题:\n1. 我们是否同意 `dubbo-go` 在 AI 时代的主要角色应该是 **AI 服务基础设施**,而不是 **AI 应用框架**?\n2. 在元数据/路由/可观测性/工具暴露中,哪一个应该成为第一个社区级方向?\n3. AI 相关功能应该直接进入核心,还是某些部分应该先作为插件/适配器/独立项目孵化?\n4. 社区是否已经有具体的生产用例可以作为锚点场景?\n\n如果有兴趣,这个讨论后续可以按主题拆分为更小的 RFC / Issue。\n",
"url": "https://github.com/apache/dubbo-go/discussions/3454",
"createdAt": "2026-06-25T08:41:27Z",
"updatedAt": "2026-06-25T09:36:56Z",
"closed": false,
"closedAt": null,
"isAnswered": null,
"author": {
"login": "AlexStocks"
},
"category": {
"name": "Ideas"
},
"answer": null,
"comments": []
},
{
"number": 3534,
"title": "2026-07-26 weekly",
"body": "# 🧭 Dubbo-go 社区周报\r\n\r\n| 项目 | 链接 |\r\n| --------------- | ------------------------------------------------------------ |\r\n| gost | https://github.com/dubbogo/gost |\r\n| hessian2 | https://github.com/apache/dubbo-go-hessian2 |\r\n| pixiu | https://github.com/apache/dubbo-go-pixiu/ |\r\n| pixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples |\r\n| dubbogo-samples | https://github.com/apache/dubbo-go-samples/issues |\r\n\r\n------\r\n\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ------- | -------- | --------- | ---------- |\r\n| 泛化调用 | https://github.com/apache/dubbo-go/issues/3472 | yongjia | |\r\n| 可观测性 | https://github.com/apache/dubbo-go/issues/3292 | shibin | 补全 + 和admin打通 |\r\n| metadata | https://github.com/apache/dubbo-go/issues/3499 | shibin | 和admin打通 |\r\n| router | | xinran | 和admin打通 | \r\n| | | | | ",
"url": "https://github.com/apache/dubbo-go/discussions/3534",
"createdAt": "2026-07-26T13:02:43Z",
"updatedAt": "2026-07-27T08:06:49Z",
"closed": false,
"closedAt": null,
"isAnswered": null,
"author": {
"login": "Alanxtl"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
},
{
"number": 3673,
"title": "[OSPP 2026] Triple 协议性能分析与优化",
"body": "## Dubbo-Go Triple 协议性能分析与优化\r\n\r\n> OSPP 2026 · Apache Dubbo-Go\r\n\r\n### 项目背景\r\n\r\nTriple 是 Dubbo 3 的核心 RPC 协议,也是 Dubbo-Go 面向生产环境的主力协议。社区已提供 Dubbo-Go / Dubbo-Java / gRPC-Go 三端 benchmark 对比工具(PR #3502),本机实测确认 Dubbo-Go 与 gRPC-Go 在 unary 小包场景存在明显吞吐差距。项目以可复现的 benchmark 与 profiling 数据为依据,系统化定位 Triple unary 热路径中的固定开销,在保持 Triple 功能、gRPC 兼容及 Dubbo-Java 互通的前提下落地优化,产出可合并的社区 PR。\r\n\r\n### Step 1: 基线建立\r\n\r\n- [x] profiling 工具链(pprof CPU/内存火焰图、runtime/trace、benchstat 显著性检验)26-8-17 Done\r\n- [x] 三端基准测试(Dubbo-Go / gRPC-Go / Dubbo-Java,以及补充场景)26-08-17—26-08-18 Done \r\nhttps://github.com/apache/dubbo-go/discussions/3673#discussioncomment-18071388\r\n- [x] 兼容性回归基线(Triple 协议兼容、gRPC 兼容、Dubbo-Java 互通)26-8-18—26-8-19 Done\r\nhttps://github.com/apache/dubbo-go/pull/3677\r\nhttps://github.com/apache/dubbo-go/pull/3689\r\n\r\n### Step 2: 瓶颈定位与优化设计\r\n\r\n(从已定位的低风险固定开销开始验证,再根据正式 profiling 数据决定是否深入 Envelope、Buffer 或 Codec 热路径)\r\n\r\n- [x] io.Pipe 交接与每请求 goroutine(调度与管道交接开销,已验证)26-8-19—26-8-21 Done\r\nhttps://github.com/apache/dubbo-go/discussions/3673#discussioncomment-18111020\r\n- [x] 分析codec层内存分配可优化点 26-9-2—26-9-3 Done\r\nhttps://github.com/apache/dubbo-go/discussions/3673#discussioncomment-18268020\r\n- [x] 消掉 wrapper 层的新分配 于2026-9-12开始 进行中\r\nhttps://github.com/apache/dubbo-go/discussions/3673#discussioncomment-18483329\r\n- [ ] envelope 写路径(prefix 与 body 分离写入、多次 flush)\r\n- [ ] buffer 复用(Reset 不缩容:小消息占大缓冲、大消息反复扩容)\r\n- [ ] header/metadata 处理(重复拷贝与规范化)\r\n- [ ] codec 序列化与反序列化(非 protobuf 场景分配放大)\r\n- [ ] http2.Transport 参数与连接池调优(可选探索)\r\n\r\nStep 3: 优化落地\r\n\r\n- [x] 落地 io.Pipe 交接固定开销的消除路径 26-8-20—26-9-2 Done\r\nhttps://github.com/apache/dubbo-go/pull/3706\r\n- [x] 落地codec层内存分配优化(新加接口)于26-9-4—26-9-6 Done\r\nhttps://github.com/apache/dubbo-go/pull/3718\r\n- [ ] 写路径对齐缓冲(合并 prefix 与 body 的大块写入)\r\n- [ ] header/metadata 路径优化(合并拷贝、去除重复规范化)\r\n- [ ] buffer 复用优化(按消息长度预扩容、分级缓冲池)\r\n- [ ] codec 复用与压缩/解压输出预扩容\r\n- [ ] 写路径对齐缓冲(合并 prefix 与 body 的大块写入)\r\n- [ ] http2.Transport 参数与连接池调优(可选探索)\r\n\r\nStep 4: 验证与交付\r\n\r\n- [ ] 同环境 A/B 对比 + benchstat(Mann-Whitney U,α=0.05)量化收益\r\n- [ ] 全量回归测试,确认兼容性红线\r\n- [ ] 优化前后性能数据整理,输出对比结论\r\n\r\n> 这份文档会随任务推进而细化,每个任务对应有的性能报告、瓶颈验证、具体优化方案等会随进度以markdown文档形式发在评论区,原始数据以链接形式放在文档里。",
"url": "https://github.com/apache/dubbo-go/discussions/3673",
"createdAt": "2026-08-17T10:38:17Z",
"updatedAt": "2026-09-20T02:31:03Z",
"closed": false,
"closedAt": null,
"isAnswered": null,
"author": {
"login": "lizining1231"
},
"category": {
"name": "General"
},
"answer": null,
"comments": [
{
"id": "DC_kwDOCJS8R84BE79c",
"url": "https://github.com/apache/dubbo-go/discussions/3673#discussioncomment-18071388",
"body": "这里是一份初步的性能基准测试报告:\r\n\r\n# Dubbo-Go grpc协议 基准测试报告\r\n\r\n## 目录\r\n\r\n- 一、测试环境\r\n- 二、测试配置\r\n- 三、测试数据\r\n- 四、服务端内存分配(B/op、allocs/op)测试数据\r\n- 五、特定场景测试数据摘要\r\n- 六、性能优化\r\n- 七、许可证\r\n\r\n## 一、测试环境\r\n\r\n- **Go 版本**: 1.25.6\r\n- **Java 版本**: 17.0.19\r\n- **Maven**: 3.9.16\r\n- **OS**: Ubuntu 24.04.1 LTS (WSL2, Linux 6.6.87)\r\n- **CPU**: Intel Core i7-10750H @ 2.60GHz, 6 核 12 线程\r\n- **内存**: 7.6 GiB\r\n- **测试框架**: Dubbo-Go / gRPC / Dubbo-Java\r\n- **预热时间**: 10s\r\n- **测试时长**: 每个用例 60s\r\n- **轮次**: 5 轮 × 24场景取中位数\r\n\r\n## 二、测试配置\r\n\r\n| 参数 | 值 |\r\n| ---- | -------------------------- |\r\n| 报文大小 | 128B / 1KiB / 16KiB / 1MiB |\r\n| 序列化 | protobuf |\r\n| 压缩 | none |\r\n| 并发数 | 50 / 100 |\r\n| 调用模式 | unary |\r\n\r\n## 三、测试数据\r\n\r\n### 1. 128 bytes 报文\r\n\r\n#### QPS(每秒请求数)\r\n\r\n| 并发数 | dubbo-go | grpc | dubbo-java |\r\n| --- | -------- | -------- | ---------- |\r\n| 50 | 4,425.4 | 40,561.9 | 10,625.8 |\r\n| 100 | 4,537.6 | 47,064.7 | 10,667.0 |\r\n\r\n#### P99 延迟 (ms)\r\n\r\n| 并发数 | dubbo-go | grpc | dubbo-java |\r\n| --- | -------- | ---- | ---------- |\r\n| 50 | 19.56 | 3.58 | 6.74 |\r\n| 100 | 33.29 | 5.54 | 12.23 |\r\n\r\n### 2. 1024 bytes 报文\r\n\r\n#### QPS(每秒请求数)\r\n\r\n| 并发数 | dubbo-go | grpc | dubbo-java |\r\n| --- | -------- | -------- | ---------- |\r\n| 50 | 3,597.7 | 33,508.7 | 8,870.0 |\r\n| 100 | 3,670.8 | 42,400.3 | 8,919.1 |\r\n\r\n#### P99 延迟 (ms)\r\n\r\n| 并发数 | dubbo-go | grpc | dubbo-java |\r\n| --- | -------- | ---- | ---------- |\r\n| 50 | 21.51 | 4.09 | 7.79 |\r\n| 100 | 42.96 | 6.80 | 14.07 |\r\n\r\n### 3. 16384 bytes 报文\r\n\r\n#### QPS(每秒请求数)\r\n\r\n| 并发数 | dubbo-go | grpc | dubbo-java |\r\n| --- | -------- | -------- | ---------- |\r\n| 50 | 1,980.3 | 11,882.1 | 4,772.9 |\r\n| 100 | 1,829.6 | 12,852.9 | 4,819.3 |\r\n\r\n#### P99 延迟 (ms)\r\n\r\n| 并发数 | dubbo-go | grpc | dubbo-java |\r\n| --- | -------- | ----- | ---------- |\r\n| 50 | 43.24 | 10.07 | 21.03 |\r\n| 100 | 93.16 | 16.28 | 32.91 |\r\n\r\n### 4. 1048576 bytes 报文\r\n\r\n#### QPS(每秒请求数)\r\n\r\n| 并发数 | dubbo-go | grpc | dubbo-java |\r\n| --- | -------- | ----- | ---------- |\r\n| 50 | 122.9 | 284.5 | 288.4 |\r\n| 100 | 119.4 | 274.0 | 293.5 |\r\n\r\n#### P99 延迟 (ms)\r\n\r\n| 并发数 | dubbo-go | grpc | dubbo-java |\r\n| --- | -------- | ------ | ---------- |\r\n| 50 | 1,074.68 | 261.09 | 279.11 |\r\n| 100 | 2,400.09 | 511.09 | 697.37 |\r\n\r\n## 四、服务端内存分配(B/op、allocs/op)测试数据\r\n\r\n### 1. 128 bytes 报文\r\n\r\n#### B/op(每请求分配字节)\r\n\r\n| 并发数 | dubbo-go | grpc | dubbo-java |\r\n| --- | -------- | ----- | ---------- |\r\n| 50 | 23,307 | 5,899 | 20,345 |\r\n| 100 | 22,976 | 5,895 | 20,342 |\r\n\r\n#### allocs/op(每请求分配次数)\r\n\r\n| 并发数 | dubbo-go | grpc |\r\n| --- | -------- | ---- |\r\n| 50 | 151.5 | 79.4 |\r\n| 100 | 151.5 | 79.3 |\r\n\r\n### 2. 1024 bytes 报文\r\n\r\n#### B/op(每请求分配字节)\r\n\r\n| 并发数 | dubbo-go | grpc | dubbo-java |\r\n| --- | -------- | ----- | ---------- |\r\n| 50 | 27,659 | 8,847 | 23,160 |\r\n| 100 | 27,317 | 8,844 | 23,163 |\r\n\r\n#### allocs/op(每请求分配次数)\r\n\r\n| 并发数 | dubbo-go | grpc |\r\n| --- | -------- | ---- |\r\n| 50 | 153.1 | 79.6 |\r\n| 100 | 153.1 | 79.4 |\r\n\r\n### 3. 16384 bytes 报文\r\n\r\n#### B/op(每请求分配字节)\r\n\r\n| 并发数 | dubbo-go | grpc | dubbo-java |\r\n| --- | -------- | ------ | ---------- |\r\n| 50 | 123,700 | 60,638 | 86,883 |\r\n| 100 | 113,426 | 60,625 | 86,922 |\r\n\r\n#### allocs/op(每请求分配次数)\r\n\r\n| 并发数 | dubbo-go | grpc |\r\n| --- | -------- | ---- |\r\n| 50 | 161.2 | 81.7 |\r\n| 100 | 164.5 | 81.4 |\r\n\r\n### 4. 1048576 bytes 报文\r\n\r\n#### B/op(每请求分配字节)\r\n\r\n| 并发数 | dubbo-go | grpc | dubbo-java |\r\n| --- | --------- | --------- | ---------- |\r\n| 50 | 3,124,173 | 3,176,880 | 4,417,419 |\r\n| 100 | 3,085,140 | 3,173,124 | 4,413,321 |\r\n\r\n#### allocs/op(每请求分配次数)\r\n\r\n| 并发数 | dubbo-go | grpc |\r\n| --- | -------- | ----- |\r\n| 50 | 407.4 | 119.7 |\r\n| 100 | 406.9 | 104.9 |\r\n\r\n## 五、特定场景测试数据摘要\r\n\r\n### 1. 128B × 100 并发场景三端表现\r\n\r\n| 指标 | dubbo-go | grpc | dubbo-java |\r\n| --------- | -------- | -------- | ---------- |\r\n| QPS | 4,537.6 | 47,064.7 | 10,667.0 |\r\n| P99 (ms) | 33.29 | 5.54 | 12.23 |\r\n| B/op | 22,976 | 5,895 | 20,342 |\r\n| allocs/op | 151.5 | 79.3 | N/A |\r\n\r\n### 2. 1MiB × 50/100 并发场景三端表现\r\n\r\n**1Mib × 50 并发**\r\n\r\n| 指标 | dubbo-go | grpc | dubbo-java |\r\n| --------- | --------- | --------- | ---------- |\r\n| QPS | 122.9 | 284.5 | 288.4 |\r\n| P99 (ms) | 1,074.68 | 261.09 | 279.11 |\r\n| B/op | 3,124,173 | 3,176,880 | 4,417,419 |\r\n| allocs/op | 407.4 | 119.7 | N/A |\r\n\r\n**1Mib × 100 并发**\r\n\r\n| 指标 | dubbo-go | grpc | dubbo-java |\r\n| --------- | --------- | --------- | ---------- |\r\n| QPS | 119.4 | 274.0 | 293.5 |\r\n| P99 (ms) | 2,400.09 | 511.09 | 697.37 |\r\n| B/op | 3,085,140 | 3,173,124 | 4,413,321 |\r\n| allocs/op | 406.9 | 104.9 | N/A |\r\n\r\n## 六、性能优化\r\n\r\n### Dubbo-Go 客户端优化\r\n\r\n参照社区已有benchmark,为获得最佳性能,Dubbo-Go 客户端使用了以下优化配置:\r\n\r\n| 配置项 | 说明 |\r\n| -------------------------- | ---------------- |\r\n| `WithClientNoCheck()` | 跳过服务检查,减少不必要的开销 |\r\n| `MaxCallRecvMsgSize: 16MB` | 最大接收消息大小,支持大报文测试 |\r\n| `MaxCallSendMsgSize: 16MB` | 最大发送消息大小,支持大报文测试 |\r\n\r\n### Dubbo-Go 服务端优化\r\n\r\n参照社区已有benchmark,服务端配置了以下优化参数:\r\n\r\n| 配置项 | 说明 |\r\n| ---------------------------------- | -------- |\r\n| `WithMaxServerRecvMsgSize(\"16MB\")` | 最大接收消息大小 |\r\n| `WithMaxServerSendMsgSize(\"16MB\")` | 最大发送消息大小 |\r\n\r\n## 七、许可证\r\n\r\nApache License 2.0\r\n",
"createdAt": "2026-08-18T20:48:48Z",
"updatedAt": "2026-08-25T20:58:35Z",
"author": {
"login": "lizining1231"
},
"replies": []
},
{
"id": "DC_kwDOCJS8R84BE8IF",
"url": "https://github.com/apache/dubbo-go/discussions/3673#discussioncomment-18072069",
"body": "非瓶颈分析定位,先对这份报告做出一些初步解释:\r\n### 1. **无法复现社区现有数据趋势**:\r\n测试显示在本机环境下dubbo-go的性能表现略弱于dubbo-java,与社区测试数据结论相违背。目前排除wsl2拖慢golang的可能性,现有数据报告显示部分场景dubbo-go与gRPC部分场景QPS比值接近1:5,在本机被放大为1:10,问题需进一步换环境/切版本分支等 尝试推进排查\r\n### 2. **dubbo-java无allocs/op数据**:\r\nJava 标准 API 只能统计分配字节数,没有精确的分配次数接口\r\n### 3. **对benchmark工具进行了一些修复适配**:\r\n\r\n| 行为 | 说明 |\r\n| ---------------------------------------- | ------------------------------------- |\r\n| `dubbo.protocol.name=tri` | 协议由 `dubbo` 改为 Triple(SPI 扩展名 `tri`) |\r\n| `@EnableDubbo(scanBasePackages=\"benchmark\")` | 扫描包对齐 Go 端 `benchmark.BenchmarkService` |\r\n| protobuf 生成类 (`BenchmarkProto`) | 消息契约由手写 POJO 改为 protobuf 生成类,序列化与 Go 端一致 |\r\n| `dubbo-rpc-triple` 依赖 | 引入 Triple 协议实现模块 |\r\n### 4. **与社区一致的指标与趋势**:\r\n测试与社区现有测试数据绝对值与指标比例均不符合,但是:\r\n#### ①测试出的饱和拐点与社区一致\r\n50→100 并发下社区与本地都是 dubbo-go 已饱和/微降 dubbo-go 128B 社区测 -2.5%、本地测 +2.5%;16KiB 社区本地测都降), grpc 仍线性增长 (社区测 +10.7%、本地测 +16%)\r\n#### ②衰减曲线大部分形状与趋势一致\r\n如50并发下QPS 相对衰减(这里归一化 128B=1.00):\r\n\r\n| 框架 | 数据源 | 128B | 1KiB | 16KiB | 1MiB |\r\n| --- | --- | --- | --- | --- | --- |\r\n| dubbo-go | 社区 | 1.00 | 0.89 | 0.48 | 0.02 |\r\n| dubbo-go | 本地 | 1.00 | 0.81 | 0.45 | 0.03 |\r\n| grpc | 社区 | 1.00 | 0.87 | 0.41 | 0.01 |\r\n| grpc | 本地 | 1.00 | 0.83 | 0.29 | 0.007 |\r\n| dubbo-java | 社区 | 1.00 | 0.91 | 0.47 | 0.03 |\r\n| dubbo-java | 本地 | 1.00 | 0.83 | 0.45 | 0.03 |\r\n\r\n
\r\n\r\n### 6. **本次推进带来的新事项**:\r\n- [x] 修复benchmark保证测试成功率 #3677 \r\n- [x] benchmark修复与提交,使其存在测试java的能力 #3689 \r\n- [x] 解读性能报告,初步确定瓶颈并进一步推进瓶颈分析\r\n\r\n\r\n### 7. 这份测试报告在参照社区测试报告(benchmark/README.md)的基础上扩展了哪些内容:\r\n#### ①增加指标allocs/op 与 B/op\r\n#### ②增加轮次、环境信息\r\n\r\n### 8. **一些本机与社区测试都可以得出的优化方向结论**:\r\n#### ①小包相较于大包是 Triple 短板\r\n都出现小包下与 grpc 差距大于大包下与grpc差距 (社区测得128B 低 5.4x vs 1MiB 低 4.1x ,本机测得128B 低 9.2x vs 1MiB 低 2.3x)\r\n#### ②大包路径需优化\r\n从绝对数值来看1 MiB 大包 都出现QPS断崖下跌,P99 崩塌(QPS 跌 57 倍、P99 795ms QPS 跌 38 倍、P99 2,400ms)\r\n\r\n",
"createdAt": "2026-08-18T22:20:38Z",
"updatedAt": "2026-08-20T17:41:29Z",
"author": {
"login": "lizining1231"
},
"replies": [
{
"id": "DC_kwDOCJS8R84BE8f1",
"url": "https://github.com/apache/dubbo-go/discussions/3673#discussioncomment-18073589",
"body": "和社区结果不一致这个事情在这个阶段不用纠结",
"createdAt": "2026-08-19T01:48:04Z",
"updatedAt": "2026-08-19T01:48:04Z",
"author": {
"login": "Alanxtl"
}
},
{
"id": "DC_kwDOCJS8R84BE84p",
"url": "https://github.com/apache/dubbo-go/discussions/3673#discussioncomment-18075177",
"body": "> 和社区结果不一致这个事情在这个阶段不用纠结\n\n\n好,那我接下来的方向调整为:\n- 提交benchmark的issue与PR以支持java\n- 定位分析一个明显的瓶颈并提出可能的解决方案\n\n产出内容是相关pr和瓶颈分析报告。并对近期TODO同步调整,删除排查数据不一致问题的任务\n\n",
"createdAt": "2026-08-19T05:07:19Z",
"updatedAt": "2026-08-19T05:07:19Z",
"author": {
"login": "lizining1231"
}
}
]
},
{
"id": "DC_kwDOCJS8R84BFFos",
"url": "https://github.com/apache/dubbo-go/discussions/3673#discussioncomment-18111020",
"body": "这里是一份针对Triple-unary的性能瓶颈分析报告,里面有一定的方案设计,如果没问题,之后的推进形式是issue和PR\r\n# 性能瓶颈分析报告(一)Triple-unary 热路径 io.Pipe 专项\r\n\r\n## 目录\r\n\r\n一、全文摘要\r\n\r\n二、数据分析与瓶颈假设\r\n\r\n三、代码瓶颈定位\r\n\r\n四、多工具交叉验证瓶颈\r\n\r\n五、方案设计与演进\r\n\r\n六、方案验证与实施\r\n\r\n七、预估收益\r\n\r\n八、参考链接\r\n\r\n## 一、摘要\r\n\r\n本文针对 Triple unary 热路径的固定开销(每请求新建 `io.Pipe` + 额外 goroutine)做了一次完整分析:从基准数据定位到该瓶颈,用 pprof / trace 多工具交叉验证,再设计并实现 unary 快路径(去 pipe、去每请求 goroutine、池化单拷贝,并声明 Content-Length 与 `fastPathBody`)。方案原型 A/B 实测多指标全正\r\n\r\n快路径方案拟以 `unaryFastPathCall` 形态落地,并配套独立开关 `unary-fast-path`(默认关闭,改配置即可回滚)。预估生产集成后收益收敛为:QPS **+8%\\~+10%**、P99 **-5%\\~-15%**、延迟 **-10%\\~-25%**、allocs **持平\\~微增**。\r\n\r\n## 二、数据分析与瓶颈假设\r\n\r\n这里从基准测试数据报告入手,挑选一些特定场景的数据总结规律,这些规律均指向固定开销,然后定位到固定开销的瓶颈。\r\n\r\n### 2.1.1 小报文性能差距最大:\r\n\r\n**QPS 对比**\r\n\r\n| 并发数 | dubbo-go | grpc | dubbo-java |\r\n| --- | ----------- | -------- | ---------- |\r\n| 50 | **4,425.4** | 40,561.9 | 10,625.8 |\r\n| 100 | **4,537.6** | 47,064.7 | 10,667.0 |\r\n\r\n**P99 对比**\r\n\r\n| 并发数 | dubbo-go | grpc | dubbo-java |\r\n| --- | --------- | ---- | ---------- |\r\n| 50 | **19.56** | 3.58 | 6.74 |\r\n| 100 | **33.29** | 5.54 | 12.23 |\r\n\r\n在 50 并发×128B 小包场景下,**gRPC 的 QPS 约为 dubbo-go 的 9.2 倍**(dubbo-go 明显落后),而 dubbo-go 的 P99 延迟约为 gRPC 的 **5.5 倍**;在 100 并发×128B 小包场景下,**gRPC 的 QPS 约为 dubbo-go 的 10.4 倍**,dubbo-go 的 P99 延迟约为 gRPC 的 **6.0 倍**。对比 50 并发可见:并发越高、小报文差距越大(QPS 差距 9.2x → 10.4x,P99 差距 5.5x → 6.0x),**高并发 × 小报文是差距最大的场景**,也是本报告的主要场景。\r\n\r\n### 2.1.2 性能差距随报文增大而降低\r\n\r\n**50 并发 · QPS 差距**\r\n\r\n| 报文 | dubbo-go QPS | grpc QPS | grpc/dubbo-go |\r\n| ----- | ------------ | -------- | ------------- |\r\n| 128B | 4,425.4 | 40,561.9 | **9.2x** |\r\n| 1KiB | 3,597.7 | 33,508.7 | **9.3x** |\r\n| 16KiB | 1,980.3 | 11,882.1 | **6.0x** |\r\n| 1MiB | 122.9 | 284.5 | **2.3x** |\r\n\r\n**50 并发 · P99 差距**\r\n\r\n| 报文 | dubbo-go P99 (ms) | grpc P99 (ms) | dg/grpc |\r\n| ----- | ----------------- | ------------- | --------- |\r\n| 128B | 19.56 | 3.58 | **5.5x** |\r\n| 1KiB | 21.51 | 4.09 | **5.3x** |\r\n| 16KiB | 43.24 | 10.07 | **4.3x** |\r\n| 1MiB | 1,074.68 | 261.09 | **4.1x** |\r\n\r\n**100 并发 · QPS 差距**\r\n\r\n| 报文 | dubbo-go QPS | grpc QPS | grpc/dubbo-go |\r\n| ----- | ------------ | -------- | ------------- |\r\n| 128B | 4,537.6 | 47,064.7 | **10.4x** |\r\n| 1KiB | 3,670.8 | 42,400.3 | **11.6x** |\r\n| 16KiB | 1,829.6 | 12,852.9 | **7.0x** |\r\n| 1MiB | 119.4 | 274.0 | **2.3x** |\r\n\r\n**100 并发 · P99 差距**\r\n\r\n| 报文 | dubbo-go P99 (ms) | grpc P99 (ms) | dg/grpc |\r\n| ----- | ----------------- | ------------- | --------- |\r\n| 128B | 33.29 | 5.54 | **6.0x** |\r\n| 1KiB | 42.96 | 6.80 | **6.3x** |\r\n| 16KiB | 93.16 | 16.28 | **5.7x** |\r\n| 1MiB | 2,400.09 | 511.09 | **4.7x** |\r\n\r\ndubbo-go 与 gRPC 的**性能差距(QPS 与 P99)随报文增大呈现缩小趋势**:QPS 差距 128B 时约 9\\~10 倍、1MiB 时约 2.3 倍;P99 差距 128B 时约 5.5\\~6 倍、1MiB 时约 4\\~4.7 倍。但**并非严格单调递减**:1KiB(QPS 9.3x / P99 5.3x)与 128B 几乎持平,16KB 以上才出现明显收窄。这非常符合**每请求的固定开销被摊薄**的模型,因为报文越小,固定开销在单请求耗时中占比越高,性能差距也就越大;当报文越大时,传输带宽替代固定开销成为主要耗时占比,差距自然变小。同时对比 50/100 两档并发可见:**并发越高、小报文差距越大**(128B QPS 差距 9.2x → 10.4x、P99 差距 5.5x → 6.0x),进一步印证高并发 × 小报文是固定开销最显著的主战场。\r\n\r\n也可以参考这个简化模型来解释:\r\n单次请求总耗时 = 固定开销 + ( 报文大小 / 物理带宽 )\r\n\r\n所以此次优化不仅仅是定位小报文高并发场景,而是小报文瓶颈背后所体现的固定开销:\r\n\r\ndubbo-go 的 **triple\\_protocol 层 unary 客户端发送路径**(`duplexHTTPCall`,即基于 connect-go 的 unary 发送实现)存在固定开销,包括:**每请求创建 io.Pipe、每请求启动 goroutine、多次系统调用、goroutine 调度(futex)唤醒**。此次瓶颈定位范围仅限 unary 客户端发送路径,**不含** dubbo-go 上层框架与服务端路径开销,也不涉及与 gRPC 共有的 HTTP/2 连接层。\r\n\r\n### 2.1.3 内存分配差距不足以解释吞吐差距\r\n\r\n| 指标(128B × 50并发) | dubbo-go | grpc | 比值 |\r\n| --------------- | -------- | -------- | -------- |\r\n| QPS | 4,425.4 | 40,561.9 | **9.2x** |\r\n| B/op | 23,307 | 5,899 | **3.9x** |\r\n| allocs/op | 151.5 | 79.4 | **1.9x** |\r\n\r\n若吞吐与单请求分配量成反比(QPS ∝ 1/分配量),则 B/op 差距 3.9x 最多把吞吐差距解释到 3.9x,占实际差距 9.2x 的约 42%(3.9 ÷ 9.2 ≈ 0.42),即分配因素**最多解释约 4 成**差距,其余约 6 成与分配量无关,只能由每请求固定开销(io.Pipe、goroutine、调度)解释。\r\n\r\n### 2.2.1 瓶颈定位假设\r\n\r\n先来定义一下什么叫dubbo-go triple unary存在的固定开销,\r\n\r\n**①每请求固定发生、②与报文无关、③gRPC-Go 类似路径不执行**\r\n\r\n| 候选 | unary 是否触发 | gRPC-Go 是否存在 |\r\n| --------------------------------------- | ---------- | ------------------------ |\r\n| **`io.Pipe()`** **新建无缓冲管道** | **每次** | **否** |\r\n| **`go makeRequest()`** **额外 goroutine** | **每次** | **否(loopyWriter 常驻连接级)** |\r\n| `cloneURL` + `http.Request` 构造 | 每次 | 是(无管道) |\r\n| Header 双重拷贝 | 每次 | 单次 |\r\n| `bytes.NewBuffer(raw)` 包装 | 每次 | 是 |\r\n\r\n我们可以发现,其中 **`io.Pipe`** **与每请求 goroutine** 是 dubbo-go 独有、每次 unary 必发生、且 gRPC-Go 完全缺失的固定开销,锁定这两项后,接下来看一下这些固定请求的代码。\r\n\r\n## 三、代码瓶颈定位\r\n\r\n### 3.1 每请求新建无缓冲管道 `io.Pipe()`:同步交接 + 4KB 中间缓冲 + 双 channel 同步\r\n\r\n[duplex\\_http\\_call.go L59-L103](https://github.com/lizining1231/dubbo-go/blob/76631118/protocol/triple/triple_protocol/duplex_http_call.go#L59-L103)(`newDuplexHTTPCall`:cloneURL → io.Pipe → 请求体挂管道读端)\r\n\r\n```go\r\nfunc newDuplexHTTPCall(\r\n\tctx context.Context,\r\n\thttpClient HTTPClient,\r\n\turl *url.URL,\r\n\tspec Spec,\r\n\theader http.Header,\r\n) *duplexHTTPCall {\r\n\turl = cloneURL(url) // 每次拷贝 URL\r\n\turl.Path = spec.Procedure\r\n\tpipeReader, pipeWriter := io.Pipe() // 每次调用创建无缓冲同步管道\r\n\r\n\trequest := (&http.Request{\r\n\t\tMethod: http.MethodPost,\r\n\t\tURL: url,\r\n\t\tHeader: header,\r\n\t\tBody: pipeReader, // 请求体为管道读端\r\n\t\tHost: url.Host,\r\n\t}).WithContext(ctx)\r\n\treturn &duplexHTTPCall{ ... }\r\n}\r\n```\r\n\r\n### 3.2 每请求 goroutine\r\n\r\n[duplex\\_http\\_call.go L265-L307](https://github.com/lizining1231/dubbo-go/blob/76631118/protocol/triple/triple_protocol/duplex_http_call.go#L265-L307)(`makeRequest`:`httpClient.Do` 发送路径)\r\n\r\n```go\r\nfunc (d *duplexHTTPCall) ensureRequestMade() {\r\n\td.sendRequestOnce.Do(func() {\r\n\t\tgo d.makeRequest() // 每次调用启动独立 goroutine\r\n\t})\r\n}\r\n\r\nfunc (d *duplexHTTPCall) makeRequest() {\r\n\tdefer close(d.responseReady)\r\n\tresponse, err := d.httpClient.Do(d.request) // x/net/http2 另为每个请求启动\r\n\t... // goroutine 关闭请求体\r\n}\r\n```\r\n\r\n### 3.3 写路径的同步交接\r\n\r\n([`duplex_http_call.go` L108-L126](https://github.com/lizining1231/dubbo-go/blob/76631118/protocol/triple/triple_protocol/duplex_http_call.go#L108-L126)):\r\n\r\n```go\r\n// duplex_http_call.go:写入管道写端,阻塞至 transport 读取(同步交接)\r\nfunc (d *duplexHTTPCall) Write(data []byte) (int, error) {\r\n\td.ensureRequestMade() // 触发 goroutine\r\n\tbytesWritten, err := d.requestBodyWriter.Write(data) // 阻塞交接\r\n\t...\r\n}\r\n```\r\n\r\n> 注:Triple unary 请求体**无 5 字节 envelope 帧化**,`tripleUnaryMarshaler.write` 将消息体单次写入 `writer.Write(data)`([`protocol_triple.go`](https://github.com/lizining1231/dubbo-go/blob/76631118/protocol/triple/triple_protocol/protocol_triple.go#L526-L527) [L526-L527](https://github.com/lizining1231/dubbo-go/blob/76631118/protocol/triple/triple_protocol/protocol_triple.go#L526-L527));`envelopeWriter`(5 字节 prefix + body 分离两次写)仅 gRPC 协议使用([`protocol_grpc.go`](https://github.com/lizining1231/dubbo-go/blob/76631118/protocol/triple/triple_protocol/protocol_grpc.go#L206) [L206](https://github.com/lizining1231/dubbo-go/blob/76631118/protocol/triple/triple_protocol/protocol_grpc.go#L206) / [L298](https://github.com/lizining1231/dubbo-go/blob/76631118/protocol/triple/triple_protocol/protocol_grpc.go#L298)),不属于 Triple unary 写路径。\r\n\r\n### 3.4 与gRPC此处实现差异\r\n\r\n| 对比项 | dubbo-go(Triple) | gRPC-Go |\r\n| --------------- | --------------------------------------- | ----------------------------------------------- |\r\n| unary 请求体承载 | io.Pipe(无缓冲同步管道) | 直接写入 HTTP/2 stream |\r\n| 每请求额外 goroutine | 1 个(makeRequest)+ http2 关闭请求体 goroutine | 0 个(loopyWriter 每连接常驻 1 个) |\r\n| 写路径 | 消息体单次写入(无帧化),经 io.Pipe 交接 | 5 字节 hdr 与 data 打包进 controlBuf,loopyWriter 合并写出 |\r\n| 同步机制 | 管道内部双 channel 同步(chanrecv 等待) | 无 |\r\n\r\n分析:`duplexHTTPCall` 的全双工设计(管道 + goroutine + responseReady channel)服务于 streaming 语义。unary 场景下请求体在请求发起前已完整就绪,无需流式写入与并发读写,该机制属于设计冗余。gRPC-Go 的 unary 直接写入 stream,不存在管道与每 RPC goroutine,这是小报文固定开销差距的主要来源。\r\n\r\n## 四、多工具交叉验证瓶颈\r\n\r\n### 4.1 pprof采集goroutine分布\r\n\r\ndubbo-go\r\n
\r\n\r\ngRPC-go\r\n
\r\n\r\n解读一下,**gRPC** 压测稳态下共 **114 个 goroutine**:**99 个**是压测 worker 的请求 goroutine,阻塞在 `waitOnHeader`(等待响应头到达);其余约 15 个是运行时基础设施\r\n\r\n**dubbo-go 这边**,共 **312 个 goroutine**,分布为:\r\n\r\n**99 个**阻塞在 `duplexHTTPCall.makeRequest`,每请求启动的发送 goroutine,等待 HTTP 响应\r\n\r\n**90 个**阻塞在 `io.(*pipe).write`,请求体写入无缓冲管道,等待 transport 读取交接\r\n\r\n**98 个**阻塞在 `http2 clientStream.writeRequest`,连接层写帧,等待流控窗口 / 等待管道数据\r\n\r\n**8 个**阻塞在 `BlockUntilResponseReady`,等待响应就绪信号\r\n\r\n其余约 **17 个**为运行时基础设施\r\n\r\n对比可见:dubbo-go 的 goroutine 主要分布在 **io.Pipe 交接** 与 **每请求 goroutine(makeRequest)** 两条机制上(99 + 90 = 189 / 312 ≈ **61%**);gRPC 没有这两条机制(其请求发送在 worker goroutine 内同步完成,连接写由常驻 loopyWriter 处理)。这正是 unary 快路径方案想要去除的开销。\r\n\r\n### 4.2 pprof 采集CPU热点\r\n\r\ndubbo-go\r\n
\r\n\r\ndubbo-go的syscall6展开\r\n
\r\n\r\ngrpc-go\r\n
\r\ndubbo-go 侧 CPU 采样中 **syscall 占比 26.57%**、**futex 占比 12.16%**,总和达到近40%,分别为 gRPC 侧(10.86% / 7.98%)的 2.4 倍与 1.5 倍;gRPC 侧 CPU 则相对集中于内存分配,mallocgc 占比 18.18%(dubbo-go 为 9.39%)\r\n\r\nsyscall 与 futex 正是 `duplexHTTPCall` 的 io.Pipe 交接的直接运行成本,该机制包含三处开销:\r\n\r\n① **io.Pipe** 将请求体分段读、写,放大单请求系统调用次数,`write()` 占 syscall 的 **88%**,写请求头与写请求体两条链路均在 doRequest 上,单请求消耗 2 次系统调用,优化点从“每请求多次小写”改为“最少的必要写入”;\r\n\r\n② **responseReady 就绪信号**引入跨 goroutine 唤醒与 futex 等待,请求发出后,客户端 goroutine 阻塞在 `BlockUntilResponseReady`,等待 http2 连接层读取到响应头后经该就绪信号唤醒;此类跨 goroutine 的等待与唤醒(连同管道内部的 channel 同步)由内核 futex 支撑,对应火焰图中 futex 占比 **12.16%**;\r\n\r\n③ **makeRequest 独立 goroutine** 叠加调度与上下文切换,每个请求额外启动一个发送 goroutine,专职从 io.Pipe 读取请求体并写入 http2 层;每请求多一次 goroutine 调度与上下文切换,goroutine 验证中 99 个 makeRequest 阻塞栈即为该机制的直接观测。\r\n\r\nunary 快路径整体绕过这三处,该部分开销随之消除,向 gRPC 水平收敛。此结论与 goroutine 对比验证(312 vs 114)互相印证,两项数据同源于 `duplexHTTPCall` 的 io.Pipe 交接。\r\n\r\n### 4.3 go tool trace 采集调度延迟\r\n\r\ndubbo-go\r\n
\r\ngRPC-go\r\n
\r\n从阻塞的角度来看,dubbo-go 侧调度延迟 Top 显示,排名靠前的依次是互斥锁 `Unlock`(23.89%)、响应处理 `endStream`(22.14%)、`processHeaders`(20.14%)、条件变量 `Signal`(15.86%)、channel 接收 `chanrecv1`(13.01%)。对照三件套逐一解释:`chanrecv1`(13.01%)是 channel 接收等待,io.Pipe 交接(写端等读端取走数据)与 `BlockUntilResponseReady`(`<-responseReady`,`duplex_http_call.go` L261-262)均属此类;`Signal`(15.86%)为条件变量唤醒,不在 io.Pipe 交接路径上,responseReady 经 `close()` 触发的是 channel 接收而非条件变量唤醒(`duplex_http_call.go` L274),现代 io.Pipe 内部亦为 channel 同步、无 sync.Cond;`Unlock`(23.89%)为响应读取路径(`transportResponseBody.Read`)上的锁竞争。\r\n\r\ngRPC 侧调度延迟集中为 `operateHeaders`(90.67%,等待响应头到达)这一个合理等待点,无管道相关阻塞。\r\n\r\n也可以与前两个小节数据印证:4.1 显示 io.Pipe 交接产生约 61% 的阻塞 goroutine,本节调度延迟栈表明这些 goroutine 的阻塞真实发生;4.2 显示 syscall 占 CPU 26.57%,本节中 dubbo-go 的 syscall 阻塞总时长 8.14s、gRPC 为 3.43s。CPU 占比与阻塞时长同时偏高,说明该开销在执行与阻塞两个维度都存在。\r\n\r\n三小节的三项验证分别从机制存在、CPU 占比、调度阻塞三个角度出发,共同指向 io.Pipe 交接带来的性能瓶颈。\r\n\r\n### 交叉验证的总结\r\n\r\n| 采集内容 | 测试结果 | 结论 |\r\n| ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |\r\n| goroutine 分布(io.Pipe 两端 / makeRequest 栈) | dubbo-go 共 312:makeRequest 99 / io.Pipe 写 90 / writeRequest 98 / BlockUntilResponseReady 8;gRPC 共 114(waitOnHeader 99) | **管道栈**仅 dubbo-go 存在,总数比约 **2.7x** |\r\n| syscall / futex / mallocgc 占比 | dubbo-go:syscall **26.57%** / futex 12.16% / mallocgc 9.39%;gRPC:syscall 10.86% / futex 7.98% / mallocgc 18.18% | **syscall 与 futex** 均显著高于 gRPC |\r\n| 调度延迟栈、syscall 阻塞时长 | dubbo-go 调度栈含 chanrecv1(io.Pipe 交接 / responseReady 等待)等 channel 等待;syscall 阻塞 8.14s vs gRPC 3.43s | io.Pipe 交接进入调度栈,**阻塞时长**约 2.4x |\r\n\r\n## 五、方案设计与演进\r\n\r\n### 5.1 问题定位\r\n\r\n源码定位将固定开销锁定在 `duplexHTTPCall` 每次 unary 调用创建的 `io.Pipe`(`duplex_http_call.go` L76)与 `go makeRequest()` goroutine(L267)dubbo-go 独有、gRPC 完全缺失的两项开销。\r\n\r\n### 5.2 设计目标\r\n\r\n在保证 streaming(client/server/bidi)行为完全不变的前提下,为 unary 建立一条无 `io.Pipe`、无每请求 goroutine 的发送路径。\r\n\r\n### 5.3 四个设计优化点\r\n\r\n- **O1 同步直发**:unary 请求体一次就绪,不走流式交接。`MarshalAppend` 直接写入池化 buffer 作为 HTTP body,同步 `httpClient.Do`。消除 pipe 分配、goroutine、channel 同步(futex)与 pipe 交接 memmove。\r\n- **O2 池化流式响应**:响应用池化 buffer 流式读取(对齐生产 `tripleUnaryUnmarshaler` 的 `ReadFrom` + bufferPool 模式),避免 `io.ReadAll` 全量分配;gzip 响应按 `Content-Encoding` 解压。\r\n- **O3 Content-Length 参数**:请求是否声明 `Content-Length` 作为 A/B 参数。实测启用 CL 全面更优(服务端按声明长度预分配 `http2dataBuffer`,避免动态扩容),决策为启用。\r\n- **O4 fastPathBody 零分配 body 包装**:零额外分配 io.ReadCloser 替代 `io.NopCloser` + `bytes.Reader` 双重包装,消除 body 包装层的对象分配,从而使得 B/op/allocs 降低。\r\n\r\n### 5.4 回滚与防御性设计\r\n\r\n方案涉及请求行为模型改动(风险中高),提前应对风险的防御性设计如下:\r\n\r\n1. **风险兜底**:\r\n - ① **一键回滚**:TripleConfig `unary-fast-path` 配置开关控制(`protocol_config.triple.unary-fast-path`),默认关闭;\r\n\r\n 已开启的业务若升级后出事故,回滚操作仅三步:配置文件把 `unary-fast-path` 改为 `false`(或删除该配置)→ 重启 → 回到升级前的 duplex 基线,行为与升级前完全一致(wire 兼容 + 共享 marshaler,差异面最小),零代码变更(设计为配置入口 + `WithUnaryFastPath` option 双通道)。\r\n - ② **行为差异面最小**:快路径复用协议层现有 marshaler/unmarshaler 与 bufferPool,与社区路径共享编解码、压缩与 header 语义;\r\n - ③ **上线前全量回归**:全量回归 + 互通测试 + 四象限 A/B 对照(duplex/fastpath × gzip/无 gzip)。\r\n2. **请求体 buffer 延迟回收(防竞态)**:`CloseWrite` 发起请求后如果不立即回收 body buffer,x/net/http2 的 bodyWriter 后台 goroutine 可能晚于 `Do` 返回(服务端提前响应时),从而触发 `http2: response body closed` 竞态;\r\n\r\n 设计应当统一在 `CloseRead`(响应处理完)后回收,**且回收前需确认后台 bodyWriter 已退出**:服务端提前响应(非 2xx / 404 / 鉴权失败)时其仍在读未发完的请求体 buffer,对照 x/net/http2 v0.56.0 源码,`abortRequestBodyWrite` 触发的异步 `Close()` 对 no-op 无效,**可以采用委托 transport 对 Close 的恰好一次回调 + 互斥锁**;并且上线前 `go test -race` 复现验证。\r\n3. **错误处理链对齐**:沿用 `duplexHTTPCall` 完整错误包装链(context 取消、h2c/gRPC misuse 提示、RST\\_STREAM 映射、`CodeUnavailable` 兜底),错误码与提示行为与社区路径一致。\r\n4. **并发安全**:错误状态互斥锁保护,`BlockUntilResponseReady` 就绪前不放行读取。\r\n5. **请求体重放(GetBody,重试兜底)**:为请求设置 GetBody 与加锁 Rewind(Seek 0 回绕),传输层连接失败时可按 HTTP 重试语义重放请求体(unary 幂等语义下安全)实现时配套重放路径测试。\r\n6. **规划内的回归测试**:(约22个)\r\n - **配置接线层**:配置 round-trip 不丢字段(yaml/json/property 三通道读回 + Clone);URL attribute 类型断言错误不 panic;gRPC 协议收到开关字段无副作用;healthClient 固化走 duplex(不受开关影响);\r\n - **分支路由层**:`StreamType` 零值(=Unary 0b00)命中快路径、ClientStream/ServerStream 仍走 duplex,断言防回归;\r\n - **核心实现层**:\r\n - `unaryRequestBody`(归还竞态核心):Read/Close 并发(`-race` 复现服务端提前响应 abort 场景)、Close 幂等(防 buffer 双归还污染池)、Close 后 Read 返回 EOF;\r\n - `makeRequest`:CloseWrite 幂等(sendOnce 保证 Do 恰好一次)、空 body(NoBody + Content-Length=0 跳过写)往返、错误链与 duplex 一致(h2c 提示/RST/Unavailable 兜底)、validateResponse 失败后响应体由 CloseRead 关闭;\r\n - `Write`:多段累积 + Content-Length 精确、SetError/ctx 取消后停止累积;\r\n - `Read/CloseRead`:CloseRead 后 Read 返回包装错误、CloseRead 幂等、错误响应路径不 panic;\r\n - **端到端**:fastpath vs duplex 同请求响应一致性(`-race`)、并发 unary 调用 buffer 池化并发安全(`-race`)、Content-Length wire 断言(中间件层拦截:unary 请求 CL≥0、streaming 请求 CL≤0)、GetBody 重放路径(服务端回 `Connection: close` 触发 GOAWAY,断言 transport 调用 GetBody 重放请求体)。\r\n\r\n### 5.5 备选方案\r\n\r\n- **方案一(unary 快路径)**:结构改造,消除 pipe + goroutine。收益面覆盖全部 unary 场景。\r\n- **方案二(写路径合并)**:局部微调,将 envelope 的两次写合并为一次。注意 `envelopeWriter` 仅 gRPC 协议路径使用,不属于 Triple unary 写路径,与方案一优化的是两条独立路径,收益边际,仅作兜底。\r\n- **组合**:方案一为主,方案二兜底/补充\r\n\r\n### 5.6 设计依据\r\n\r\n1. **原型实测**:方案在 4 档报文全部正收益;备选方案二收益在方案一实现后会被吸收大半,不单独实施,只做兜底补充。\r\n2. **独立开关(即时回退)**:TripleConfig `unary-fast-path` 配置开关(默认 false)控制,默认关闭,线上异常改配置重启即可回退社区路径,零代码变更。\r\n3. **范围隔离与互通**:仅 unary 走快路径,streaming 保留 `duplexHTTPCall`(上游 #611 同样只做 unary 特化),互通/流式回归不受影响;快路径仅替换 Triple unary 的请求发送路径,路由仅按 StreamType 分支,不区分底层 HTTP 版本,HTTP/1.1 与 HTTP/2 下的 Triple unary 均命中快路径;gRPC 协议(独立实现)与 streaming(StreamType 非 unary)走原路径;wire 字节级与 duplex 一致(POST + Content-Length + Content-Type 等 header 语义不变);跨语言互通仅依赖标准 HTTP 语义,无自定义字段。server-streaming(请求体同样一次性写完)纳入快路径列为后续评估项,涉及 trailer 语义验证,不阻塞本期交付。\r\n4. **上游论据(connect-go 官方)**:triple\\_protocol 包源自 connect-go(duplex\\_http\\_call\\_test.go 版权头与 `fixed upstream in connect-go v1.19.2` 注释可证)。connect-go 在 issue #609 中明确承认:所有 RPC 共用 `duplexHTTPCall` 对 unary 是 overkill,其中的同步机制、每请求额外 goroutine 与 `io.Pipe` 对 unary 是 **pure overhead**,并通过 PR #611与#649 落地 unary 专用发送流程(`sendUnary`:同步直发 + ContentLength + payloadCloser),与本方案 O1 方向一致。**上游实现面向 connect-go 通用协议,不会覆盖 Triple 协议细节,本方案实现时需做以下本地化适配**:\r\n - **架构差异与权衡适配**:上游改造 duplexHTTPCall 本体。它在 Send 方法内部按请求类型分支,只有流式请求才创建 io.Pipe,一个类承载所有 RPC 类型。好处是代码更优雅、**发送入口单一、抽象层级高**;\r\n\r\n 代价是改动波及所有 RPC 共用的类,流式请求同样受影响,且 unary 特化与流式逻辑耦合在同一个类里,后续难以单独演进,没有灰度和开关。\r\n\r\n 本方案采用接口抽象加分支路由:**duplexHTTPCall 原封不动**,NewConn 按 RPC 类型把 unary 路由到新建的 unaryFastPathCall。**流式语义不受影响,快路径可以独立演进**,后续补 GetBody 重试、覆盖 server-streaming 都不需要触碰 duplex;开关关闭时走原类,快路径零开销,与一键回滚策略适配。\r\n\r\n 代价是多一个类、多一层接口分发,两个实现的行为需要持续对齐,这部分由 5.4 第 6 点的 Parity 测试兜底。\r\n - **复用现有组件**:O1 直接接入 triple\\_protocol 现有 marshaler/unmarshaler 与 bufferPool(O2 对齐生产 `tripleUnaryUnmarshaler` 的 `ReadFrom` 模式),而非照搬上游 `payloadCloser` 的独立分配路径;\r\n - **协议行为继承**:Content-Encoding / Accept-Encoding / Trailer 语义完全不变,gzip 默认行为与生产 connect 客户端一致;\r\n - **Content-Length(O3)**:上游用 `ContentLength` 做流式关闭优化,本方案将其扩展为 A/B 参数,实测启用全面更优,决策为启用。\r\n - **请求体归还机制本地化**:上游 `sendUnary` 用 payloadCloser 包装上层传入的 payload,不归还任何池(所有权在上层),Release 清引用后 Read 返回 EOF 自然终止;本方案请求体来自协议层 bufferPool(上限 8MiB / 初始 512B,对齐生产 buffer\\_pool.go),归还必须回到池中,因此实现 `unaryRequestBody` 加锁 Read/Close,归还委托 transport 对 Close 的恰好一次回调(正常读完或 abort 时),与后台 bodyWriter 读互斥,杜绝跨请求 buffer 污染。\r\n5. **gzip 对齐(对齐生产 wire 形状)**:生产客户端默认发 `Accept-Encoding: gzip`,服务端默认 gzip 压缩响应。原型早版未对齐,2MiB 档慢 2.4x;对齐后反超 -38%。快路径走生产同一客户端栈,天然带该 header。\r\n6. **pool 对齐生产配置**:buffer 上限对齐生产 `buffer_pool.go`(8MiB,初始 512B),避免大 buffer 被池丢弃导致每次重新分配。\r\n\r\n### 5.7 方案原型演进实测\r\n\r\n被测是构造的简化原型,指标是单请求耗时 ns/op;协议内 `go test -benchmem`,httptest h2c 服务;基线是同轮 duplex 社区版\r\n\r\n| 版本 | 128B | 1024B | 16384B | 2MiB | 关键变更 |\r\n| -- | ------ | ------ | ------ | --------- | ------------------------------------ |\r\n| v1 | - | - | - | +约100% ↓↓ | 裸原型,无池化 |\r\n| v2 | -32% ↑ | -25% ↑ | -13% ↑ | +107% ↓↓ | 引入池化(上限 1MiB,2MiB allocs 1,147) |\r\n| v3 | -24% ↑ | -29% ↑ | +12% ↓ | +139% ↓↓ | pool 对齐生产 8MiB(2MiB allocs 降至 1,020) |\r\n| v4 | -37% ↑ | -43% ↑ | -52% ↑ | -38% ↑ | gzip 对齐(生产默认 Accept-Encoding) |\r\n\r\n> 注:① 表中数值 = 单请求耗时相对**同轮** duplex 基线的变化率(负 = 更快、正 = 更慢),每轮跑出的基线值不同,**跨行数值不具可比性**,仅看各版本内的档位趋势;\r\n\r\n## 六、方案验证与实施\r\n\r\n### 6.1 生产落地改动点\r\n\r\n正式方案当前设计以**接口抽象 + 分支路由**的方式落地:`tripleUnaryClientConn` 持有的具体调用从 `*duplexHTTPCall` 抽象为 `unaryClientCall` 接口,`NewConn` 按 RPC 类型路由,unary 走新实现的 `unaryFastPathCall`(同步直发),streaming 与开关关闭时保留原 `duplexHTTPCall`。协议层 marshaler/unmarshaler、bufferPool、错误链与 header 语义全部复用,改造对协议行为零侵入。\r\n\r\n#### 6.1.1 改动范围\r\n\r\n1. **新增** `unary_fastpath.go`:`unaryClientCall` 接口(`tripleUnaryClientConn` 依赖的 duplex 方法子集:Write/Read/Header/CloseWrite/CloseRead/BlockUntilResponseReady/SetValidateResponse)+ `unaryFastPathCall` 实现 + `unaryRequestBody`(加锁的池化归还 body)。\r\n\r\n 四个优化点全部放在这里:O1 消除 io.Pipe + 每请求 goroutine(同步直发)、O2 复用现有 marshaler/unmarshaler 与 bufferPool、O3 显式 Content-Length、O4 零分配 body 包装。\r\n2. **`NewConn`** **分支**:`spec.StreamType == StreamTypeUnary && c.UnaryFastPath` 走 `newUnaryFastPathCall(ctx, httpClient, url, spec, header, bufferPool)`,否则走 `newDuplexHTTPCall`。**范围隔离**:streaming(client/server/bidi)与开关关闭时路径与社区完全一致,零改动。\r\n3. **调用对象接口化**:`tripleUnaryClientConn.call` 从具体类型改为 `unaryClientCall` 接口,marshaler(`writer: call`)/ unmarshaler(`reader: call`)/ validateResponse 注入 / bufferPool 全部复用,社区与快路径共用同一套编解码、压缩与 header 语义(行为差异面最小)。\r\n4. **请求发送语义变化**:duplex 的 `Write` 写 io.Pipe → 每请求 goroutine 后台 `Do` 改为 fastpath 的 `Write` 累积 pooled buffer(零网络触碰)→ `CloseWrite` 同步 `Do`,请求体经 `unaryRequestBody` 直接引用 pooled buffer,无管道交接。\r\n5. **body 归还机制变化**:duplex 请求体随 pipe 读端流入 http2、无池化归还;fastpath 归还委托 `unaryRequestBody.Close`(x/net/http2 对 `reqBody.Close()` 恰好调用一次:正常读完或 abort 时),内部互斥锁保证与后台 bodyWriter 的读不竞态,彻底规避跨请求 buffer 污染。\r\n6. **一键回滚开关**:`WithUnaryFastPath()` option(option.go,默认关闭)→ `clientConfig.UnaryFastPath`(client.go)→ `protocolClientParams.UnaryFastPath`(protocol.go)→ NewConn 分支;生产入口 `TripleConfig.unary-fast-path` 配置(global/triple\\_config.go,默认 false)经 `newClientManager` 注入 option。\r\n\r\n#### 6.1.2 流程图\r\n\r\n**改造前(社区** **`duplexHTTPCall`,开关关闭时 = 默认路径), 每请求两个执行上下文**\r\n\r\n```mermaid\r\nflowchart TB\r\n subgraph caller[\"caller goroutine\"]\r\n direction TB\r\n CC[\"tripleUnaryClientConn\"] --> DC[\"duplexHTTPCall\"]\r\n DC -->|\"Write ① ensureRequestMade() 启动后台 goroutine\"| GO[\"go makeRequest()\"]\r\n DC -->|\"Write ② pipeWriter.Write(data)(阻塞)\"| PW[\"pipeWriter\"]\r\n DC -->|\"Receive: BlockUntilResponseReady() 阻塞等待\"| READY[\"responseReady\"]\r\n end\r\n subgraph bg[\"makeRequest goroutine(每请求一个)\"]\r\n direction TB\r\n MR[\"makeRequest: httpClient.Do(request)\"] -->|\"req.Body = pipeReader 读端\"| PR[\"pipeReader\"]\r\n PR --> T[\"http2 transport\"]\r\n end\r\n caller ~~~ bg\r\n GO -. \"sendRequestOnce.Do 派发\" .-> MR\r\n PW -. \"io.Pipe 无缓冲交接(写端阻塞至读端消费)\" .-> PR\r\n T -. \"Do 返回 → close(responseReady)\" .-> READY\r\n T -. \"响应体\" .-> DC\r\n```\r\n\r\n每请求固定开销:① io.Pipe 交接 ② makeRequest goroutine ③ responseReady channel 跨 goroutine 等待\r\n\r\n**改造后(本方案** **`unaryFastPathCall`,`unary-fast-path`** **开关启用时), 单执行上下文同步直发**\r\n\r\n```mermaid\r\nflowchart TB\r\n subgraph caller2[\"caller goroutine(全程同步,单执行上下文)\"]\r\n direction TB\r\n CC2[\"tripleUnaryClientConn\"] --> FP[\"unaryFastPathCall\"]\r\n FP -->|\"Write: bufferPool.Get() → body.Write 累积\"| BUF[\"pooled buffer\"]\r\n FP -->|\"CloseWrite: sendOnce.Do(makeRequest) 同步执行\"| MR2[\"makeRequest\"]\r\n MR2 -->|\"Content-Length 声明(O3)\"| CL[\"Content-Length\"]\r\n MR2 -->|\"Body = unaryRequestBody(锁保护归还)\"| RB[\"unaryRequestBody\"]\r\n MR2 -->|\"httpClient.Do(request)\"| T2[\"http2 transport\"]\r\n T2 -. \"响应(responseReady 已就绪,Receive 不阻塞)\" .-> FP\r\n RB -. \"Close → bufferPool.Put\" .-> BUF\r\n end\r\n classDef diff fill:#ffe0b2,stroke:#e65100,stroke-width:2px;\r\n class BUF,MR2,CL,RB diff;\r\n```\r\n\r\n(突出色块 = 相对 duplex 的差异点:去 pipe 改池化缓冲、去后台 goroutine 改同步发送、新增 Content-Length 声明、新增锁保护归还)\r\n\r\n该路径由 `unary-fast-path` 开关启用(**默认关闭**,开启方式:`WithUnaryFastPath()` option 或 `protocol_config.triple.unary-fast-path: true`),异常时改配置重启即可回退到上方社区路径。对比上方社区路径:**消除** io.Pipe + makeRequest goroutine + responseReady 等待;**新增** pooled buffer 累积 + 显式 Content-Length(O3)+ 锁保护归还。\r\n\r\n#### 6.1.3 组件职责与调用关系对照\r\n\r\n| 组件 | 改造前(duplex) | 改造后(fastpath) | 变化 |\r\n| ---------------------------------------- | ------------------------------------------- | ------------------------------------------------ | ------------------------- |\r\n| `tripleUnaryClientConn` | 持有 `*duplexHTTPCall` | 持有 `unaryClientCall` 接口 | 接口化解耦,改动收敛于 NewConn 一行分支 |\r\n| marshaler(`tripleUnaryRequestMarshaler`) | `writer = duplexHTTPCall` | `writer = unaryFastPathCall` | 复用,仅 writer 实现替换 |\r\n| unmarshaler(`tripleUnaryUnmarshaler`) | `reader = duplexHTTPCall` | `reader = unaryFastPathCall` | 复用 |\r\n| 请求体承载 | io.Pipe(读端交 http2,写端阻塞) | pooled buffer 直接引用 | 消除管道交接 |\r\n| 请求发起 | 每请求 goroutine 异步 `Do` | `CloseWrite` 同步 `Do` | 消除 goroutine + channel 等待 |\r\n| Content-Length | 未知(流式管道) | 显式声明(O3) | 新增,服务端预分配 |\r\n| body 归还 | 无池化 | `unaryRequestBody.Close` → `bufferPool.Put`(锁保护) | 新增(#F2) |\r\n| 错误链 | context / h2c / gRPC 提示 / RST / Unavailable | 同链逐行对齐 | 不变 |\r\n| header / gzip / trailer 语义 | 原样 | 原样 | 不变 |\r\n\r\n#### 6.1.4 调用序列对比(同一 unary 请求)\r\n\r\n- **改造前**:`Send`(写 pipe) → `CloseWrite`(EOF 通知) →〔后台 goroutine:读 pipe + `Do` + close responseReady〕→ `Receive`(`BlockUntilResponseReady` 等) → `CloseResponse`\r\n- **改造后**:`Send`(累积 buffer) → `CloseWrite`(同步 `Do` + 直接读 buffer) → `Receive`(直接读 response,无等待) → `CloseResponse`\r\n\r\n调用序列形态完全不变(协议层 `Client` 与 marshaler/unmarshaler 无需任何改动),仅每次 RPC 内部的执行上下文由 2 个收敛为 1 个。\r\n\r\n以下为快路径核心实现(`unary_fastpath.go`):`unary_fastpath_bench_test.go` 为协议内 A/B 基准。\r\n\r\n### 6.3 原型代码:unary 快路径(A/B 两版原型测试代码)\r\n\r\n原型通过测试代码提炼社区原版与设计版 triple-unary 的关键逻辑进行 A/B 验证。两版原型共用同一服务端与报文档位(协议内 bench 走 httptest h2c 服务端、端到端走真实服务端 :20000),仅请求发送路径不同,形成 A/B 对照组。\r\n\r\n**当前原型(对照组)**:DubboGoClient(dubbo\\_client.go),完整 dubbo-go 框架栈,unary 经 duplexHTTPCall:io.Pipe 管道交接、每请求 makeRequest 后台 goroutine、responseReady 信号等待\r\n\r\n```go\r\n// 构造:完整 dubbo-go 框架客户端(NewDubboGoClient)\r\ncli, err := client.NewClient(\r\n\tclient.WithClientNoCheck(),\r\n\tclient.WithClientSerialization(\"protobuf\"),\r\n\tclient.WithClientParam(constant.SerializationKey, \"protobuf\"),\r\n\tclient.WithClientParam(\"compression\", \"none\"),\r\n)\r\nservice, err := benchmark.NewTripleBenchmarkService(cli,\r\n\tclient.WithURL(fmt.Sprintf(\"tri://%s/%s\", addr, benchmark.BenchmarkServiceName)),\r\n\tclient.WithSerialization(\"protobuf\"),\r\n\tclient.WithParam(constant.MaxCallRecvMsgSize, \"16MB\"),\r\n\tclient.WithParam(constant.MaxCallSendMsgSize, \"16MB\"),\r\n\tclient.WithParam(\"compression\", \"none\"),\r\n)\r\n\r\n// 每次调用:内部进入 duplexHTTPCall,io.Pipe 交接、makeRequest goroutine、responseReady 等待\r\nfunc (c *DubboGoClient) unaryCall(ctx context.Context) error {\r\n\treq := &benchmark.BenchmarkRequest{Payload: c.payload}\r\n\t_, err := c.client.UnaryCall(ctx, req)\r\n\treturn err\r\n}\r\n```\r\n\r\n**设计优化原型(实验组)**:ProtoFastPathClient(proto\\_fastpath\\_client.go),raw HTTP/2 直发,无 duplexHTTPCall、无 io.Pipe、无每请求 goroutine(完整实现):\r\n\r\n```go\r\nfunc (c *ProtoFastPathClient) Call(ctx context.Context) error {\r\n\t// O1 池化 marshal:MarshalAppend 直接写入池化 buffer\r\n\treqBuf := c.pool.Get().(*bytes.Buffer)\r\n\tdata, err := proto.MarshalOptions{}.MarshalAppend(reqBuf.Bytes()[:0],\r\n\t\t&benchmark.BenchmarkRequest{Payload: c.payload})\r\n\tif err != nil {\r\n\t\tc.put(reqBuf)\r\n\t\treturn fmt.Errorf(\"marshal request: %w\", err)\r\n\t}\r\n\r\n\t// O4 零分配 body:fastPathBody 直接引用 marshal 结果,不经 bytes.Reader + NopCloser\r\n\treq, err := http.NewRequestWithContext(ctx, http.MethodPost, c.url, &fastPathBody{data: data})\r\n\tif err != nil {\r\n\t\tc.put(reqBuf)\r\n\t\treturn fmt.Errorf(\"new request: %w\", err)\r\n\t}\r\n\treq.Header.Set(\"Content-Type\", \"application/proto\")\r\n\treq.ContentLength = int64(len(data)) // O3 显式 Content-Length\r\n\r\n\tresp, err := c.httpClient.Do(req) // O1 同步直发:无 io.Pipe、无后台 goroutine\r\n\tif err != nil {\r\n\t\tc.put(reqBuf)\r\n\t\treturn fmt.Errorf(\"do request: %w\", err)\r\n\t}\r\n\tif resp.StatusCode != http.StatusOK {\r\n\t\tresp.Body.Close()\r\n\t\tc.put(reqBuf)\r\n\t\treturn fmt.Errorf(\"unexpected status %d\", resp.StatusCode)\r\n\t}\r\n\r\n\t// O2 池化读响应:ReadFrom 入池化 buffer,对齐 tripleUnaryUnmarshaler\r\n\trespBuf := c.pool.Get().(*bytes.Buffer)\r\n\tbody := io.Reader(resp.Body)\r\n\tif strings.EqualFold(resp.Header.Get(\"Content-Encoding\"), \"gzip\") {\r\n\t\tgz, gzErr := gzip.NewReader(body)\r\n\t\tif gzErr != nil {\r\n\t\t\tresp.Body.Close()\r\n\t\t\tc.put(reqBuf)\r\n\t\t\tc.put(respBuf)\r\n\t\t\treturn fmt.Errorf(\"new gzip reader: %w\", gzErr)\r\n\t\t}\r\n\t\tdefer gz.Close()\r\n\t\tbody = gz\r\n\t}\r\n\tif _, err := respBuf.ReadFrom(body); err != nil {\r\n\t\tresp.Body.Close()\r\n\t\tc.put(reqBuf)\r\n\t\tc.put(respBuf)\r\n\t\treturn fmt.Errorf(\"read response: %w\", err)\r\n\t}\r\n\tresp.Body.Close()\r\n\tc.put(reqBuf) // unary 语义:服务端读完请求体才响应,此回收点安全\r\n\r\n\tvar out benchmark.BenchmarkResponse\r\n\tif err := proto.Unmarshal(respBuf.Bytes(), &out); err != nil {\r\n\t\tc.put(respBuf)\r\n\t\treturn fmt.Errorf(\"unmarshal response: %w\", err)\r\n\t}\r\n\tc.put(respBuf)\r\n\treturn nil\r\n}\r\n```\r\n\r\n验证点:\r\n\r\n- 无 io.Pipe 分配,无 makeRequest goroutine;\r\n- `MarshalAppend` 单次拷贝入池化 buffer,消除 `codec.Marshal` + `bytes.NewBuffer(raw)` 二次拷贝;\r\n- 响应按 `Content-Encoding: gzip` 手动解压,协议语义与生产一致;\r\n- `ContentLength` 声明后,服务端按长度预分配 `http2dataBuffer`,避免动态扩容。\r\n\r\n### 6.4 方案原型 A/B 实测(协议内 bench,同栈同服务端)\r\n\r\n**数据口径**:`go test -benchmem`(httptest h2c 服务端,`BenchmarkUnaryPathAB`),A/B 双方为同栈 `tripleUnaryClientConn`(共享 marshaler/unmarshaler/bufferPool),仅发送路径不同:原版 `duplexHTTPCall` vs 优化原型 `unaryFastPathCall`;count=3 取中位数,原始数据见 `data/unary-fastpath-proto/ab_path_20260822.log`。QPS/P99 依赖端到端固定并发压测口径,测试原型代码不产出该指标,故本表不列。\r\n\r\n**6.4.1 128B**\r\n\r\n| 指标 | duplex(原版) | fastpath(优化原型) | 变化 |\r\n| --------- | ---------- | -------------- | ------ |\r\n| allocs/op | 141 | **140** | ≈0% |\r\n| B/op | 30.6KB | **27.6KB** | -10% ↑ |\r\n\r\n**6.4.2 1024B**\r\n\r\n| 指标 | duplex(原版) | fastpath(优化原型) | 变化 |\r\n| --------- | ---------- | -------------- | ------ |\r\n| allocs/op | 139 | **139** | 持平 |\r\n| B/op | 34.9KB | **30.5KB** | -13% ↑ |\r\n\r\n**6.4.3 16384B**\r\n\r\n| 指标 | duplex(原版) | fastpath(优化原型) | 变化 |\r\n| --------- | ---------- | -------------- | ----- |\r\n| allocs/op | 147 | **145** | -1% |\r\n| B/op | 165.8KB | **150.9KB** | -9% ↑ |\r\n\r\n**6.4.4 2MiB**\r\n\r\n| 指标 | duplex(原版) | fastpath(优化原型) | 变化 |\r\n| --------- | ---------- | -------------- | ------ |\r\n| allocs/op | 372 | **324** | -13% ↑ |\r\n| B/op | 13.5MB | **13.0MB** | -4% ↑ |\r\n\r\n- 同栈下内存指标改善温和:allocs 基本持平(协议层 duplex 与 fastpath 共享 bufferPool/marshaler),B/op 小中包 -10%\\~-13%、大包 -4% 上下。发送路径优化的主要收益在延迟/吞吐侧,内存侧不是本轮重点。\r\n- 第 4 项优化 `fastPathBody`:零额外分配 io.ReadCloser 替代 `io.NopCloser`+`bytes.Reader` 双重包装,是使方案原型 B/op/allocs 由负转正的关键\r\n\r\n## 七、预估收益\r\n\r\n### 7.1 生产中影响因素(预估收敛要素)\r\n\r\n方案原型收益(协议层发送路径净收益)是优化基点,生产集成后受以下要素影响,预估时需计入:\r\n\r\n1. **端到端摊薄**(最主要):协议内 A/B 为同栈对比(6.4),收益即协议层发送路径净收益;端到端叠加框架栈/网络/服务端调用链耗时,延迟下降比例被摊薄,QPS 提升收敛至低两位数百分比量级。\r\n2. **协议栈差异**(收敛):原型 A/B 走 h2c(HTTP/2 cleartext)测试服务端,生产**通常**走 HTTP/2(Triple 主要部署形态,快路径本身不区分 HTTP 版本);HTTP/2 连接层为 dubbo-go 与 gRPC 共有部分,不在本次优化范围。\r\n3. **gzip 压缩开关**(指标口径):用户开启压缩时,压缩路径自身临时分配会掩盖 B/op 账面收益;延迟与吞吐收益不受影响。\r\n4. **Content-Length 依赖(O3)**(条件收益):快路径声明 Content-Length 后,依赖服务端按该长度预分配 buffer 才吃到收益;该字段为 HTTP 标准语义,dubbo-go/gRPC/Java 服务端均兼容,风险低。\r\n5. **业务负载与并发饱和**(收敛):真实调用带业务(0.5ms\\~几ms/请求),io.Pipe 固定开销占比被业务耗时摊薄;纯网络转发场景(业务≈0)才接近原型档位;流控/带宽天花板属预期。\r\n6. **服务端调用链与带宽**(收敛):生产服务端带完整调用链(序列化/业务 handler/下游依赖),响应时间以服务端为主,客户端发送路径优化被整体耗时稀释;大报文(1MiB)受服务端带宽天花板限制。\r\n7. **GC 与长跑**(双向):生产长跑下 bufferPool 复用使 B/op 收益更稳定;GC 压力与内存池行为可能放大或缩小分配收益,取中性。\r\n8. **P99 尾延迟**(收敛):io.Pipe + 每请求 goroutine 的调度(futex)唤醒抖动是客户端尾延迟来源之一,但端到端 P99 叠加服务端尾延迟与网络抖动,改善幅度通常低于均值延迟。\r\n\r\n### 7.2 生产预期区间(预测)\r\n\r\n结合 7.1 要素综合测算:\r\n\r\n- 小报文(128B/1KiB,主战场):基线 4,425 → 预期 **4,779 \\~ 4,868**(**+8% \\~ +10%**),P99 同步收敛\r\n- 大报文(1MiB):基线 122.9 → 预期 **133 \\~ 135**(**+8% \\~ +10%**),受服务端带宽天花板限制\r\n- 综合判断:**QPS +8% \\~ +10%,P99 同步改善**\r\n\r\n**预估性能区间(预测,非实测)**:\r\n\r\n| 指标 | 预估区间 | 预估依据 |\r\n| ------ | ---------------- | ------------------------------------------------------------------ |\r\n| QPS | **+8% \\~ +10%** | 端到端叠加框架栈/网络/服务端耗时,收益摊薄后收敛至低两位数百分比 |\r\n| P99 | **-5% \\~ -15%** | 端到端 P99 受服务端尾延迟稀释,改善幅度通常低于均值延迟 |\r\n| 延迟 | **-10% \\~ -25%** | 协议层消除 io.Pipe + 每请求 goroutine 固定开销 |\r\n| B/op | **-15% \\~ -35%** | 请求体池化单次拷贝,小报文更明显 |\r\n| allocs | **持平 \\~ 微增** | O3(Content-Length)引入少量 header 分配,换取服务端预分配收益 |\r\n\r\n## 八、参考链接\r\n\r\n- 本机基准测试报告\r\n- 社区基准测试报告(benchmark/README\\_CN.md):tools/benchmark/README\\_CN.md\r\n- RPC 协议 Triple\\&Dubbo java 基准测试:[RPC Protocol Triple\\&Dubbo Benchmark Testing | Apache Dubbo](https://cn.dubbo.apache.org/en/overview/mannual/java-sdk/reference-manual/performance/rpc-benchmarking/#12-data-analysis)\r\n- connect-go 上游 issue #609(unary 专用流程设计讨论):\r\n- connect-go 上游 PR #611(Special case unary HTTP calls):\r\n- connect-go 上游 PR #649(Special case unary HTTP calls):\r\n\r\n***\r\n\r\n## 许可\r\n\r\nApache License 2.0\r\n",
"createdAt": "2026-08-21T22:27:02Z",
"updatedAt": "2026-09-03T04:00:15Z",
"author": {
"login": "lizining1231"
},
"replies": [
{
"id": "DC_kwDOCJS8R84BFGrP",
"url": "https://github.com/apache/dubbo-go/discussions/3673#discussioncomment-18115279",
"body": "分析的不错 如果可以的话可以写个博客 让雨哥发在公众号里😃",
"createdAt": "2026-08-22T12:00:02Z",
"updatedAt": "2026-08-22T14:11:29Z",
"author": {
"login": "Alanxtl"
}
},
{
"id": "DC_kwDOCJS8R84BFGy9",
"url": "https://github.com/apache/dubbo-go/discussions/3673#discussioncomment-18115773",
"body": "好!",
"createdAt": "2026-08-22T13:27:29Z",
"updatedAt": "2026-08-22T13:27:29Z",
"author": {
"login": "lizining1231"
}
},
{
"id": "DC_kwDOCJS8R84BFzsT",
"url": "https://github.com/apache/dubbo-go/discussions/3673#discussioncomment-18299667",
"body": "目前 Unary 快速通道的链路是:\r\n\r\n```text\r\n消息 → MarshalAppend 写入池化缓冲区 A\r\n → unaryFastPathCall.Write\r\n → 复制到池化请求体 B\r\n → HTTP transport\r\n```\r\n\r\n复制明确发生在 unary_fastpath.go:148\r\n\r\n可以增加内部的“接收完整请求体”接口,让发送端直接接管 A:\r\n\r\n```text\r\n消息 → 池化缓冲区 A → 移交给 Request.Body → Body.Close 时归还\r\n```\r\n\r\n这样能够:\r\n\r\n- 消除一次 O(L) 的完整 payload 复制。\r\n- 减少发送准备阶段同时持有的缓冲区。\r\n- 压缩场景直接移交压缩结果,省掉压缩数据到请求体的复制。\r\n\r\n关键是明确“成功接管后谁负责释放”,覆盖取消、发送失败、尚未提交请求等路径。**不能在 `http.Client.Do` 返回时直接归还**,因为 transport 可能仍在异步读取请求体;应沿用现有 `unaryRequestBody.Close` 的释放机制。[Go HTTP 契约](https://pkg.go.dev/net/http#RoundTripper)\r\n\r\n这里消除的是应用层的一次复制,HTTP/2、TLS 内部仍可能复制。\r\n\r\n以及把 gRPC 的 5 字节头与 payload 一起构造\r\n\r\n当前 envelope.go:147 分别写入 prefix 和 payload。\r\n\r\n可以在池化缓冲区前预留 5 字节:\r\n\r\n```text\r\n[ flags | payload length | MarshalAppend 的结果 ]\r\n 编码完成后回填\r\n```\r\n\r\n再整体移交给 Unary 请求体。压缩时,在压缩输出缓冲区预留头,填入实际压缩长度。\r\n\r\n这有机会同时消除独立 prefix 的逃逸分配,并减少 `Write` 调用和请求体锁操作。**应在编码前预留空间**,否则事后移动整份 payload 会抵消收益。两次 `Write` 也不等于两次系统调用,收益需要实测。",
"createdAt": "2026-09-05T03:49:40Z",
"updatedAt": "2026-09-05T03:49:40Z",
"author": {
"login": "Alanxtl"
}
}
]
},
{
"id": "DC_kwDOCJS8R84BFQCG",
"url": "https://github.com/apache/dubbo-go/discussions/3673#discussioncomment-18153606",
"body": "😔抱歉的消息,根据8月26日优化落地后性能异常引发的排查,发现在8月19日的基准测试中犯了一个错误,那份基准测试报告实测为dubbo-go默认协议grpc协议,而非triple协议。补救措施如下:\r\n- [x] 取消勾选已完成的plan step 1.2(如上)\r\n- [x] 注明初始基准测试为grpc而非triple(如上)\r\n- [x] 先补测dubbo-go端的triple协议的QPS/P99指标性能基准,以供与io.pipe优化落地作对比(如下)\r\n- [ ] 补测三端四指标性能基准测试,并勾选plan step 1.2\r\n\r\n这里是**dubbo-go端 triple协议 duplex版本**:\r\n# Dubbo-Go Triple 基准测试报告(QPS、P99指标)\r\n\r\n## 基准测试报告\r\n\r\n### 测试环境\r\n\r\n- **Go 版本**: 1.25.6\r\n- **OS**: Ubuntu 24.04.1 LTS (WSL2, Linux 6.6.87)\r\n- **CPU**: Intel Core i7-10750H @ 2.60GHz, 6 核 12 线程\r\n- **内存**: 7.6 GiB\r\n- **测试框架**: Dubbo-Go(Triple 协议路径)\r\n- **预热时间**: 10s\r\n- **测试时长**: 每个用例 60s\r\n- **轮次**: 3 轮/场景,取中位数\r\n\r\n### 测试配置\r\n\r\n| 参数 | 值 |\r\n| ---- | ------------------------------------- |\r\n| 报文大小 | 128B / 1KiB / 16KiB / 1MiB |\r\n| 序列化 | protobuf |\r\n| 压缩 | none(消息级)/ 响应 gzip(HTTP 层默认) |\r\n| 并发数 | 50 / 100 |\r\n| 调用模式 | unary |\r\n| 对照项 | duplex(io.Pipe 原路径,未优化基线) |\r\n\r\n### 128 bytes 报文\r\n\r\n#### QPS(每秒请求数)\r\n\r\n| 并发数 | duplex |\r\n| --- | ------- |\r\n| 50 | 5,329.3 |\r\n| 100 | 5,409.2 |\r\n\r\n#### P99 延迟 (ms)\r\n\r\n| 并发数 | duplex |\r\n| --- | ------ |\r\n| 50 | 15.99 |\r\n| 100 | 30.58 |\r\n\r\n### 1024 bytes 报文\r\n\r\n#### QPS(每秒请求数)\r\n\r\n| 并发数 | duplex |\r\n| --- | ------- |\r\n| 50 | 4,300.3 |\r\n| 100 | 4,368.5 |\r\n\r\n#### P99 延迟 (ms)\r\n\r\n| 并发数 | duplex |\r\n| --- | ------ |\r\n| 50 | 20.40 |\r\n| 100 | 37.48 |\r\n\r\n### 16384 bytes 报文\r\n\r\n#### QPS(每秒请求数)\r\n\r\n| 并发数 | duplex |\r\n| --- | ------- |\r\n| 50 | 2,584.2 |\r\n| 100 | 2,428.2 |\r\n\r\n#### P99 延迟 (ms)\r\n\r\n| 并发数 | duplex |\r\n| --- | ------ |\r\n| 50 | 37.28 |\r\n| 100 | 81.24 |\r\n\r\n### 1048576 bytes (1MiB) 报文\r\n\r\n#### QPS(每秒请求数)\r\n\r\n| 并发数 | duplex |\r\n| --- | ------ |\r\n| 50 | 101.3 |\r\n| 100 | 104.3 |\r\n\r\n#### P99 延迟 (ms)\r\n\r\n| 并发数 | duplex |\r\n| --- | -------- |\r\n| 50 | 1,430.17 |\r\n| 100 | 3,179.88 |\r\n\r\n## 性能优化\r\n\r\n### Dubbo-Go 客户端配置(duplex 基线)\r\n\r\n| 配置项 | 说明 |\r\n| -------------------------- | ---------------- |\r\n| `WithClientNoCheck()` | 跳过服务检查,减少不必要的开销 |\r\n| `MaxCallRecvMsgSize: 16MB` | 最大接收消息大小,支持大报文测试 |\r\n| `MaxCallSendMsgSize: 16MB` | 最大发送消息大小,支持大报文测试 |\r\n\r\n### Dubbo-Go 服务端配置\r\n\r\n服务端配置了以下参数:\r\n\r\n| 配置项 | 说明 |\r\n| ---------------------------------- | -------- |\r\n| `WithMaxServerRecvMsgSize(\"16MB\")` | 最大接收消息大小 |\r\n| `WithMaxServerSendMsgSize(\"16MB\")` | 最大发送消息大小 |\r\n\r\n## 许可证\r\n\r\nApache License 2.0\r\n",
"createdAt": "2026-08-25T20:58:03Z",
"updatedAt": "2026-08-25T20:58:03Z",
"author": {
"login": "lizining1231"
},
"replies": []
},
{
"id": "DC_kwDOCJS8R84BFQKI",
"url": "https://github.com/apache/dubbo-go/discussions/3673#discussioncomment-18154120",
"body": "- [ ] 这个是connect编码数据,PR旧版本,现在PR已经是grpc编码,数据绝对值不同、收益比例不同,整体趋势与对应benchstat结果相似,数据待更新\r\n\r\n### 测试环境\r\n\r\n- **Go 版本**: 1.25.6\r\n\r\n- **OS**: Ubuntu 24.04.1 LTS (WSL2, Linux 6.6.87)\r\n\r\n- **CPU**: Intel Core i7-10750H @ 2.60GHz, 6 核 12 线程\r\n\r\n- **内存**: 7.6 GiB\r\n\r\n- **测试框架**: Dubbo-Go(Triple 协议路径)\r\n\r\n- **编码**: connect编码,非标准grpc编码\r\n\r\n- **预热时间**: 10s\r\n\r\n- **测试时长**: 每个用例 60s\r\n\r\n- **轮次**: 3 轮/场景,取中位数\r\n\r\n### 测试配置\r\n\r\n| 参数 | 值 |\r\n| ---- | ------------------------------------- |\r\n| 报文大小 | 128B / 1KiB / 16KiB / 1MiB |\r\n| 序列化 | protobuf |\r\n| 压缩 | none(消息级)/ 响应 gzip(HTTP 层默认) |\r\n| 并发数 | 50 / 100 |\r\n| 调用模式 | unary |\r\n| 对照项 | duplex(io.Pipe 原路径) / unary fast path |\r\n\r\n### 128 bytes 报文\r\n\r\n#### QPS(每秒请求数)\r\n\r\n| 并发数 | duplex | fastpath | 提升 |\r\n| --- | ------- | -------- | -------- |\r\n| 50 | 5,329.3 | 6,997.9 | +31.3% ↑ |\r\n| 100 | 5,409.2 | 6,024.1 | +11.4% ↑ |\r\n\r\n#### P99 延迟 (ms)\r\n\r\n| 并发数 | duplex | fastpath | 提升 |\r\n| --- | ------ | -------- | -------- |\r\n| 50 | 15.99 | 12.67 | -20.8% ↑ |\r\n| 100 | 30.58 | 29.74 | -2.7% ↑ |\r\n> ↑ 为正收益\r\n\r\n### 1024 bytes 报文\r\n\r\n#### QPS(每秒请求数)\r\n\r\n| 并发数 | duplex | fastpath | 提升 |\r\n| --- | ------- | -------- | -------- |\r\n| 50 | 4,300.3 | 5,196.4 | +20.8% ↑ |\r\n| 100 | 4,368.5 | 5,605.8 | +28.3% ↑ |\r\n\r\n#### P99 延迟 (ms)\r\n\r\n| 并发数 | duplex | fastpath | 提升 |\r\n| --- | ------ | -------- | -------- |\r\n| 50 | 20.40 | 18.22 | -10.7% ↑ |\r\n| 100 | 37.48 | 26.95 | -28.1% ↑ |\r\n\r\n### 16384 bytes 报文\r\n\r\n#### QPS(每秒请求数)\r\n\r\n| 并发数 | duplex | fastpath | 提升 |\r\n| --- | ------- | -------- | -------- |\r\n| 50 | 2,584.2 | 2,871.6 | +11.1% ↑ |\r\n| 100 | 2,428.2 | 2,815.7 | +16.0% ↑ |\r\n\r\n#### P99 延迟 (ms)\r\n\r\n| 并发数 | duplex | fastpath | 提升 |\r\n| --- | ------ | -------- | -------- |\r\n| 50 | 37.28 | 30.90 | -17.1% ↑ |\r\n| 100 | 81.24 | 69.07 | -15.0% ↑ |\r\n\r\n### 1048576 bytes (1MiB) 报文\r\n\r\n#### QPS(每秒请求数)\r\n\r\n| 并发数 | duplex | fastpath | 提升 |\r\n| --- | ------ | -------- | ------- |\r\n| 50 | 101.3 | 101.7 | +0.4% ↑ |\r\n| 100 | 104.3 | 114.4 | +9.8% ↑ |\r\n\r\n#### P99 延迟 (ms)\r\n\r\n| 并发数 | duplex | fastpath | 提升 |\r\n| --- | -------- | -------- | ------- |\r\n| 50 | 1,430.17 | 1,479.12 | +3.4% ↓ |\r\n| 100 | 3,179.88 | 2,874.32 | -9.6% ↑ |\r\n\r\n\r\n## 性能优化\r\n\r\n### Dubbo-Go 客户端优化(Triple 协议路径)\r\n\r\n| 配置项 | 说明 |\r\n| -------------------------- | ------------------------------------------------ |\r\n| `WithClientNoCheck()` | 跳过服务检查,减少不必要的开销 |\r\n| `MaxCallRecvMsgSize: 16MB` | 最大接收消息大小,支持大报文测试 |\r\n| `MaxCallSendMsgSize: 16MB` | 最大发送消息大小,支持大报文测试 |\r\n| `WithUnaryFastPath()` | 启用 unary fast path(tripleClient.NewConn 分支,默认关闭) |\r\n\r\n### Dubbo-Go 服务端优化\r\n\r\n服务端配置了以下优化参数:\r\n\r\n| 配置项 | 说明 |\r\n| ---------------------------------- | -------- |\r\n| `WithMaxServerRecvMsgSize(\"16MB\")` | 最大接收消息大小 |\r\n| `WithMaxServerSendMsgSize(\"16MB\")` | 最大发送消息大小 |\r\n\r\n## benchstat显著性检验 count -10\r\n\r\n```bash\r\ngoos: linux\r\ngoarch: amd64\r\npkg: dubbo.apache.org/dubbo-go/v3/protocol/triple/triple_protocol\r\ncpu: Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz\r\n │ duplex10_b.txt │ fastpath10_b.txt │\r\n │ sec/op │ sec/op vs base │\r\nUnary/128B-12 163.6µ ± 21% 121.3µ ± 25% -25.85% (p=0.003 n=10)\r\nUnary/1024B-12 157.4µ ± 22% 113.0µ ± 18% -28.25% (p=0.002 n=10)\r\nUnary/16384B-12 202.0µ ± 16% 182.9µ ± 31% ~ (p=0.393 n=10)\r\nUnary/2MiB-12 6.891m ± 12% 7.740m ± 26% ~ (p=0.796 n=10)\r\ngeomean 435.1µ 373.2µ -14.24%\r\n```\r\n可得,\r\n| 报文 | duplex (sec/op) | fastpath (sec/op) | 变化 | p 值 | 显著性 |\r\n| --- | --- | --- | --- | --- | --- |\r\n| 128B | 163.6µs | 121.3µs | -25.85% | 0.003 | 显著 |\r\n| 1KiB | 157.4µs | 113.0µs | -28.25% | 0.002 | 显著 |\r\n| 16KiB | 202.0µs | 182.9µs | -9.4% | 0.393 | 不显著 |\r\n| 2MiB | 6.891ms | 7.740ms | +12.3% | 0.796 | 不显著 |\r\n| geomean | 435.1µs | 373.2µs | -14.24% | - | 整体正收益 |\r\n\r\n## 许可证\r\n\r\nApache License 2.0",
"createdAt": "2026-08-25T21:52:16Z",
"updatedAt": "2026-08-31T20:09:44Z",
"author": {
"login": "lizining1231"
},
"replies": [
{
"id": "DC_kwDOCJS8R84BFfn_",
"url": "https://github.com/apache/dubbo-go/discussions/3673#discussioncomment-18217471",
"body": "分析一下负收益部分是因为什么原因",
"createdAt": "2026-08-31T11:24:41Z",
"updatedAt": "2026-08-31T11:24:41Z",
"author": {
"login": "Alanxtl"
}
}
]
},
{
"id": "DC_kwDOCJS8R84BFhEo",
"url": "https://github.com/apache/dubbo-go/discussions/3673#discussioncomment-18223400",
"body": "# fastpath大报文场景下负收益原因\r\n\r\n\r\n1MiB场景下 优化前后火焰图diff\r\n\r\n
\r\n\r\n1MiB场景下 优化前 memmove展开\r\n
\r\n\r\n\r\n1MiB场景下 优化后 memmove展开\r\n
\r\n\r\n\r\n采样时间相同,duplex 33.15s / 19.70% → fastpath 36.99s / 21.26%。fastpath 在 `bytes.Buffer` 里先 Write 再 Read 整包交给传输层,同一条 1MiB 数据比 duplex 的 `io.Pipe` 流式管道多传输一遍,所以大报文下 fastpath 收益整体为负。\r\n\r\nfastpath 节省的是固定开销,而同时存在会随报文增大而增大的可变开销。在128B报文下,每请求成本里io.pipe的固定开销在总开销中占比很高,fastpath 省下的收益 >其带来的拷贝代价\r\n在1MiB报文下,每请求 ~4ms 被 gzip 压缩(23%)和传输(20%)占满,固定开销占总开销比例趋零,收益也 ≈ 0,同时拷贝开销随报文增大而增大,存在负收益。\r\n\r\n从源码来看,池化 `bytes.Buffer`直到 `CloseWrite` 才同步发起请求,传输层再从该 buffer 整包读走,**同一份 1MiB 数据在内存里被 Write + Read 运输两遍**。而原 duplex 路径直接把 payload 写入 `io.Pipe`,net/http 边读边发,数据只运输一次。\r\n\r\n duplex(流式,不囤积):\r\n\r\n```go\r\nfunc (d *duplexHTTPCall) Write(data []byte) (int, error) {\r\n ...\r\n // 写入 io.Pipe,net/http 边读边发,数据仅运输一次\r\n return d.requestBodyWriter.Write(data)\r\n}\r\n```\r\n\r\n fastpath(整包囤积 + 二次搬运):\r\n```go\r\n// 先整包囤进内存(第一次搬运)\r\nfunc (c *unaryFastPathCall) Write(data []byte) (int, error) {\r\n ...\r\n return c.body.Write(data) // 1MiB 拷入 pooled buffer\r\n}\r\n\r\n// 传输层再从 buffer 读走(第二次搬运)\r\nfunc (b *unaryRequestBody) Read(p []byte) (int, error) {\r\n ...\r\n return b.buf.Read(p) // 1MiB 拷给网络层\r\n}\r\n```",
"createdAt": "2026-08-31T20:04:27Z",
"updatedAt": "2026-08-31T20:04:27Z",
"author": {
"login": "lizining1231"
},
"replies": []
},
{
"id": "DC_kwDOCJS8R84BFhVu",
"url": "https://github.com/apache/dubbo-go/discussions/3673#discussioncomment-18224494",
"body": "近几轮压测出现未控制变量、理解偏差导致数据有效性低的问题复盘:\r\n\r\n- triple协议不需要显示设置,protocol.WithTriple()是设置triple协议,triple\\_protocol.WithTriple()是换编码为connect,二者不同。之前因为读到wire层注释`clients use the GRPC protocol. Add triple_protocol.WithTriple().`误认为框架层默认协议是grpc,dubbo-go的默认协议是triple,协议计入变量\r\n- connect编码的数据与grpc编码的数据不同,Triple wire 是connect编码,但是triple协议的默认编码为grpc,编码计入变量\r\n- 根据代码现有行为,dubbo-go默认开gzip,grpc端默认不开gzip,gzip计入变量\r\n- 间隙10s无法使得电脑状态恢复,虽然cpu没有降频其他环境信息也无变化,连续压测下会出现先测的绝对值高后测的低、早上性能高晚上性能低,测试时间位置、测试轮数、测试顺序应计入变量\r\n- 同一轮测试存在一定抖动幅度,不同批次的测试,基线和优化均容易取到抖动下的中位数,无法复现性能收益百分比的情况,例如同一个duplex测五轮P99指标,\r\n\r\n 第一批:20.66,17.25,17.15,18.73,17.10\r\n\r\n 第二批:22.08,20.84,22.22,18.57,19.92\r\n\r\n 可能需要提升轮数、提升间隙时间,并注意原始数据\r\n- 以后测试的时候可以用这些方法并固化为脚本:确认协议看日志第一行`URL specified explicitly tri://... → triple`,确认编码 tcpdump/代理抓 HTTP/2 头,`application/grpc+proto` = gRPC 编码;`application/triple+wrapper/application/proto` = connect 编码,确认gzip 抓包,`Content-Encoding`: gzip = 开;identity = 关",
"createdAt": "2026-08-31T21:49:24Z",
"updatedAt": "2026-08-31T22:45:36Z",
"author": {
"login": "lizining1231"
},
"replies": []
},
{
"id": "DC_kwDOCJS8R84BFr90",
"url": "https://github.com/apache/dubbo-go/discussions/3673#discussioncomment-18268020",
"body": "step2.2\r\n# 性能瓶颈分析报告(二)Triple-unary marshal 内存分配专项\r\n\r\n## 目录\r\n\r\n一、摘要\r\n\r\n二、数据分析\r\n\r\n三、代码瓶颈定位\r\n\r\n四、瓶颈验证\r\n\r\n五、方案设计\r\n\r\n六、方案验证\r\n\r\n七、预估收益与方案边界\r\n\r\n八、参考链接\r\n\r\n## 一、摘要\r\n\r\n本文针对 Triple unary 发送热路径上的**结构性 per-request 分配税**,即”每次请求 `codec.Marshal` 新分配一块 ≈L 的输出切片、再 `bytes.NewBuffer` 包一层、再全量拷进传输缓冲“做分析。\r\n\r\n从分配数据定位到该瓶颈,用pprof等工具进行验证,设计\"池 + `MarshalAppend`\"零分配方案——给 `Codec` 增加可选接口 `marshalAppender`,`envelopeWriter` / `tripleUnaryMarshaler` 从既有 `bufferPool` 取 `*bytes.Buffer` 借底层数组做追加目标,未命中(hessian2/msgpack/json/自定义 codec)自动回退旧路径,行为零变化。预估收益:B/op 大包 **−10%\\~−25%**、allocs/op 端到端 −2\\~−6。\r\n\r\n## 二、数据分析\r\n\r\n这次优化的重点内容是内存分配,所以这边主要采用go test -bench进行测试\r\n\r\n### 2.1 分配税与消息大小的关系(从实测分配占比看)\r\n\r\n**定向 marshal bench 的分配绝对量(优化前,每消息)**:\r\n\r\n| 消息 | marshal 层 B/op(优化点 A+B) | 端到端 B/op(fast path 生产入口) | marshal 层占比 |\r\n| ----- | ----------------------- | ------------------------ | ----------- |\r\n| 128B | ≈216 | ≈26.6KB | **<1%** |\r\n| 1KiB | ≈1223 | ≈32.1KB | \\~3.8% |\r\n| 16KiB | ≈18505 | ≈143.5KB | **\\~12.9%** |\r\n| 1MiB | ≈1056870 | ≈6.53MB | **\\~16.2%** |\r\n\r\n一些规律:\r\n\r\n1. **分配量随消息增大**:`codec.Marshal` 的输出切片大小 ≈ 消息字节数(按 size class 取整),消息越大,单次分配越多,这是大包场景收益更明显的原因。\r\n2. **小报文分配税占比不足 5%**:128B/1KiB 段,marshal 层 B/op 占总 B/op 的比例被 http2/TLS/context 等固定开销淹没,**端到端 B/op 收益不可见**,只能从定向 bench 看。\r\n3. **大报文分配税成为主导项**:≥16KiB 段 marshal 层占端到端 B/op 的 13%\\~16%,是端到端 B/op 中最大的单一项,**收益预估在端到端可见**。\r\n\r\n所以这次优化主要针对的是分配税,大小包都会收益,大包下会更明显,小包相对收益不会明显。\r\n\r\n### 2.2 相对 gRPC 的额外开销\r\n\r\n**gRPC-Go 的** **`encoding.Codec.Marshal`** **也是每次** **`proto.Marshal`** **新分配的**,但区别在发送路径:\r\n\r\n| 开销项 | dubbo-go(Triple,优化前) | gRPC-Go |\r\n| -------------------- | ---------------------- | -------------------------- |\r\n| `codec.Marshal` 新分配 | 每次(≈L) | 每次(≈L,相同) |\r\n| `bytes.NewBuffer` 包装 | 每次(≈40B 小分配) | 无(直接以 \\[]byte 交 transport) |\r\n| marshal 输出复用 | 仅包装对象进池,底层 \\[]byte 不复用 | 无(每次 `proto.Marshal` 新分配) |\r\n\r\n### 2.3 瓶颈定位\r\n\r\n本次要优化的点有两个:优化点 A是`codec.Marshal` 每次新分配 ≈L 输出切片并全程清零的开销\r\n优化点 B是`bytes.NewBuffer(raw)` 每次 ≈40B 逃逸包装的开销。下表按 1MiB 档列出两者的每次开销、gRPC-Go 及上游 connect-go是否有此开销。\r\n\r\n
\r\n\r\n| 优化点 | 每次开销(1MiB 档) | gRPC-Go 是否有 | 上游 connect-go 是否已消除 |\r\n| -------------------------------- | -------------------------------------------------------------- | -------------------------------------------- | ------------------------------------------------ |\r\n| `codec.Marshal` 输出切片(优化点 A) | 每次 unary **新分配 ≈L**(1MiB → ≈1,048,576 B)+ 全程清零(memclr ≈53µs/次) | **有**:`proto.Marshal` 同样每次新分配 ≈L + 清零,无任何复用 | **已消除**:`marshalAppend` 把结果追加进池 buffer,0 分配 0 清零 |\r\n| `bytes.NewBuffer(raw)` 包装(优化点 B) | 每次 unary **≈40B 小分配**(`*bytes.Buffer` 逃逸到堆),与消息大小无关 | **无**:marshal 输出 `[]byte` 直接交 transport,不做包装 | **已消除**:envelopeWriter 用池内 buffer 包装,无逃逸小分配 |\r\n\r\n## 三、代码瓶颈定位\r\n\r\n### 3.1 `codec.Marshal` 每次新分配(优化点 A)\r\n\r\n[protocol/triple/triple\\_protocol/codec.go#L111-L117](https://github.com/apache/dubbo-go/blob/develop/protocol/triple/triple_protocol/codec.go#L111-L117):\r\n\r\n```go\r\nfunc (c *protoBinaryCodec) Marshal(message any) ([]byte, error) {\r\n protoMessage, ok := message.(proto.Message)\r\n ...\r\n return proto.Marshal(protoMessage) // proto.Marshal 内部 o.marshal(nil, ...):以 nil 开头,必然分配\r\n}\r\n```\r\n\r\n`proto.Marshal` 恒以 nil 起步,输出切片只能新分配(大小 ≈L,按 size class)。\r\n\r\n### 3.2 包装 + 传输写拷贝(优化点 B)\r\n\r\n[protocol/triple/triple\\_protocol/envelope.go#L69-L95](https://github.com/apache/dubbo-go/blob/develop/protocol/triple/triple_protocol/envelope.go#L69-L95)(gRPC wire)与 [protocol/triple/triple\\_protocol/protocol\\_triple.go#L504-L531](https://github.com/apache/dubbo-go/blob/develop/protocol/triple/triple_protocol/protocol_triple.go#L504-L531)(Triple wire 慢路径)结构相同:\r\n\r\n```go\r\nraw, err := w.codec.Marshal(message) // ① 优化点 A:全新 []byte,B/op≈L\r\nbuffer := bytes.NewBuffer(raw) // ② 优化点 B:*bytes.Buffer 对象(≈40B,逃逸)\r\ndefer w.bufferPool.Put(buffer) // 归还的只是包装对象;底层 []byte 每次新分配,不随包装进池复用\r\nenvelope := &envelope{Data: buffer}\r\nreturn w.Write(envelope) // └── 一次写拷贝:Data 全量拷进 writer(io.Copy)\r\n```\r\n\r\n## 四、验证瓶颈\r\n\r\n所有 profile 均用**固定迭代次数**(`-benchtime=Nx`)或**按事件采样**(memprofile),保证 per-op 可比、不被吞吐污染。\r\n\r\n### 4.1 内存分配 profile(memprofile,按事件采样)\r\n\r\n`-memprofile -memprofilerate=1 -benchtime=3000x`(固定 3000 次),优化前 1MiB unary marshal:\r\n\r\n
\r\n\r\n\r\n可以观察到:\r\n\r\n- **分配几乎 100% 集中在** **`proto.MarshalOptions.marshal`**,调用链 `tripleUnaryMarshaler.Marshal → protoBinaryCodec.Marshal → proto.Marshal → MarshalOptions.marshal`;\r\n- 3000 次固定迭代累计分配 ≈3.1GB,其中 `MarshalOptions.marshal` 占 **99.92%**;\r\n- 火焰图上的巨型分配热点可以印证章节 2.3 优化点 A 是发送路径上唯一的大分配来源。\r\n\r\n### 4.2 alloc pprof(累计分配字节对比)\r\n\r\n同 3000 次固定迭代,`-sample_index=alloc_space`:\r\n\r\n| 指标(3000 次累计) | 占比 |\r\n| ----------------------------- | ------ |\r\n| 分配总量 | ≈3.1GB |\r\n| 热路径分配(MarshalOptions.marshal) | 99.92% |\r\n\r\n优化后热路径 0 分配(benchmem allocs 2→0、B/op 1,056,891→353,见交叉验证表);memprofile 累计(3000 次)仍采到 ≈4.3MB 非热路径分配,来自 bench 进程级采样窗口内的消息构造与池首轮扩容等一次性成本,无法精确拆分 per-op,不作为热路径收益证据\r\n\r\n### 4.3 CPU profile(固定迭代 30000x,per-op 可比)\r\n\r\n`-benchtime=30000x` 固定两端 op 数,火焰图宽度 = per-op 时间占比:\r\n\r\n| 函数 | 占比 / per-op |\r\n| ---------------------------------- | ---------------- |\r\n| `unicode/utf8.ValidString` | 40.9% / **84µs** |\r\n| `runtime.memmove` | 28.1% / **58µs** |\r\n| `runtime.memclrNoHeapPointers`(清零) | 23.5% / **53µs** |\r\n\r\n- `ValidString`(UTF-8 校验)per-op 成本两端几乎相同(84 vs 85µs),是序列化固有成本;它在优化后\"占比更大\"是因为其他成本消失后成为绝对主体,**不是变慢**;\r\n- **省下的是** **`memclr`** **53µs + 部分** **`memmove`** **34µs ≈ 87µs**,与实测 206→115µs 的 \\~91µs 差距数据相符\r\n\r\n### 交叉验证的总结\r\n\r\n| 采集内容 | 测试结果 | 结论 |\r\n| ------------------------------ | ---------------------------------------------------------------- | --------------------- |\r\n| memprofile 分配热点(按事件) | 分配 99.92% 集中于 `MarshalOptions.marshal`(≈1MB/次 × 3000 = 3.1GB) | 优化点 A 是唯一大分配来源 |\r\n| alloc pprof(固定 3000 次) | 累计 3.1GB;热路径占比 99.92% | 分配字节开销与占比巨大 |\r\n| CPU profile(固定 30000 次,per-op) | `memclr` 53µs 、`memmove` 58;`ValidString` 85µs | 省下 ≈87µs = 实测延迟差的全部来源 |\r\n\r\n结论:**优化核心是去除开销\"每次 marshal 新分配 1MiB + 清零\"**。\r\n\r\n## 五、方案设计\r\n\r\n### 5.1 问题定位\r\n\r\n源码定位将分配税锁定在 `envelopeWriter.Marshal` / `tripleUnaryMarshaler.Marshal` 每次调用中的 `codec.Marshal` 新分配(优化点 A)与 `bytes.NewBuffer(raw)` 包装(优化点 B)。两条 wire(gRPC / Triple-connect)共用同一批 marshaler 类型,改动一次客户端发送与 gRPC 双端发送同时受益;\r\n\r\n### 5.2 设计目标\r\n\r\n- **零分配**:稳态(池命中 + cap 足够)下 marshaler 层每消息 0 分配;\r\n- **兼容性**:不应改变任何原有行为,未命中 `marshalAppender` 的 codec(hessian2/msgpack/json/自定义/generic wrapper)自动回退旧路径,wire 字节、错误链、压缩/`sendMaxBytes` 判断顺序与阈值完全不变;\r\n- **最小侵入**:用可选接口(type assert)而非改造 `Codec` 接口本身,第三方自定义 codec 编译与运行零影响。\r\n- **protobuf-go 零分配保证**:`MarshalAppend` 直接把调用方 `b` 传给编码器,而 `Marshal` 恒以 nil 起步;cap 判定在 lib 层 `MarshalOptions` 门控(生成代码提供 `Size` 与 append 编码函数、`sizecache` 缓存 size),`cap(b)-len(b) >= size` 时跳过 `make+copy` 走纯 append,**零分配条件①:生成消息 + 自备缓冲 cap 足够**;\r\n\r\n### 5.3 方案要点\r\n\r\n1. **codec 层**:新增可选接口 `marshalAppender { MarshalAppend(dst []byte, m any) ([]byte, error) }`,`protoBinaryCodec` 实现为 `proto.MarshalOptions{}.MarshalAppend(dst, protoMessage)`;\r\n2. **envelopeWriter.Marshal**:开头 type assert,命中则从 `bufferPool.Get()` 取 `*bytes.Buffer`,以 `buffer.Bytes()` 为 dst 调 `MarshalAppend`;若扩容(`cap(raw) > buffer.Cap()`)把新数组整块换入 buffer 进池,否则 `buffer.Write(raw)` 仅修正长度(0 分配);\r\n3. **tripleUnaryMarshaler.Marshal**:同款改造,未压缩分支把 `buffer.Bytes()` 交给 `m.write`,压缩分支保持 `*bytes.Buffer`。\r\n\r\n### 5.4 回滚与防御性设计\r\n\r\n本方案通过对逐行改动做防御性 review 收敛出的设计约束。风险等级:中等偏低(可选接口 + 分支 + 天然回退,风险面小于 fast path 阶段的配置开关方案),以下是一些落地时需要注意的点:\r\n\r\n1. **天然回退(零配置零开关)**:`marshalAppender` 是可选接口,任何不实现它的 codec 自动走 `Marshal` 旧路径,无需配置、无需发布灰度开关即可整体回退——风险面比 fast path 阶段(需 `unary-fast-path` 开关)更小;\r\n2. **pool 不变量(Get 即空、从 0 写入)**:快路径正确性依赖\"`bufferPool.Get()` 每次返回 Reset 过的 buffer、`MarshalAppend(buffer.Bytes())` 恒以 len 0 起步\"。该不变量未被 language-level 强制,一旦未来有人改用未 Reset 的池或在 MarshalAppend 前改动 buffer 长度,`cap(raw) > buffer.Cap()` 分支与 `buffer.Write(raw)` 的\"修正长度\"逻辑会静默错乱,需以用例锁定(见回归测试-池不变量);\r\n3. **wire 字节一致性**:`MarshalAppend` 与 `Marshal` 由同一 protobuf 编码器输出,语义保证相同;仍加\"新路径输出 == 旧路径输出\"对拍测试锁定,矩阵覆盖空消息/512B 边界/8MiB±1 × 压缩开关 × 双 wire(见回归测试-wire 对拍);\r\n4. **buffer 归还**:`write()` 内 `io.Copy` 同步消费完才 `defer Put`,buffer 不可能在被读时归还;已有 fast path 的 transport 恰好一次归还纪律可复用。池内残留旧明文只驻留在数组、不随信封写出(信封只写 `Data.Len()`),不含线上泄漏,但\"读写均在归还前完成\"依赖同步语义,不因未来改动破坏;\r\n5. **快路径作用域边界(防静默失效)**:`marshalAppender` 仅 `protoBinaryCodec` 实现;`protoWrapperCodec`/`hessian2Codec`/`msgpackCodec`/`protoJSONCodec`/`tripleServerCodecSession` 均不走快路径。**Triple 服务端响应(IDL 与非 IDL 均如此)**:wire codec 为 proto 时被包成 `tripleServerCodecSession`(protocol\\_triple.go#L187-L193),恒不命中快路径,服务端发送恒走慢路径。真实收益面 = Triple 客户端发送 + gRPC 双端,不主张整体零分配——收益面按此边界声明;\r\n6. **gRPC/grpc-web 回归面**:`envelopeWriter` 同时服务 gRPC wire(`protocol_grpc.go`),codec 为 `protoBinaryCodec` 时 gRPC 路径同样命中快路径。wire 字节等价得以保持,但最易被忽略的回归面是 gRPC 而非 triple,对拍用例须在双 wire 各跑一组;\r\n7. **单级池的内存权衡**:`cap(raw) > buffer.Cap()` 时新数组整块换入池;`maxRecycleBufferSize=8MiB` 兜底丢弃,但 512B\\~8MiB 区间无 size 分级,一次大消息后大缓冲滞留,会被后续小消息复用,抬高连接常驻内存,属\"分配换内存\"的既有权衡,经考虑本次方案中不引入分级池;\r\n8. **快慢路径逻辑重复(防漂移)**:慢路径(Marshal)与快路径(MarshalAppend)各自维护 `sendMaxBytes`/`compressMinBytes`/压缩头判断,将来改动只改一半会造成行为不一致,用契约用例锁定二者对同一输入的错误码与副作用一致;\r\n9. **backupCodec 回退链等价**:快路径先在 `MarshalAppend` 失败、再回退 `marshalWithFallback(backupCodec,...)`;慢路径先在 `Marshal` 失败。二者回退触发点不同,但应语义等价(主==backup 不二次回退、无死循环、错误码 `CodeInternal`、backup 为 nil 直接返回),需用例锁定;\r\n10. **规划内的回归测试**(约 8 个):\r\n - **wire 字节对拍(最高优先级)**:同消息快/慢路径逐字节断言写给 `io.Writer` 的 socket 输出(含 5 字节 prefix)一致;矩阵覆盖 `空/1B/511B/512B(边界)/513B/1KiB/8MiB±1` × `压缩关闭/开启(含 compressMinBytes 边界)` × `triple 与 gRPC 双 wire`;\r\n - **池不变量与边界**:Get 后 `Len()==0`;`nil` 消息走 `write(nil)` 分支、空 proto 输出零长度信封、恰 512B 与恰 `compressMinBytes` 边界无 panic;\r\n - **backupCodec 回退**:主 codec 失败→回退 backup 输出正确;主==backup 不二次回退、无死循环、错误码 `CodeInternal`;backup 为 nil 直接返回错误;快慢路径各一组;\r\n - **压缩阈值与 sendMaxBytes 一致**:快慢路径对超限消息均返回 `CodeResourceExhausted`,压缩头 `tripleUnaryHeaderCompression` 均被设置;\r\n - **>8MiB 丢弃与残留**:8MiB+1 消息后该缓冲不被复用;大消息后紧接 1B 消息输出不受池内残留影响;\r\n - **并发安全(`-race`)**:多 goroutine 共享同一 `envelopeWriter`/`bufferPool` 并发 `Marshal`,无数据竞争、无同一 `*bytes.Buffer` 双归还、输出各自正确;\r\n - **类型守卫**:断言 wrapper/hessian2/msgpack/json/`tripleServerCodecSession` 不实现 `marshalAppender`,锁定作用域边界,防未来误给包装 codec 加 `MarshalAppend` 造成 wire 不一致;\r\n - **快路径 codec 错误守卫**:防止快路径吞错/panic。验证 `MarshalAppend` 收到非 `proto.Message` 返回 `errNotProto`,快路径(envelopeWriter/tripleUnaryMarshaler)转为 `CodeInternal` 且不 panic,与慢路径 `Marshal` 行为一致。\r\n\r\n\r\n### 5.5 与上游 connect-go 的对齐与差异适配\r\n\r\n与其v1.20.0对比,分\"可直接对齐\"与\"必须本地化适配\"两类:\r\n\r\n**与上游相同的点**\r\n\r\n1. `buffer_pool.go`:本地与上游逐行一致(`initialBufferSize=512`、`maxRecycleBufferSize=8MiB`、Get/Put 逻辑全同),无改动;\r\n2. `protoBinaryCodec.MarshalAppend`:本地实现 `proto.MarshalOptions{}.MarshalAppend(dst, protoMessage)` 与上游一致;\r\n3. `envelopeWriter.marshalAppend`:`pool.Get → MarshalAppend(buffer.Bytes()) → cap 比较 → 换入或 Write → Write(envelope)` 方法体与上游逐行一致。\r\n\r\n**与上游不同的点(本地化适配,不可整段拉取)**\r\n\r\n1. `marshalAppender` 接口:上游内嵌 `Codec`(`type marshalAppender interface { Codec; MarshalAppend([]byte, any) ... }`),本地未内嵌(功能等价,建议对齐以保持逐行一致);\r\n2. `envelopeWriter.Marshal` 的 appender 分支:本地保留 `backupCodec` fallback(上游无 backupCodec,慢路径直接 `w.marshal()`);**整段替换上游会丢失 dubbo 特有的 backup codec 兜底语义**,故只对齐 `marshalAppend` 方法体,分支结构保持本地;\r\n3. `tripleUnaryMarshaler.Marshal`(protocol\\_triple.go):上游无此类型(unary 走 envelopeWriter),为 fast path 阶段自研类型,改造只能本地实现;\r\n4. `protoJSONCodec.MarshalAppend`:上游已实现(JSON 也走零分配),本地未加(可选:加上则 JSON 场景同样受益,不加行为不变)。\r\n\r\n## 六、方案验证与实施\r\n\r\n### 6.1 生产落地改动点\r\n\r\n方案以**可选接口 + 分支**方式落地,共 3 个文件,均为增量改动:\r\n\r\n| 文件 | 改动 | 是否影响非 proto codec |\r\n| -------------------- | ------------------------------------------------------------ | ----------------- |\r\n| `codec.go` | 新增 `marshalAppender` 接口 + `protoBinaryCodec.MarshalAppend` | 否(可选接口) |\r\n| `envelope.go` | `envelopeWriter.Marshal` 增加 appender 分支 + `marshalAppend` 助手 | 否(type assert 回退) |\r\n| `protocol_triple.go` | `tripleUnaryMarshaler.Marshal` 同款改造 + `marshalAppend` 助手 | 否(type assert 回退) |\r\n\r\n新增 `marshal_perf_bench_test.go` 作为验收证据。改动前后组件职责与调用关系对照:\r\n\r\n| 组件 | 改造前 | 改造后 | 变化 |\r\n| ------------------------------ | ------------------------------------------------------------------------------ | -------------------------------------------------- | -------------------------- |\r\n| `Codec` 接口 | 仅 `Marshal`/`Unmarshal` | 不变(`marshalAppender` 为独立可选接口) | 第三方 codec 零影响 |\r\n| `protoBinaryCodec` | `Marshal` 每次新分配 | 新增 `MarshalAppend`(追加到外部缓冲) | 新增方法,`Marshal` 保留 |\r\n| `envelopeWriter.Marshal` | `codec.Marshal` → `bytes.NewBuffer` → `Write` | 断言 `marshalAppender`,命中走 `marshalAppend`(池 buffer) | 命中走 appender 分支,未命中自动回退旧路径 |\r\n| `tripleUnaryMarshaler.Marshal` | `codec.Marshal` → `bytes.NewBuffer` → `Write`(与 `envelopeWriter.Marshal` 结构相同) | 断言 `marshalAppender`,命中走 `marshalAppend`(池 buffer) | 命中走 appender 分支,未命中自动回退旧路径 |\r\n| `bufferPool` | 归还时仅包装对象进池,底层 \\[]byte 不复用 | 扩容结果整块进池,稳态复用底层数组 | 复用语义增强 |\r\n\r\n#### 6.1.1 流程图\r\n\r\n**改造前(每消息)**:\r\n\r\n```mermaid\r\nflowchart TB\r\n A[\"Send(msg)\"] --> B[\"codec.Marshal(message)
① 优化点A 全新[]byte ≈L\"]\r\n B --> C[\"bytes.NewBuffer(raw)
② 优化点B 小分配 ≈40B\"]\r\n C --> D[\"envelope{Data: buffer}\"]\r\n D --> E[\"w.Write(envelope)
io.Copy 一次写拷贝\"]\r\n classDef bad fill:#ffcdd2,stroke:#b71c1c;\r\n class B,C bad;\r\n```\r\n\r\n**改造后(稳态:池命中 + cap 足够)**:\r\n\r\n```mermaid\r\nflowchart TB\r\n A2[\"Send(msg)\"] --> B2[\"bufferPool.Get: *bytes.Buffer\"]\r\n B2 --> C2[\"MarshalAppend 追加进池 buffer 底层数组
0 alloc\"]\r\n C2 --> D2{\"cap 不足?\"}\r\n D2 -- 否 --> E2[\"envelope{Data: buffer}\"]\r\n D2 -- 是(首轮) --> F2[\"扩容一次, 结果进池
amortized 趋 0\"]\r\n F2 --> E2\r\n E2 --> G2[\"w.Write(envelope)
压缩判断用 Len, 同步消费后归还池\"]\r\n classDef good fill:#c8e6c9,stroke:#1b5e20;\r\n class B2,C2,D2 good;\r\n```\r\n\r\n#### 6.1.3 调用序列对比(同一 unary 请求)\r\n\r\n- **改造前**:`Marshal`(新分配 \\[]byte)→ `bytes.NewBuffer`(包装)→ `Write`(`io.Copy` 一次写拷贝)→ 归还包装对象(底层 \\[]byte 丢弃)\r\n- **改造后**:`MarshalAppend`(追加进池 buffer,0 alloc)→ `Write`(`io.Copy` 一次写拷贝,次数不变)→ 消费完归还池;省的是每消息分配 + 清零\r\n\r\n调用序列形态不变,仅\"分配+包装\"收敛为\"复用池 buffer\",且 `MarshalAppend` 与 `Marshal` 输出字节一致(同一编码器),wire 不变。\r\n\r\n### 6.2 关键代码片段\r\n\r\n```go\r\n// codec.go:可选接口 + proto 实现(对齐 connect-go codec.go:108-114)\r\ntype marshalAppender interface {\r\n MarshalAppend(dst []byte, message any) ([]byte, error)\r\n}\r\nfunc (c *protoBinaryCodec) MarshalAppend(dst []byte, message any) ([]byte, error) {\r\n protoMessage, ok := message.(proto.Message)\r\n if !ok {\r\n return nil, errNotProto(message)\r\n }\r\n return proto.MarshalOptions{}.MarshalAppend(dst, protoMessage)\r\n}\r\n```\r\n\r\n```go\r\n// envelope.go:envelopeWriter.Marshal 增加 appender 分支(语义对齐 connect-go envelope.go:181-204)\r\nfunc (w *envelopeWriter) marshalAppend(message any, appender marshalAppender) *Error {\r\n buffer := w.bufferPool.Get()\r\n defer w.bufferPool.Put(buffer)\r\n raw, err := appender.MarshalAppend(buffer.Bytes(), message)\r\n if err != nil {\r\n return errorf(CodeInternal, \"marshal message: %w\", err)\r\n }\r\n if cap(raw) > buffer.Cap() { // 扩容发生:新数组整块换入池\r\n *buffer = *bytes.NewBuffer(raw)\r\n } else { // 未扩容:仅修正长度,0 分配\r\n buffer.Write(raw)\r\n }\r\n envelope := &envelope{Data: buffer}\r\n return w.Write(envelope)\r\n}\r\n```\r\n\r\n`tripleUnaryMarshaler.Marshal` 同款改造(未压缩分支把 `buffer.Bytes()` 交给 `m.write`,压缩分支保持 `*bytes.Buffer`,判断顺序与阈值不变)。\r\n\r\n## 七、预估收益与方案边界\r\n\r\n### 7.1 生产中影响因素\r\n\r\n方案收益(协议层 marshal 净收益)是优化基点,生产集成后受以下要素影响:\r\n\r\n1. **端到端摊薄**(最主要):协议内 A/B 为定向 marshal bench(见章节四)净收益;端到端叠加框架栈/网络/服务端调用链耗时,B/op 收益保留、延迟收益被摊薄(本方案主打分配而非延迟);\r\n2. **gzip 压缩开关**(指标口径):用户开启压缩时,压缩路径自身临时分配会掩盖 B/op 账面收益;分配与延迟收益不受影响;\r\n3. **业务负载与并发饱和**(收敛):真实调用带业务耗时,marshal 层占比被业务耗时摊薄;纯序列化场景(业务≈0)才接近定向档位;\r\n4. **GC 与长跑**(双向):生产长跑下 bufferPool 复用使 B/op 收益稳定;GC 清池后首轮重建属池化常态,amortized 趋 0;\r\n5. **大报文带宽天花板**(收敛):1MiB 段受服务端带宽限制,延迟收益收敛,但**内存峰值/GC 压力下降是确定收益**(本方案定位为 allocation hotspot,非 latency bottleneck);\r\n6. **非 proto codec 占比**(口径):hessian2/msgpack/json/自定义 codec 走旧路径无收益,收益面覆盖 proto(Triple 主力序列化)。\r\n\r\n### 7.2 生产预期区间(预测)\r\n\r\n| 指标 | 预估区间 | 预估依据 |\r\n| ------------- | ---------------- | ---------------------------------------------------------- |\r\n| B/op(1MiB 档) | **−10% \\~ −25%** | 消除每消息 1 次 O(L) 分配 + 包装 |\r\n| B/op(16KiB 档) | −2% \\~ −5% | 分配税占比(\\~12.9%)低于 1MiB 档(\\~16.2%),放大系数更小 |\r\n| B/op(≤1KiB) | −1% \\~ −4% | 分配税占总 B/op 不足 5%,可能被 http2/TLS/context 固定开销淹没 |\r\n| allocs/op | −2 \\~ −6 | 端到端被 \\~160 固定 alloc 淹没; |\r\n| 延迟(小包) | 端到端不可测(被淹没) | 受固定开销摊薄 |\r\n| 内存峰值 / GC 压力 | 确定下降 | 每请求少一块 L 大小短期垃圾,allocation hotspot 维度的主要收益 |\r\n\r\n### 7.3 方案的边界\r\n\r\n1. `marshalAppender` 只有 `protoBinaryCodec` 实现。hessian2 / msgpack / json / 自定义 codec **不实现**,type assert 失败自动走旧 `Marshal` 路径。\r\n2. Triple 服务端响应被 `tripleServerCodecSession` 包裹,恒不命中快路径,走慢路径。\r\n3. 收益面 = **Triple 客户端发送 + gRPC 双端**(`envelopeWriter` 同时服务 gRPC wire)。\r\n4. 快路径 `MarshalAppend` 失败时仍走 `backupCodec` 回退链,语义与慢路径等价。\r\n5. 快路径`marshalAppender` 仅 `protoBinaryCodec` 实现,hessian2/msgpack/json/generic wrapper 走旧路径,收益面只覆盖 proto;\r\n\r\n## 八、参考链接\r\n\r\n- [connect-go](https://github.com/connectrpc/connect-go) 上游 `marshalAppender` / `marshalAppend` 实现(本方案对标,v1.20.0):[codec.go#L56-L66](https://github.com/connectrpc/connect-go/blob/v1.20.0/codec.go#L56-L66)、[codec.go#L108-L114](https://github.com/connectrpc/connect-go/blob/v1.20.0/codec.go#L108-L114)、[envelope.go#L150-L153](https://github.com/connectrpc/connect-go/blob/v1.20.0/envelope.go#L150-L153)、[envelope.go#L181-L204](https://github.com/connectrpc/connect-go/blob/v1.20.0/envelope.go#L181-L204)\r\n- [google.golang.org/protobuf](https://github.com/protocolbuffers/protobuf-go):[proto/encode.go](https://github.com/protocolbuffers/protobuf-go/blob/master/proto/encode.go)(`MarshalAppend` 追加语义、cap 门控在 `MarshalOptions` 层)、[internal/impl/encode.go](https://github.com/protocolbuffers/protobuf-go/blob/master/internal/impl/encode.go)(纯 append 编码、`sizecache`;行号随版本漂移,不锁定)\r\n生产落地PR 503 https://github.com/connectrpc/connect-go/pull/503\r\n- grpc-go(官方 v1.64.1):[shared\\_buffer\\_pool.go#L23-L100](https://github.com/grpc/grpc-go/blob/v1.64.1/shared_buffer_pool.go#L23-L100)(`SharedBufferPool` 分级池 16B/256B/4KB/64KB/1MB,**仅用于收包解析**,见文件头部注释)、[encoding/gzip/gzip.go#L38-L100](https://github.com/grpc/grpc-go/blob/v1.64.1/encoding/gzip/gzip.go#L38-L100)(`poolCompressor`/`poolDecompressor` 压缩器对象池)、[internal/transport/http\\_util.go#L392-L434](https://github.com/grpc/grpc-go/blob/v1.64.1/internal/transport/http_util.go#L392-L434)(`writeBufferPoolMap` 帧写缓冲池);注意 dubbogo fork v1.42.10 为单级池基线,分级池属 v1.63+ 新增,引用时按版本区分\r\n\r\n***\r\n\r\n",
"createdAt": "2026-09-03T11:50:57Z",
"updatedAt": "2026-09-03T12:42:05Z",
"author": {
"login": "lizining1231"
},
"replies": [
{
"id": "DC_kwDOCJS8R84BFzsF",
"url": "https://github.com/apache/dubbo-go/discussions/3673#discussioncomment-18299653",
"body": "这个 PR 的服务端非 IDL 路径仍然是:\r\n\r\n```text\r\ninner.Marshal → 独立 payload\r\n → 编码 TripleResponseWrapper,复制 payload\r\n```\r\n\r\n客户端 [protoWrapperCodec.Marshal](/C:/Users/m1346/AppData/Local/Temp/dubbo-go-pr3718-review/protocol/triple/triple_protocol/codec.go:267) 甚至还没有接入 appender。\r\n\r\n可以分两步:\r\n\r\n- 先给客户端 wrapper 增加保持原语义的 `MarshalAppend`,复用外层输出。\r\n- 再让 Hessian/MsgPack 编码器支持写入调用方缓冲区,直接构建 protobuf wrapper 的字段。\r\n\r\n第二步更激进:protobuf 的 `bytes` 字段需要长度前缀,必须解决长度预计算、预留回填或分段输出;否则只是把复制挪了位置。Java 互通业务较多时,这条线值得单独优化。",
"createdAt": "2026-09-05T03:47:01Z",
"updatedAt": "2026-09-05T03:47:01Z",
"author": {
"login": "Alanxtl"
}
},
{
"id": "DC_kwDOCJS8R84BF0tR",
"url": "https://github.com/apache/dubbo-go/discussions/3673#discussioncomment-18303825",
"body": "谢谢详细的阅评!那我接下来的方向:\r\n1. 提issue 与 pr 先给客户端 protoWrapperCodec 加保持原语义的 MarshalAppend(复用外层输出),这项相对低成本、wire 不变、收益就是消掉 wrapper 层的新分配\r\n2. 先提proposal 内容尝试让 hessian/msgpack 编码器支持直接写进调用方缓冲区、构建 wrapper 的字段,解决\"长度预计算 / 预留回填 / 分段输出\",不能只是把复制挪一个位置而是消除\r\n3. 将方向更新至plan",
"createdAt": "2026-09-05T11:56:12Z",
"updatedAt": "2026-09-05T11:56:12Z",
"author": {
"login": "lizining1231"
}
}
]
},
{
"id": "DC_kwDOCJS8R84BFzsa",
"url": "https://github.com/apache/dubbo-go/discussions/3673#discussioncomment-18299674",
"body": "**1. 使用生成的专用编码器,降低编码 CPU**\r\n\r\n分配消掉之后,复杂消息的字段遍历、长度计算和编码本身可能成为主要开销。可以通过可选能力探测接入 `SizeVT`/`MarshalToSizedBufferVT`,继续使用池化目标缓冲区,普通消息保留现有 protobuf 路径。[vtprotobuf 文档](https://github.com/planetscale/vtprotobuf#available-features)\r\n\r\n这更适合字段多、嵌套深的消息。PR 基准中的单个大字符串主要体现内存分配和复制,不能代表复杂业务对象的编码成本。也不能直接假设更换编码器后逐字节输出完全一致。\r\n\r\n**2. 更大的架构方向:带生命周期管理的分段缓冲区**\r\n\r\n让 codec 返回类似:\r\n\r\n```text\r\n[协议头] [wrapper 元数据] [payload]\r\n```\r\n\r\n各层传递缓冲区引用,消费完成后统一释放,避免为了满足连续 `[]byte` 接口而反复拼接。gRPC-Go 的 `CodecV2` 已采用 `mem.BufferSlice`,明确由框架释放编码结果,可借鉴其所有权设计。[[CodecV2 源码](https://github.com/grpc/grpc-go/blob/master/encoding/encoding_v2.go)](https://github.com/grpc/grpc-go/blob/master/encoding/encoding_v2.go)\r\n\r\n但要获得收益,后续请求体、压缩和传输接口都得支持分段消费;中间一旦重新合并成连续内存,复制又回来了。这适合独立的架构改造。\r\n\r\n我的实施顺序会是:**先做请求体所有权移交,再做 envelope 头部预留;随后根据真实流量选择非 IDL 融合或专用编码器。** 前两项不需要改变 wire format,收益来源也最明确。\r\n\r\n验证时应使用真实 HTTP/2 请求,比较吞吐、P99、CPU 和峰值内存,并加入混合消息大小及不同可压缩性。当前 `io.Discard` 微基准看不到请求体复制,也看不到缓冲区移交后持有时间变长的影响。",
"createdAt": "2026-09-05T03:50:48Z",
"updatedAt": "2026-09-05T03:50:48Z",
"author": {
"login": "Alanxtl"
},
"replies": [
{
"id": "DC_kwDOCJS8R84BFzsf",
"url": "https://github.com/apache/dubbo-go/discussions/3673#discussioncomment-18299679",
"body": "这两个不用做 我只是放在这里 可以当一个参考",
"createdAt": "2026-09-05T03:51:07Z",
"updatedAt": "2026-09-05T03:51:07Z",
"author": {
"login": "Alanxtl"
}
},
{
"id": "DC_kwDOCJS8R84BF0t_",
"url": "https://github.com/apache/dubbo-go/discussions/3673#discussioncomment-18303871",
"body": "明白,谢谢说明!\r\n这两个方向(生成式专用编码器、分段缓冲区)我先作为后续参考记下,不纳入当前 PR 与近2天工作 的范围。\r\n\r\n若实施的实施顺序应当为关于先做请求体所有权移交、再做 envelope 头部预留(都不改 wire format、收益最明确),之后根据真实流量再决定走非 IDL 融合还是专用编码器。并用真实 HTTP/2 请求验证多项指标,当前指标无法覆盖",
"createdAt": "2026-09-05T12:01:40Z",
"updatedAt": "2026-09-05T12:01:40Z",
"author": {
"login": "lizining1231"
}
}
]
},
{
"id": "DC_kwDOCJS8R84BGgiB",
"url": "https://github.com/apache/dubbo-go/discussions/3673#discussioncomment-18483329",
"body": "# 性能瓶颈分析报告(三)Triple 流式客户端写路径批缓冲专项\r\n\r\n## 目录\r\n\r\n一、摘要\r\n\r\n二、瓶颈代码定位\r\n\r\n三、多工具交叉验证瓶颈\r\n\r\n四、方案设计与演进\r\n\r\n五、方案验证与实施\r\n\r\n六、预估收益与方案边界\r\n\r\n七、测试构造情况说明\r\n\r\n八、参考链接\r\n\r\n## 一、摘要\r\n\r\nTriple 是 Dubbo-go 的默认协议层,其流式客户端(`CallBidiStream` / `CallClientStream`)支持\"一条流上连续发送多条消息\"的用法。这类用法的共性是:**消息条数多、连发节奏快**,单条消息则不一定大。\r\n\r\n而当前实现里,每次 `Send` 都直接把消息写进 `duplexHTTPCall` 底层的 `io.Pipe`:它是无缓冲的跨 goroutine 同步交接,写端必须等读端消费完才返回,因此**每发一条消息就要做两次同步握手(prefix 与 body 各一次)**。消息越多,握手次数越多,per-message 代价与消息条数成正比,在高吞吐连发时成为隐藏的固定开销,构成**小报文 × 高吞吐流式**场景下的潜在瓶颈。\r\n\r\n本文针对 Triple 流式客户端发送路径的**结构性开销**,验证瓶颈的确存在,确认**每条消息两次无缓冲同步交接、并落成两次独立 socket 写**是主因;在此基础上提出一个**默认关闭**的可选批缓冲 `streamBufferWriter`(32 KiB 水位)方案:把连续小消息聚合、按水位 / `CloseRequest` 冲刷,摊薄交接次数与 syscall 次数。方案以 `WithWriteBuffering()` option 显式开启,默认关闭。\r\n\r\n## 二、瓶颈代码定位\r\n\r\n前两期的优化都是从**相较 gRPC 的基准差距**出发反推瓶颈,本期路径不同:triple unary 落地后,unary 侧的固定开销已被吸收,剩余可优化范围收敛到**流式客户端**,而流式路径并没有现成的数据可供入手分析。因此本期先从静态源码入手、再设计测试验证瓶颈是否真实存在。\r\n\r\n### 2.1 流式 Send 的写路径没有聚合\r\n\r\n`CallBidiStream`([client.go L186-L195](https://github.com/apache/dubbo-go/blob/develop/protocol/triple/triple_protocol/client.go#L186-L195))是\"一条流上连续 `Send` N 条消息\"的流式用法。顺着源码往下读四个环节,就能看清一次 `Send` 到底做了什么。\r\n\r\n**第一,连接装配**:`grpcClient.NewConn` 建流式连接时,`streamWriter` 直接就是 `duplexHTTPCall`,协议层与管道之间没有任何缓冲层(默认配置下,[protocol\\_grpc.go L299-L325](https://github.com/apache/dubbo-go/blob/develop/protocol/triple/triple_protocol/protocol_grpc.go#L299-L325)):\r\n\r\n```go\r\ncall = newDuplexHTTPCall(ctx, g.HTTPClient, g.URL, spec, header)\r\nstreamWriter = call // 协议层的 writer 就是 duplexHTTPCall\r\n...\r\nconn := &grpcClientConn{\r\n call: call,\r\n marshaler: grpcMarshaler{\r\n envelopeWriter: envelopeWriter{\r\n writer: streamWriter, // envelope 的每次 Write 都直接下沉\r\n ...\r\n },\r\n },\r\n}\r\n```\r\n\r\n**第二,Send 入口**:`Send` 只做一件事,把消息交给 marshaler([protocol\\_grpc.go L370-L375](https://github.com/apache/dubbo-go/blob/develop/protocol/triple/triple_protocol/protocol_grpc.go#L370-L375)):\r\n\r\n```go\r\nfunc (cc *grpcClientConn) Send(msg any) error {\r\n if err := cc.marshaler.Marshal(msg); err != nil {\r\n return err\r\n }\r\n return nil\r\n}\r\n```\r\n\r\n**第三,协议层组帧**:marshaler 把消息编好之后,**一条消息要写两次**,先写 5 字节 prefix(flag + 消息长度),再用 `io.Copy` 写 body([envelope.go L147-L161](https://github.com/apache/dubbo-go/blob/develop/protocol/triple/triple_protocol/envelope.go#L147-L161)):\r\n\r\n```go\r\nfunc (w *envelopeWriter) write(env *envelope) *Error {\r\n prefix := [5]byte{}\r\n prefix[0] = env.Flags\r\n binary.BigEndian.PutUint32(prefix[1:5], uint32(env.Data.Len()))\r\n if _, err := w.writer.Write(prefix[:]); err != nil { // 第 1 次:prefix\r\n ...\r\n }\r\n if _, err := io.Copy(w.writer, env.Data); err != nil { // 第 2 次:body\r\n ...\r\n }\r\n return nil\r\n}\r\n```\r\n\r\n**第四,下沉写**:这两次 `Write` 落到 `duplexHTTPCall`,每次都是直写 `io.PipeWriter`,中间没有任何攒批逻辑([duplex\\_http\\_call.go L108-L126](https://github.com/apache/dubbo-go/blob/develop/protocol/triple/triple_protocol/duplex_http_call.go#L108-L126)):\r\n\r\n```go\r\nfunc (d *duplexHTTPCall) Write(data []byte) (int, error) {\r\n d.ensureRequestMade() // 首次调用时触发后台 makeRequest goroutine\r\n ...\r\n bytesWritten, err := d.requestBodyWriter.Write(data) // 直写 io.PipeWriter\r\n ...\r\n}\r\n```\r\n\r\n总结来看,四个环节各有开销,且都是每消息的开销。\r\n\r\n| 环节 | 代码行为 | 每消息开销 |\r\n| ---------------------- | ----------------------------------------------- | ----------------------- |\r\n| `Send(msg)` | `grpcClientConn.Send` → `grpcMarshaler.Marshal` | 1 次 marshal |\r\n| 协议层组帧 | `envelopeWriter.write` 写 prefix + body | **2 次下沉 `Write`** |\r\n| `duplexHTTPCall.Write` | 每次直写 `io.PipeWriter` | **2 次跨 goroutine 同步交接** |\r\n| 传输层落 socket | 每个 DATA 帧立即 flush(3.3 实测) | **2 次 `write(2)`** |\r\n\r\n**初步结论**:这段调用链里没有任何聚合点,一个 `Send` 的固定成本结构是明确的,1 次 marshal、2 次下沉写、2 次同步交接、2 次 socket 写,而后三项只与**消息条数**有关,与消息内容、报文大小都无关。所以可以大致判断:在小报文 × 高吞吐流式这类条数多、单条小、连发快的场景里,每条消息都要摊一次这段固定开销,写路径可能存在瓶颈。这个判断来自静态读码,是否真的构成瓶颈、开销落在哪一层,还需要在真实链路上实测确认。\r\n\r\n### 2.2 从 Send 到 socket 的完整时序\r\n\r\n把 2.1 的四段代码摊平成一条流水线(每一步都对应上面引用的源码)。一次 `Send` 会拆成 prefix 与 body 两次 `Write`,**两次都是串行的:① 一路执行(含落 socket)之后才轮到 ②**,而这两条路径的形状完全一样。`wrCh` / `rdCh` 是 `io.Pipe` 内部的两个 channel:\r\n\r\n```mermaid\r\nflowchart LR\r\n S[\"Send(msg)
marshal 得到 body\"] --> A[\"① prefix
5 B\"]\r\n A --> A1[\"duplexHTTPCall.Write
直写 io.PipeWriter,写端阻塞\"]\r\n A1 --> A2[\"writeRequestBody 取走这一段
立即 Flush\"]\r\n A2 --> A3[\"socket write(2)\"]\r\n A3 --> B[\"② body
N B
(① 落完 socket 才轮到)\"]\r\n B --> B1[\"duplexHTTPCall.Write
直写 io.PipeWriter,写端阻塞\"]\r\n B1 --> B2[\"writeRequestBody 取走这一段
立即 Flush\"]\r\n B2 --> B3[\"socket write(2)\"]\r\n```\r\n\r\n图上可以看出:**一条消息要走两次完整的管道交接、落成两次 socket 写**,而且这两次是串行的,没有任何合并的机会。把这条流水线拆开,一次 `Send` 会在 ① ② 两条路径上各完整走一遍下面六步(下面以默认的 gRPC wire 为例,它有 5 字节 prefix;Triple 编码没有 prefix,只走 ② 那一条):\r\n\r\n1. **序列化**:`Send` 调 `grpcMarshaler.Marshal` 把消息编成 `envelope`(body),拿到待写的字节,此刻还没有碰到管道;\r\n2. **组帧**:`envelopeWriter.write` 用同一个 `writer` 发起第一次 `Write`,写 5 字节 prefix(flag + 大端长度);\r\n3. **下沉到调用对象**:这次 `Write` 落到 `duplexHTTPCall.Write`,它先 `ensureRequestMade()` 拉起后台 `makeRequest` goroutine(首次调用时),校验 ctx 未取消,再用 `d.requestBodyWriter` 写数据,而这个 `requestBodyWriter` 就是 `io.PipeWriter`;\r\n4. **写端 park(第一个阻塞点)**:`io.Pipe` 不做缓冲,写端把这段切片交给读端后,立刻等读端回传已取走的字节数,写端在这两处 channel 操作上阻塞,直到读端出现;\r\n5. **读端取走并落 socket**:读端不是业务代码,是 `net/http` 从 `http.Request.Body` 读数据的 `writeRequestBody`。它把这段拷进自己的缓冲区、回传字节数,再按 HTTP/2 帧编码,每个 DATA 帧立即 `Flush`,最终经 `net.Conn.Write` 落成 `write(2)`;\r\n6. **写端返回,发起第二次 `Write`**:第 4 步返回之后 `duplexHTTPCall.Write` 才返回,`envelopeWriter.write` 随即用 `io.Copy` 写 body,把第 3 到第 5 步整个重做一遍。\r\n\r\n- 写端 park 的那段时间是记在调度器头上的:pprof 采样会落在 `runtime.selectgo` 而不是 `io.(*pipe).write`;\r\n- 传输层对每个 DATA 帧立即 flush,所以一次管道交接最终对应一次 `write(2)`,实测约 2.10 次/消息。\r\n\r\n`io.Pipe` 的写入不是把数据拷进缓冲区就返回,而是**与读端做一次同步交接**。标准库的实现只有两个 channel:`wrCh`(传递数据切片)与 `rdCh`(回传已取走的字节数),写之前还要取 `wrMu` 把同一个管道上的 `Write` 串行化([pipe.go L76-L96](file:///home/lizining/go-sdk/go/src/io/pipe.go#L76-L96)):\r\n\r\n```go\r\nfunc (p *pipe) write(b []byte) (n int, err error) {\r\n select {\r\n case <-p.done:\r\n return 0, p.writeCloseError()\r\n default:\r\n p.wrMu.Lock() // 串行化同一管道上的写\r\n defer p.wrMu.Unlock()\r\n }\r\n for once := true; once || len(b) > 0; once = false {\r\n select {\r\n case p.wrCh <- b: // ① 把这段数据交给读端,写端在此阻塞\r\n nw := <-p.rdCh // ② 等读端回传已取走的字节数,写端再次阻塞\r\n b = b[nw:]\r\n n += nw\r\n case <-p.done:\r\n return n, p.writeCloseError()\r\n }\r\n }\r\n return n, nil\r\n}\r\n```\r\n\r\n读端与之对应:从 `wrCh` 取值、`copy` 进自己的缓冲区、再把实际取走的字节数发到 `rdCh`([pipe.go L50-L65](file:///home/lizining/go-sdk/go/src/io/pipe.go#L50-L65))。由此有两点结论:\r\n\r\n- 一次 `Write` 至少要**两次跨 goroutine 唤醒**(读端一次、写端一次),读写两端交替推进,写端必须等读端把这段取走才能返回;\r\n- 交接以**切片**为单位:读端缓冲区一次装不下时,写端会在循环里把剩余部分再交接一次(`b = b[nw:]`)。真实链路的读端是 http2 的 `writeRequestBody`,它用约 16 KiB 的 scratch buffer 读取,因此 5 字节 prefix 与 128 B body 都是整段一次交接完。\r\n\r\n这条链路上的读端不是业务代码,而是 `net/http`:`newDuplexHTTPCall` 把 `io.Pipe` 的读端直接挂在 `http.Request.Body` 上([duplex\\_http\\_call.go L76-L94](https://github.com/apache/dubbo-go/blob/develop/protocol/triple/triple_protocol/duplex_http_call.go#L76-L94)),由 h2c 传输层按需读取、交给 HTTP/2 帧编码器。所以每次 `Send` 都要等传输层把这一段读走才能返回,**同步交接次数随消息条数线性增长**。\r\n\r\n### 2.3 对瓶颈的预期\r\n\r\n读源码只能说明代码长这样,还不能说明它一定构成瓶颈。把 2.1、2.2 的代码结论翻译成能在真实链路上检验的预期瓶颈,就是下面内容,测试也是参考它们设计的。\r\n\r\n1. **管道不做合并**:`io.Pipe` 的职责只是把这一段数据交给读端,它不攒批,所以写一次就是交接一次。这一条已由 2.2 的源码坐实;\r\n2. **每条消息写两次 socket**:协议层把一条消息拆成 prefix 与 body 两次 `Write`,传输层对每个 DATA 帧又立即 flush,因此 `write(2)` 的次数应当跟着**消息条数**走,而不是跟着**字节数**走。如果写路径中间存在攒批,写次数就会与消息条数脱钩、远少于消息条数;\r\n\r\n## 三、多工具交叉验证瓶颈\r\n\r\n### 3.1 端到端压测:现状吞吐与延迟表现\r\n\r\n客户端以单**流连发 N 条消息 → `CloseRequest` → 收全 N 条响应**为一个操作单元计一次 QPS;表中的**消息吞吐 = QPS × 每流连发条数**,由两者换算得到,衡量单位时间内真正处理的消息条数。\r\n\r\n**矩阵**:5 种报文(128 B / 256 B / 512 B / 1 KiB / 4 KiB)× 3 档并发(32 / 64 / 128)× 2 档连发(128 / 512)= 30 组数据,覆盖多种参数区间。\r\n#### (1)连发 128 条 × 5 报文 × 3 并发\r\n\r\n**128 bytes**\r\n\r\n| Concurrency | QPS (流/s) | 消息吞吐 (msgs/s) | P99 (ms) |\r\n| ----------- | --------: | ------------: | -------: |\r\n| 32 | 200.6 | 25 677 | 222.59 |\r\n| 64 | 185.8 | 23 782 | 511.83 |\r\n| 128 | 165.7 | 21 210 | 1125.09 |\r\n\r\n**256 bytes**\r\n\r\n| Concurrency | QPS (流/s) | 消息吞吐 (msgs/s) | P99 (ms) |\r\n| ----------- | --------: | ------------: | -------: |\r\n| 32 | 186.8 | 23 910 | 259.65 |\r\n| 64 | 143.8 | 18 406 | 716.16 |\r\n| 128 | 139.8 | 17 894 | 1382.00 |\r\n\r\n**512 bytes**\r\n\r\n| Concurrency | QPS (流/s) | 消息吞吐 (msgs/s) | P99 (ms) |\r\n| ----------- | --------: | ------------: | -------: |\r\n| 32 | 138.9 | 17 779 | 324.66 |\r\n| 64 | 127.6 | 16 333 | 804.96 |\r\n| 128 | 124.0 | 15 872 | 1598.27 |\r\n\r\n**1024 bytes**\r\n\r\n| Concurrency | QPS (流/s) | 消息吞吐 (msgs/s) | P99 (ms) |\r\n| ----------- | --------: | ------------: | -------: |\r\n| 32 | 102.9 | 13 171 | 433.95 |\r\n| 64 | 99.8 | 12 774 | 937.74 |\r\n| 128 | 94.5 | 12 096 | 1911.53 |\r\n\r\n**4 KiB**\r\n\r\n| Concurrency | QPS (流/s) | 消息吞吐 (msgs/s) | P99 (ms) |\r\n| ----------- | --------: | ------------: | -------: |\r\n| 32 | 63.3 | 8 102 | 660.56 |\r\n| 64 | 58.6 | 7 501 | 1383.48 |\r\n| 128 | 57.9 | 7 411 | 2858.83 |\r\n\r\n#### (2)连发 512 条 × 5 报文 × 3 并发\r\n\r\n**128 bytes**\r\n\r\n| Concurrency | QPS (流/s) | 消息吞吐 (msgs/s) | P99 (ms) |\r\n| ----------- | --------: | ------------: | -------: |\r\n| 32 | 46.3 | 23 711 | 954.48 |\r\n| 64 | 44.1 | 22 564 | 1949.47 |\r\n| 128 | 41.9 | 21 432 | 4150.53 |\r\n\r\n**256 bytes**\r\n\r\n| Concurrency | QPS (流/s) | 消息吞吐 (msgs/s) | P99 (ms) |\r\n| ----------- | --------: | ------------: | -------: |\r\n| 32 | 41.7 | 21 345 | 1066.70 |\r\n| 64 | 39.2 | 20 076 | 2249.60 |\r\n| 128 | 38.6 | 19 758 | 4523.50 |\r\n\r\n**512 bytes**\r\n\r\n| Concurrency | QPS (流/s) | 消息吞吐 (msgs/s) | P99 (ms) |\r\n| ----------- | --------: | ------------: | -------: |\r\n| 32 | 35.4 | 18 125 | 1213.60 |\r\n| 64 | 35.1 | 17 971 | 2488.90 |\r\n| 128 | 34.1 | 17 459 | 5158.20 |\r\n\r\n**1024 bytes**\r\n\r\n| Concurrency | QPS (流/s) | 消息吞吐 (msgs/s) | P99 (ms) |\r\n| ----------- | --------: | ------------: | -------: |\r\n| 32 | 28.0 | 14 336 | 1447.00 |\r\n| 64 | 23.8 | 12 186 | 3341.80 |\r\n| 128 | 25.8 | 13 210 | 6054.30 |\r\n\r\n**4 KiB**\r\n\r\n| Concurrency | QPS (流/s) | 消息吞吐 (msgs/s) | P99 (ms) |\r\n| ----------- | --------: | ------------: | -------: |\r\n| 32 | 16.4 | 8 417 | 2286.95 |\r\n| 64 | 18.4 | 9 441 | 4275.64 |\r\n| 128 | 15.3 | 7 859 | 9969.09 |\r\n\r\n#### 三个显著特征\r\n\r\n**特征一:并发提高 → QPS 不增反降(系统近饱和)**\r\n\r\n以 128 B / 连发 128 为例,并发从 32 提到 128(4×),QPS 反而从 200.6 降到 165.7,消息吞吐从 25 677 降到 21 210 msgs/s;4 KiB / 连发 512 同样如此(16.4 → 15.3 流/s)。新增并发没有带来等比收益,反而因为每条流都在做同样的同步交接、争抢同一份写路径资源,单流效率随之下降,这说明现状已经处在某种饱和状态。\r\n\r\n**特征二:消息吞吐随报文增大单调下降**\r\n\r\n并发 32 下,连发 128 条的消息吞吐从 25 677(128 B)降到 8 102(4 KiB),下降约 3.2×。但把它换算成字节吞吐,128 B 约 3.3 MB/s,4 KiB 约 33 MB/s,**反而涨了约 10 倍**。若瓶颈是搬运字节的带宽,字节吞吐应当先封顶,而它随报文增大一路上升,说明真正被放大的是**每条消息摊到的固定成本**:小消息每字节分摊的固定开销高、大消息分摊低,于是消息吞吐随报文增大单调下降。\r\n\r\n**特征三:增加连发条数 → 消息吞吐不再增长**\r\n\r\n把每流连发条数从 128 提到 512(4×),各组合的**消息吞吐基本持平**:128 B / c32 从 25 677 微降到 23 711 msgs/s(-7.7 %),512 B / c64 从 16 333 升到 17 971 msgs/s(+10.0 %),4 KiB / c64 从 7 501 升到 9 441 msgs/s。多连发 4 倍的消息,单位时间能处理的消息数并没有变多,**吞吐上限由每条消息的固定开销决定,与流内连发多少条无关**。\r\n\r\n延迟侧的表现更直接:128 B / c32 下单流 P99 从 223 ms 涨到 954 ms(4.3×),与连发条数 4× 几乎等比。若写路径存在聚合,512 条消息的写次数应被摊薄到远小于 4×,单流耗时不会线性放大。\r\n\r\n这三个特征互相印证现状写路径存在的瓶颈:每条消息都要走两次独立的同步交接,吞吐上限由**固定开销**决定而不是由并发或连发条数决定。下文用 CPU profile 与 strace 计数进一步确认这笔开销的来源。\r\n\r\n### 3.2 客户端 CPU profile 与 block profile\r\n\r\n客户端 `stream_ab` 以 128 B 报文、每流连发 128 条、并发 32 持续压测(未开启任何写缓冲),同时通过 `net/http/pprof` 抓取客户端进程的 CPU profile:\r\n\r\n
\r\n\r\n**解读**:\r\n\r\n- **写路径链路**:`http2.(*clientStream).writeRequestBody` cum 20.31 %,其下 `bufio.(*Writer).Flush` cum 14.50 % → `http2.writeWithByteTimeout` cum 13.69 % → `net.(*conn).Write` cum 13.29 %,最终落到 `internal/runtime/syscall.Syscall6`(该函数为全进程 flat 23.27 %,同时承担读侧 syscall)。整条栈就是把一段数据写进 socket 这一件事,中间没有任何应用层逻辑;\r\n- **并列的宽条**是 `internal/runtime/syscall.Syscall6`(flat 23.27 %)与 `runtime.futex`(flat 17.76 %),合计 **41.03 %**:前者是进内核写 socket,后者是 goroutine 的唤醒与调度,火焰图右侧 `runtime.mcall → park_m → schedule → findRunnable → stealWork` 这条栈清晰可见;\r\n- **确实存在管道交接**:`io.(*pipe).read → runtime.selectgo` 这条栈对应传输层从管道取数据的那一侧,说明写路径确实是写端写管道 → 读端取走 → 落 socket 一段一段推进的;\r\n- **编解码很小不是主要成本**:收侧 `grpcUnmarshaler.Unmarshal` cum 20.31 %,写侧 `envelopeWriter.Marshal` 的占比远小于它下面的 syscall 部分。\r\n\r\n**但是这里不能只看 CPU profile**,CPU profile 只统计 on-CPU 时间,`io.Pipe` 交接里的等待属于 off-CPU,火焰图上天然看不到。\r\n\r\nblock profile\r\n
\r\n\r\n**占比最高的三个帧都不是业务帧,而是三个等待**:`runtime.selectgo` **62.90 %**、`runtime.chanrecv1` **21.57 %**、`sync.(*Cond).Wait` **15.30 %**,三者合计 **99.77 %**;而写路径自身的帧 `io.(*pipe).write` 只有 **0.51 %**(8.24 s),它的读端 `io.(*pipe).read` 只有 **0.06 %**(0.98 s)。它排除了别的优化方向,\r\n\r\n- 如果这里测出的是**计算占满**(编解码、拷贝在吃时间),方案应偏向于优化 codec、减少拷贝;\r\n- 实测是**等待占满**(99.77 %),说明这条路径的耗时形态是等待形态而不是计算形态,不是在编解码上算不过来,而是一条消息一次往返地等过来。方案方向因此定为**只能改交接结构,把次数降下来**。\r\n指令\r\n```bash\r\n# 轮 1:采 CPU\r\nstream-ab -payload 128 -msgs 128 -concurrency 32 -warmup 10s -duration 120s -pprof 127.0.0.1:6060\r\ncurl -s -o cpu.prof \"http://127.0.0.1:6060/debug/pprof/profile?seconds=20\"\r\n\r\n# 轮 2:同参数单独一轮采 block\r\nstream-ab -payload 128 -msgs 128 -concurrency 32 -warmup 10s -duration 120s \\\r\n -pprof 127.0.0.1:6060 -blockrate 1\r\ncurl -s -o block_t0.prof \"http://127.0.0.1:6060/debug/pprof/block\"\r\nsleep 20\r\ncurl -s -o block_t1.prof \"http://127.0.0.1:6060/debug/pprof/block\"\r\n\r\n# 差分出与 CPU 同窗口的 block profile\r\ngo tool pprof -proto -base block_t0.prof -output block_window.prof block_t1.prof\r\ngo tool pprof -http=:8081 -sample_index=delay block_window.prof\r\n```\r\n\r\n### 3.3 strace write 计数\r\n\r\n**采集命令**(真实链路,单并发以便用成功流数 × 每流条数反推出确定的消息总数):\r\n\r\n```bash\r\nstrace -c -f -e trace=write -o strace.txt \\\r\n stream-ab -payload 128 -msgs 128 -concurrency 1 -duration 5s -warmup 0s\r\n```\r\n\r\n> 其中 `-f` 不可省略:Go 会把 goroutine 调度到多个线程上,不跟随线程会漏掉大部分写\r\n\r\n**采集结果**:客户端报告 `Success = 54` 条流,即共发送 **6912 条** 128 B 消息;strace 统计 `write` 调用 **14516 次**:\r\n\r\n```\r\n% time seconds usecs/call calls errors syscall\r\n------ ----------- ----------- --------- --------- ----------------\r\n100.00 1.694243 116 14516 write\r\n```\r\n\r\n**折算:2.10 次 `write(2)` / 消息**(14516 ÷ 6912)。这个数字与源码是相符的:\r\n\r\n| 环节 | 代码依据 | 每条消息代价 |\r\n| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- |\r\n| 协议层组帧 | `envelopeWriter.write` 先写 5 字节 prefix(flag + 长度),再用 `io.Copy` 写 body([envelope.go L147-L161](https://github.com/apache/dubbo-go/blob/develop/protocol/triple/triple_protocol/envelope.go#L147-L161)) | **2 次 `Write` 进管道** |\r\n| 传输层落 socket | x/net/http2 `writeRequestBody` 对每个 DATA 帧都立即 `cc.bw.Flush()`(注释原文 “TODO(bradfitz): this flush is for latency, not bandwidth”),每次 Write 对应一次真实 `write(2)`(`golang.org/x/net@v0.58.0/http2/transport.go` L1566-L1576) | **2 次 `write(2)`** |\r\n\r\n实测 2.10 略高于 2,多出的约 0.1 次/消息来自 HEADERS、WINDOW\\_UPDATE 等控制帧(54 条流合计 692 次)。\r\n\r\n**解读**:\r\n\r\n- **次数**:`write` 调用数与消息条数成正比(2.10 次/条),而不是 1/256 次/条。若写路径存在 32 KiB 级别的聚合,128 B 消息要攒 256 条才满一个水位,同样的消息量只需约 **1/256** 的 `write(2)`,**差两个数量级**,说明每条消息各自触发两次独立写,没有任何合并;\r\n- **耗时需谨慎推理**:`usecs/call = 116 µs` 是在 ptrace 跟踪下测得的,每次 syscall 进入 / 退出都要与 tracer 交互,绝对值被明显放大。它只能用来说明**每条消息都要完整走一遍 syscall 路径**,不能当作真实业务耗时。\r\n\r\n### 3.4 交叉验证小结\r\n\r\n- **端到端压测**给出外部表现:并发提高不能提高吞吐(特征一)、报文越大吞吐越低(特征二)、连发条数涨 4 倍吞吐也不涨(特征三),三条都指向**吞吐上限由每条消息的固定开销决定**;\r\n- **CPU profile**体现了时间去向:`http2.(*clientStream).writeRequestBody` cum 20.31 %;`internal/runtime/syscall.Syscall6` flat 23.27 % 与 `runtime.futex` flat 17.76 % 合计 **41.03 %**,代价集中在**进内核写 socket**与**goroutine 唤醒调度**,而不是应用逻辑;\r\n- **strace 计数**给出次数:2.10 次 `write(2)`/消息,与 prefix + body 两次 `Write`、每个 DATA 帧立即 flush 的代码路径逐层对应,与 32 KiB 聚合应有的量级差两个数量级;\r\n- **block profile** 给出阻塞构成:同一个 20 s 窗口的差分口径下,流式调用的阻塞时间 **99.77 %** 落在三个等待原语上(`runtime.selectgo` 62.90 %、`runtime.chanrecv1` 21.57 %、`sync.(*Cond).Wait` 15.30 %),几乎没有 on-CPU 的计算;而一次 `Write` 对应读端一段、管道不做合并这一交接语义直接来自标准库源码([pipe.go L76-L96](file:///home/lizining/go-sdk/go/src/io/pipe.go#L76-L96)),不需要额外的合成路径实验来佐证。该占比会因写端先 park 还是读端先 park 在不同窗口之间互补翻转(实测 `io.(*pipe).write` 0.51 % \\~ 5.89 %),**故仅作定性参考,不作为瓶颈的定量证据**。\r\n\r\n把这四者串起来,瓶颈是**结构性**的:流式客户端写路径上,每条消息都要做两次无缓冲的跨 goroutine 同步交接,并因此落成两次独立的 socket 写,且没有任何聚合机制来摊薄它。这也决定了后续方案的形状,在不改变 on-wire 语义的前提下,把多次小写聚合成一次大写。\r\n\r\n## 四、方案设计与演进\r\n\r\n### 4.1 问题定位\r\n\r\n瓶颈锁定在流式客户端每次 `Send` 的 `io.Pipe` 同步握手(per-message 代价 ∝ 消息数),无任何聚合。\r\n\r\n### 4.2 设计目标\r\n\r\n- **默认零影响**:`WithWriteBuffering()` 默认关闭,未开启时 `writeBuffer=nil`、`marshaler.writer=call`,与现状**逐字节等价**;\r\n- **语义不变**:On-wire 帧格式不变(默认 gRPC 编码仍是 flag + 长度的 5 字节 prefix,Triple 编码仍是裸 body),只是把多次小 `Write` 合并成一次大 `Write`;不改公开接口签名、不改 `Codec` 接口、无 on-wire 格式变更。需要说清的是**帧格式不变不等于到达时序不变**:批边界会改变对端开始消费这条流的数据的时刻(小流甚至要等到 `CloseRequest` 才发出第一个字节),这是本方案主动付出的代价之一;\r\n- **不丢消息**:`CloseRequest` 必须刷尽剩余缓冲,尾包完整送达(并发契约守护);\r\n- **opt-in 哲学对齐行业**:gRPC-Go / Kitex 均为可关闭的写缓冲开关。\r\n\r\n### 4.3 并发相关的边界条件\r\n\r\n`StreamingClientConn` 接口契约要求 `Send` / `RequestHeader` / `CloseRequest` **可互相并发**,因此聚合层的关闭语义必须与关闭动作在同一临界区内封口。如果把 `CloseRequest` 写成先 `Flush()` 再 `CloseWrite()`(两次独立加锁),就会出现**静默丢消息**窗口:一个 `Send` 已被接收、数据还留在缓冲里,紧接着 `CloseWrite` 关闭管道 → 消息凭空消失;而在无缓冲的现状下,那个并发 `Send` 会拿到 `io.ErrClosedPipe` **报错**。聚合层不能把报错变成静默丢失。\r\n\r\n设计约束由此确定:`Close()` 在**同一临界区**内完成刷尽 + 置 closed,封口之后的 `Write` 返回 `io.ErrClosedPipe`(错误类型与现状逐字一致);`CloseRequest` 无论 flush 成败都执行 `CloseWrite`,错误取第一个非 nil。\r\n\r\n对应的守护手段:\r\n\r\n- **不变量断言**:到达底层的字节数 == 被接收的 `Write` 数 × 消息长度(`TestStreamBufferWriterCloseNeverDropsRacingWrite`,200 轮竞争);\r\n- **反向验证**:临时去掉封口(注释掉 `w.closed = true`),该守护测试在 attempt 0 立即失败,证明断言真的生效而不是恒真。\r\n\r\n### 4.4 已排查候选与备选方案对比\r\n\r\n在把落点收敛到流式客户端每 `Send` 两次同步交接之前,先排查了两个相邻候选:unary 的 prefix 与 body 分离写入已被上一期的 `unaryFastPathCall` 吸收成整块 body,没有剩余价值;`net.Buffers` / writev 合并 prefix 与 body 这条路的排除理由有两点,**都不是\"Triple 编码没有 prefix\"**:其一,**插入点的下游是 `duplexHTTPCall`,它把字节直写 `io.PipeWriter`**,而 `io.PipeWriter` 既不是 `*net.TCPConn` 也不实现 `io.ReaderFrom`,于是 writev 退化为两次顺序 `Write`,**交接次数一次未省**,还要额外付出一次 O(payload) 的拼接拷贝;其二,**真正的 socket 写发生在 x/net/http2 内部**,http2 本身就用帧缓冲把 prefix 与 body 拼进同一帧一并写出。至于 Triple 编码没有 prefix,那属于**范围说明**:这条路对它连\"要合并的两段\"都不存在,但它不是排除 gRPC 编码下该候选的理由。两者均不作为方案,落点收敛到流式客户端。在此基础上,对缓冲载体与触发策略做选型:\r\n\r\n| 候选 | 说明 | 结论 |\r\n| ------------------------------------ | -------------------------------------------------------- | ----------------------- |\r\n| 直接用内部 `bytes.Buffer`(构造时预分配 cap 32 KiB) | 单一流生命周期内反复复用,无归还协议 | **采用**(最小、无泄漏风险) |\r\n| 复用 `bufferPool.Get()` 但不归还 | 等同普通分配,Pool 无意义 | 放弃 |\r\n| 下沉 unary fast path 攒到 CloseWrite 才发 | 流式若攒到关闭才发,对端在流关闭前收不到数据,**破坏流式语义** | 放弃;改为按水位渐进 flush |\r\n| `net.Buffers`/writev 合并 prefix+body | 插入点下游是 `io.PipeWriter`(不是 TCPConn),writev 退化为两次顺序 Write,交接次数一次未省;且 http2 已在帧内完成 prefix 与 body 的合并 | 放弃 |\r\n\r\n## 五、方案验证与实施\r\n\r\n### 5.1 改动点清单\r\n\r\n| 文件 | 改动 |\r\n| ----------------------------------------- | ---------------------------------------------------------------------- |\r\n| `buffered_writer.go` | 新增 `streamBufferWriter`(水位 flush + `Close()` 原子封口) |\r\n| `option.go` | 新增 `WithWriteBuffering()` ClientOption(默认关) |\r\n| `protocol.go` / `client.go` | 透传 `WriteBuffering` |\r\n| `protocol_grpc.go` / `protocol_triple.go` | 流式分支装配批缓冲 + `CloseRequest` 封口刷尽且必定 `CloseWrite` |\r\n| 测试 / 基准 | `buffered_writer_test.go`、`buffered_write_bench_test.go` |\r\n| 压测工具 | `tools/benchmark/stream_ab`(流式压测客户端)、`tools/benchmark/server/dubbo-go` |\r\n\r\n### 5.2 现有测试未覆盖的边界场景\r\n\r\n聚合层插在协议层与 `io.Pipe` 之间,它接管的就不只是把字节送出去这一件事,还有原路径上由 `io.Pipe` 隐式兜住的一批边界。本节按边界类型归成五类,只列**现有测试覆盖不到**的场景,每一条回答三个问题:**边界条件是什么、覆盖不到会发生什么、正确行为应该是什么**。\r\n\r\n> 体例说明:已经写出测试的场景不在此列,包括聚合语义、水位触发、超大消息直写、封口后返回 `io.ErrClosedPipe`、`Close` 幂等、空缓冲 flush 不下沉、`Send` 与 `CloseRequest` 竞态不丢包、`Flush` 与 `Write` 并发、两条 wire 的装配与 unary fast path 不缓冲、端到端尾包不丢,这些由 `buffered_writer_test.go` 的 10 个测试守住。本节共 13 条缺口,逐条的测试规划见 5.3。\r\n\r\n#### 5.2.1 错误路径(5 条)\r\n\r\n流是一次性资源,写失败之后这条流就废了,所以错误路径的核心要求只有两条:失败必须**可见**(不能吞成 nil),失败之后必须**可复现**(不能时好时坏)。现有测试只覆盖了「`Write` 撞上粘滞错误」这一种组合,其余出口都还是缺口。\r\n\r\n- **首错冻结之后的另外两个出口**([buffered\\_writer.go L101-L102](file:///home/lizining/projects/dubbo-go/protocol/triple/triple_protocol/buffered_writer.go#L101-L102)、[L121-L122](file:///home/lizining/projects/dubbo-go/protocol/triple/triple_protocol/buffered_writer.go#L121-L122)):`TestStreamBufferWriterWriteAfterError` 只断言了后续 `Write` 返回粘滞错误,没有断言 `Flush` 与 `Close` 也返回同一个错误。覆盖不到的话,「首错即冻结」只算半句话,`Close` 仍可能把已经失败的流当成功收尾。正确行为是 `err != nil` 时 `Write` / `Flush` / `Close` 三个出口一致返回同一个错误。*待补:`TestStreamBufferWriterStickyErrorOnEveryExit`*\r\n- **水位 flush 失败,但本次字节已入缓冲**([L88-L92](file:///home/lizining/projects/dubbo-go/protocol/triple/triple_protocol/buffered_writer.go#L88-L92)):返回 `(len(p), nil)` 会让调用者以为这条消息发出去了、而且流还健康。正确行为是返回 `(len(p), w.err)`,字节数照实报(已被接受),错误照实报(后续不可用)。*待补:`TestStreamBufferWriterWriteReportsFlushFailure`*\r\n- **超标消息直写失败**([L81-L87](file:///home/lizining/projects/dubbo-go/protocol/triple/triple_protocol/buffered_writer.go#L81-L87)):吞掉错误返回成功,调用者会以为这条大消息已经出去了。正确行为是透传底层的 `(n, err)`,不做任何包装或改写。*待补:`TestStreamBufferWriterLargeMessageErrorPropagates`*\r\n- **`Close` 时最后一次 flush 失败**([L117-L130](file:///home/lizining/projects/dubbo-go/protocol/triple/triple_protocol/buffered_writer.go#L117-L130)):把失败吞成 nil,调用者会认为尾包已送达。正确行为是返回该错误,同时仍置 `closed`,不重复尝试。*待补:`TestStreamBufferWriterCloseFlushFailureReturnsError`*\r\n- **`CloseRequest` 中 flush 失败**([protocol\\_grpc.go L381-L397](file:///home/lizining/projects/dubbo-go/protocol/triple/triple_protocol/protocol_grpc.go#L381-L397)):这里有两种坏法,只返回错误而跳过 `CloseWrite`,会让对端读完请求后一直等写端关闭直到超时;两个错误都非 nil 时返回后一个,则掩盖了先发生的那次失败。正确行为是无论 flush 成败都执行 `CloseWrite`,两个错误取第一个非 nil(flush 优先)。*待补:`TestCloseRequestClosesWriteSideAfterFlushFailure`*\r\n\r\n#### 5.2.2 并发与竞态(2 条)\r\n\r\n`StreamingClientConn` 的接口契约要求 `Send` / `RequestHeader` / `CloseRequest` 三者**可互相并发**([triple.go L125-L126](file:///home/lizining/projects/dubbo-go/protocol/triple/triple_protocol/triple.go#L125-L126)),这是 4.3 已经展开过的核心约束,此处只列还没有覆盖的两组组合。\r\n\r\n- **`Close` 与 `Flush` 并发**([L97-L130](file:///home/lizining/projects/dubbo-go/protocol/triple/triple_protocol/buffered_writer.go#L97-L130)):同一批数据会被发两次(`Flush` 在 `Close` 的尾刷之后又刷一次,或反之)。现有 `TestStreamBufferWriterConcurrent` 只并发跑了 `Write` 与 `Flush`,没有 `Close` 参与的组合。正确行为是 `closed` 判定在锁内,谁先拿到锁谁做,后到的直接返回。*待补:`TestStreamBufferWriterConcurrentCloseAndFlush`*\r\n- **并发写下的缓冲上界**([L88-L92](file:///home/lizining/projects/dubbo-go/protocol/triple/triple_protocol/buffered_writer.go#L88-L92)):多个 `Send` 并发时,缓冲是否仍以 `limit` 为界、不会无界增长。现有并发测试只断言了字节总量守恒,没有断言途中任意时刻 `buf.Len() < limit`。*待补:`TestStreamBufferWriterConcurrentBufferBound`*\r\n\r\n#### 5.2.3 顺序与语义等价(2 条)\r\n\r\n聚合层最大的风险不是丢数据,而是**改动次序**或者**少送一段字节**:这两类问题在下游看来都像偶发的奇怪故障,最难查。\r\n\r\n- **缓冲里已有小消息,紧接着来一条 ≥ 32 KiB 的大消息**([L81-L87](file:///home/lizining/projects/dubbo-go/protocol/triple/triple_protocol/buffered_writer.go#L81-L87)):大消息直写会**插队**,小消息还留在缓冲里,大消息先落了 wire,同一条流上的消息次序被打乱,接收端解出的序列与发送端不一致。现有 `TestStreamBufferWriterLargeMessageWritesDirectly` 只测了直写次数与字节数,没有「先小后大」的次序断言。正确行为是直写之前必须先把缓冲刷出去,保序责任留在聚合层内部,不要求调用者按大小排序。*待补:`TestStreamBufferWriterLargeMessageFlushesPendingFirst`*\r\n- **下游短写未被处理**([L136](file:///home/lizining/projects/dubbo-go/protocol/triple/triple_protocol/buffered_writer.go#L136-L136)):`flushLocked` 只判 `err`,不看 `n < len(p)`;若下游返回「写了部分字节且 err == nil」,紧接着的 `buf.Reset()` 会把没写出去的部分丢掉,调用者完全无感。正确行为是核对 `n == buf.Len()`,短写按错误处理并冻结。*待补:`TestStreamBufferWriterShortWriteIsFailure`*\r\n\r\n#### 5.2.4 幂等与重复调用(2 条)\r\n\r\n`CloseRequest` 可能被上层在不同路径上重复触发(正常收尾、错误清理、`defer`),所以第二次调用必须明确是无事发生而不是又来一次。现有测试覆盖了「`Close` 连续两次」这一组,异常状态下的重复调用还没有覆盖。\r\n\r\n- **`Close` 失败之后再次 `Close`**([L121-L123](file:///home/lizining/projects/dubbo-go/protocol/triple/triple_protocol/buffered_writer.go#L121-L123)):返回 nil 会让调用者误以为这次关闭成功了。正确行为是在 `closed` 判定之前先判 `err`,返回粘滞错误。*待补:`TestStreamBufferWriterCloseAfterCloseFailure`*\r\n- **`Close` 之后再 `Flush`**([L104-L106](file:///home/lizining/projects/dubbo-go/protocol/triple/triple_protocol/buffered_writer.go#L104-L106)):报 `io.ErrClosedPipe` 会把一次正常收尾判成错误。正确行为是在关闭时 flush 成功的前提下返回 nil,数据已刷尽,无事可做,也不该报错;若 flush 已经失败,则返回粘滞错误而不是 nil。*待补:`TestStreamBufferWriterFlushAfterClose`*\r\n\r\n#### 5.2.5 生命周期与装配(2 条)\r\n\r\n这一类的边界不在聚合层内部,而在它有没有被正确接上去、以及接上去之后默认路径有没有漂移。现有装配测试覆盖了 streaming 与 unary fast path 两格,剩下两格是缺口。\r\n\r\n- **unary 但未走 fast path**(unary fast path 的编排条件 [protocol\\_grpc.go L286](file:///home/lizining/projects/dubbo-go/protocol/triple/triple_protocol/protocol_grpc.go#L286-L307) 不成立):也会被套上缓冲。unary 只有一条消息,聚合最多省 1 次交接(Triple 编码只有一次 body 写;gRPC wire 才有 prefix 与 body 两次写),代价是一次额外拷贝加上首包推迟到 `CloseRequest`。现有测试覆盖的是 unary + fast path(不缓冲)与 streaming(缓冲)两格,unary + 非 fast path 这一格没有断言。*待补:`TestWriteBufferingCoversUnaryNonFastPath`*\r\n- **空流:一次 `Send` 都没发生就 `CloseRequest`**:请求根本没发出去,对端永远收不到请求,调用挂死。正确行为是 `duplexHTTPCall.CloseWrite` 内先 `ensureRequestMade()` 兜底发请求([duplex\\_http\\_call.go L130-L134](file:///home/lizining/projects/dubbo-go/protocol/triple/triple_protocol/duplex_http_call.go#L130-L134)),全仓测试对该函数 0 处引用。*待补:`TestWriteBufferingEmptyStreamStillSendsRequest`*\r\n\r\n### 5.3 设计约束与待补测试\r\n\r\n从上面可得以下设计约束:\r\n\r\n1. **关闭必须在同一临界区内刷尽并封口**:`Close()` 在持锁状态下完成刷尽 + 置 closed,于是存在一个可断言的不变量:**到达底层的字节数 == 被接收的 `Write` 数 × 消息长度**。把关闭拆成两段(先 Flush 再 CloseWrite)会让这个不变量失效,而且失效方式是静默的,这正是它必须原子化的原因;\r\n2. **直写之前先刷缓冲**:保序是聚合层自己的责任。把大消息直写当成一条捷径时,很容易忽略捷径不能插队,所以判断顺序必须是先处理缓冲、再处理直写;\r\n3. **首次错误即冻结状态**:流是一次性资源,写失败后任何再试一次都没有语义,只会把故障暴露时间推迟。冻结的另一个好处是错误**可复现**:第一次失败之后的每一次调用都返回同一个错误;\r\n4. **错误类型与错误来源逐字对齐**:聚合层加进来之后,上层不应该观察到任何新形态的错误。所以封口后写沿用 `io.ErrClosedPipe`,管道真正关闭时仍由 `duplexHTTPCall.Write` 统一转成 `io.EOF`,聚合层不新增、不改写任何错误;\r\n5. **空操作不下沉**:空缓冲 flush 直接返回,既不在 `io.Pipe` 上白跑一次交接,也不给 http2 制造空帧的机会。这条同时让 `Flush` 的重复调用天然幂等;\r\n6. **兜底责任不转移给聚合层**:`CloseWrite` 里的 `ensureRequestMade()` 继续负责零消息流也要把请求发出去,聚合层不接管这个职责,也就不可能破坏它。\r\n\r\n这些约束现有测试已守住了大部分,还需要补下面 13 个单元测试:\r\n\r\n| 要补的测试 | 功能 |\r\n| --------------------------------------------------------- | --- |\r\n| `TestStreamBufferWriterStickyErrorOnEveryExit` | 首错冻结之后 `Write` / `Flush` / `Close` 三个出口返回同一个错误 |\r\n| `TestStreamBufferWriterWriteReportsFlushFailure` | 水位 flush 失败但本次字节已入缓冲,返回 `(len(p), err)` 而不是 nil |\r\n| `TestStreamBufferWriterLargeMessageErrorPropagates` | 大消息直写失败时,上层拿到的是同一个错误,而不是 nil |\r\n| `TestStreamBufferWriterCloseFlushFailureReturnsError` | `Close` 尾刷失败时返回该错误,并置 `closed`、不重复尝试 |\r\n| `TestCloseRequestClosesWriteSideAfterFlushFailure` | flush 失败时 `CloseWrite` 仍被调用,对端能读到流结束 |\r\n| `TestStreamBufferWriterConcurrentCloseAndFlush` | `Close` 与 `Flush` 并发时同一批数据不会被发两次 |\r\n| `TestStreamBufferWriterConcurrentBufferBound` | 并发 `Send` 下缓冲以 `limit` 为界,不会无界增长 |\r\n| `TestStreamBufferWriterLargeMessageFlushesPendingFirst` | 大消息直写之前先把缓冲里的小消息刷出去,不插队 |\r\n| `TestStreamBufferWriterShortWriteIsFailure` | 下游短写(`n < len(p)` 且 err == nil)按失败处理并冻结,不静默丢字节 |\r\n| `TestStreamBufferWriterCloseAfterCloseFailure` | flush 失败之后再次 `Close` 返回同一个粘滞错误 |\r\n| `TestStreamBufferWriterFlushAfterClose` | `Close` 成功之后再 `Flush` 返回 nil,不报 `io.ErrClosedPipe` |\r\n| `TestWriteBufferingCoversUnaryNonFastPath` | unary 未走 fast path 时同样被套上缓冲 |\r\n| `TestWriteBufferingEmptyStreamStillSendsRequest` | 一条消息都不发就直接 `CloseRequest`,服务端仍能收到这次请求 |\r\n\r\n\r\n### 5.4 端到端装配验证\r\n\r\n单元与装配之外,还需要验证聚合层接进真实调用链之后,服务端能收到全部字节:\r\n\r\n| 测试 | 覆盖 |\r\n| ----------------------------- | ------------------------------------------------------------------------------------------ |\r\n| 单元(`buffered_writer_test.go`) | 聚合、阈值触发、超大消息直写、空 flush 空操作、错误粘滞、并发安全、`Write` after `Close` → `io.ErrClosedPipe`、`Close` 幂等 |\r\n| 并发契约守护 | `TestStreamBufferWriterCloseNeverDropsRacingWrite`(不变量 + 反向验证) |\r\n| 端到端 | `TestWriteBufferingStreamingFlushOnClose`:`CloseRequest` 刷尽、不丢尾包 |\r\n| benchmark | `buffered_write_bench_test.go`(机制层证据,ns/op / allocs) |\r\n\r\n> 说明:新增代码只在显式开启 `WithWriteBuffering()` 之后生效;默认路径下 `writeBuffer=nil`,装配给协议层的 writer 仍是 `duplexHTTPCall`,不经过任何批缓冲逻辑。\r\n\r\n## 六、预估收益与方案边界\r\n\r\n### 6.1 生产中影响因素\r\n\r\n1. **场景特异性(重要)**:收益集中在**小报文 × 高吞吐流式**,单流连发大量小消息、消息大小远小于缓冲水位。大报文(≥ 32 KiB 单条)直接直写底层,无收益也无损失;\r\n2. **首包延迟**:缓冲会攒着不发,牺牲首包 latency 换吞吐,这是 opt-in 的原因;\r\n3. **多 goroutine 并发写同一流**:聚合之后每次写都要先取锁,`w.mu` 会成为新的争用点,同一个流被多个 goroutine 并发写时需要自行权衡;\r\n4. **端到端摊薄**:协议内收益端到端叠加框架栈/网络/服务端耗时后收敛;\r\n5. **默认行为零变化**:未开启时 `writeBuffer=nil`,与现状逐字节等价;不适用于 unary / 大报文 / 低首包延迟场景。\r\n\r\n### 6.2 方案边界声明\r\n\r\n> 这是一个**针对小报文 × 高吞吐流式场景的 opt-in 吞吐优化**,用首包延迟、一次拷贝与一把锁,换掉每条消息两次同步交接与两次 syscall,把它们摊薄到水位级别;**默认关闭**,只对主动开启该场景的用户生效。它不改变默认行为,也不适用于所有场景。\r\n\r\n- **适用**:流式客户端(gRPC 编码默认路径 + Triple 编码)、单流连发大量小消息、高吞吐优先;\r\n- **不适用 / 不生效**:unary、unary fast path、服务端路径、大报文(直写)、低首包延迟敏感场景;\r\n- **默认**:关闭,未开启用户零感知。\r\n\r\n## 七、测试构造情况说明\r\n\r\n### 7.1 测试构造本身是收益的变量\r\n\r\n**收益确实与测试构造相关**:收益 = 聚合摊薄的交接次数,与**消息条数 N** 直接相关;与**单消息大小**通过 32 KiB 水位间接相关(消息越大,凑满水位的条数越少,摊薄倍数越小;单条 ≥ 32 KiB 时退化为直写)。因此测试矩阵做的是全量取值扫描,而不是只挑对优化最有利的参数组合。\r\n\r\n### 7.2 测试配置参照系\r\n\r\n| 来源 | 数值 | 含义 |\r\n| --------------------------------- | ----------------------------- | ------------ |\r\n| OpenTelemetry BatchSpanProcessor | `max_export_batch_size = 512` | 每批攒 512 条再导出 |\r\n| 遥测 span 真实大小 | 200\\~500 B(估算常取 500 B\\~1 KB) | 单条消息量级 |\r\n| gRPC-Go / Kitex `WriteBufferSize` | 默认 32 KB | 水位一致 |\r\n| Kafka producer `batch.size` | 默认 16384(16 KB) | 跨领域同类水位 |\r\n\r\n## 八、参考链接\r\n\r\n- gRPC-Go `WithWriteBufferSize`(默认 32KB、Zero 关闭):\r\n- gRPC C++ Performance Notes:Streaming write buffering(`set_buffer_hint` opt-in、`GRPC_ARG_HTTP2_WRITE_BUFFER_SIZE`):\r\n- gRPC-Go 官方博客 gRPC-Go performance Improvements(\"flush syscall for every data frame\"):\r\n- Kitex `WithGRPCWriteBufferSize`(默认 32KB):\r\n- tRPC-Go tnet websocket 的 Combined Writes Optimization(小消息合并单 syscall):\r\n- Kafka Producer Configs(`batch.size` / `linger.ms`):\r\n- OpenTelemetry BatchSpanProcessor 默认值:\r\n",
"createdAt": "2026-09-17T14:23:53Z",
"updatedAt": "2026-09-18T06:52:09Z",
"author": {
"login": "lizining1231"
},
"replies": [
{
"id": "DC_kwDOCJS8R84BGi8p",
"url": "https://github.com/apache/dubbo-go/discussions/3673#discussioncomment-18493225",
"body": "cool",
"createdAt": "2026-09-18T02:57:18Z",
"updatedAt": "2026-09-18T02:57:18Z",
"author": {
"login": "Alanxtl"
}
}
]
},
{
"id": "DC_kwDOCJS8R84BGqA5",
"url": "https://github.com/apache/dubbo-go/discussions/3673#discussioncomment-18522169",
"body": "我发现了一个陈年文档 或许可以做个参考https://github.com/apache/dubbo-go/wiki/Benchmark-test-of-dubbo",
"createdAt": "2026-09-20T02:31:03Z",
"updatedAt": "2026-09-20T02:31:03Z",
"author": {
"login": "Alanxtl"
},
"replies": []
}
]
},
{
"number": 3719,
"title": "2026-09-05 weekly",
"body": "# 🧭 Dubbo-go 社区周报\r\n\r\n| 项目 | 链接 |\r\n| --------------- | ------------------------------------------------- |\r\n| gost | https://github.com/dubbogo/gost |\r\n| hessian2 | https://github.com/apache/dubbo-go-hessian2 |\r\n| pixiu | https://github.com/apache/dubbo-go-pixiu/ |\r\n| pixiu-samples | https://github.com/apache/dubbo-go-pixiu-samples |\r\n| dubbogo-samples | https://github.com/apache/dubbo-go-samples/issues |\r\n\r\n------\r\n\r\n\r\n| 项目 | Issue/PR | 负责人 | 进展说明 |\r\n| ---------------- | ------------------------------------------------------------ | -------------- | --------------------------------------------- |\r\n| 泛化调用 | https://github.com/apache/dubbo-go/issues/3472 | yongjia | sample merged,admin和pixiu支持推进中 |\r\n| 可观测性(OSPP) | https://github.com/apache/dubbo-go/issues/3292 | yangrui&hanxin | 补全 + 和admin打通 |\r\n| metadata(OSPP) | https://github.com/apache/dubbo-go/issues/3499 | shibin | 和admin打通
已完成应用级,正在处理接口级 |\r\n| router(OSPP) | 阻塞,等待admin的https://github.com/apache/dubbo-admin/issues/1547 | yangrui | 和admin打通 |\r\n| OSPP-Pixiu Admin 配置模型重构与多协议场景配置化增强 | https://github.com/apache/dubbo-go-pixiu/issues/1024 | Zhenjiansong&baiwenbo | 已拆subissue |\r\n| OSPP-Pixiu xDS改进 | | shibing&yangrui | 延后(dubbogo处理中) |\r\n| OSPP-Dubbo Admin-Agent 上下文管理实现 | | qiaoyuqi | |\r\n| OSPP-Dubbo Admin-增强Dubbo Admin的可观测能力 | | yaojiaang | 等待dubbogo指标 |\r\n| OSPP-Dubbo triple性能分析优化 | https://github.com/apache/dubbo-go/issues/3728 | zining | |",
"url": "https://github.com/apache/dubbo-go/discussions/3719",
"createdAt": "2026-09-05T14:27:56Z",
"updatedAt": "2026-09-19T13:51:11Z",
"closed": false,
"closedAt": null,
"isAnswered": null,
"author": {
"login": "AsperforMias"
},
"category": {
"name": "General"
},
"answer": null,
"comments": []
}
]