Tsukikage7 commented on issue #820: URL: https://github.com/apache/dubbo-go-pixiu/issues/820#issuecomment-5204123133
## 本地实测数据(分支 benchmark-latency-degradation,Apple Silicon,500 samples/方法) 针对本 issue 的连接复用问题,我在本地实现并实测了一版(改动范围:grpcproxy 连接复用 + descriptor/method 缓存 + extension 注册并发保护 + filter 链 Close 资源释放 + dubbo serialization 空值兜底)。 ### gRPC via Pixiu(Median) | Method | Baseline | 优化后 | 提升 | | --- | --- | --- | --- | | GetUser | 1.9ms | 800µs | 2.4x | | GetUsers | 1.7ms | 800µs | 2.1x | | GetUserByName | 1.4ms | 600µs | 2.3x | ### Dubbo via Pixiu(Median) - Baseline:当前 main 直接 **500 Internal Server Error**(provider URL `serialization=` 为空时无法反序列化) - 优化后:GetUser 500µs / GetGender 400µs / GetUser0 400µs / GetUsers 400µs ### Triple 两个版本都无法运行:测试中 pixiu 未监听 8881(`connection refused`),疑似 triple pixiu 配置/启动问题,与本次改动无关,正在排查。 方案与 @XnLemon 之前提出的方向一致(共享连接池 + 异常连接移除),实现细节: - `pkg/filter/http/grpcproxy/grpc.go`:每请求 `grpc.DialContext` + 临时 pool → `grpcConnectionManager`(cluster+endpoint 共享连接,错误路径 `Invalidate`) - `pkg/filter/http/grpcproxy/descriptor.go`:反射 descriptor source 按连接缓存(修复复用已取消的 request context 的问题)+ method descriptor 缓存 + 并发安全 - `pkg/common/extension/filter/filter_manager.go` / `pkg/common/http/manager.go` / `pkg/listener/http/http_listener.go`:Close 链路释放资源 - `pkg/adapter/dubboregistry/registry/registry.go`:serialization 空值默认 hessian2 请问这个方向是否可以提 PR?另外想确认 @XnLemon 那边是否已有重复实现,避免撞车。 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
