googleapis / googleapis/google-cloud-java

[sdk-platform-java] Speed up channel pool creation by parallelizing the creation of the channels

未关闭
#12,497 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
priority: p3 type: feature request
主要语言
Java
星标
2.1k
派生
1.2k
平均合并
1 天 23 小时
30 天内合并 PR
157

描述

**Is your feature request related to a problem? Please describe.**
When a channel pool is large and channel priming is enabled, it could take a long time to instantiate a client. This happens because the channels are created serially with the primer application inline:

https://github.com/googleapis/sdk-platform-java/blob/cc5724f04722e3d60eb9b4e02ecc1bdf5dd7a7fa/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/ChannelPool.java#L106-L108

https://github.com/googleapis/sdk-platform-java/blob/cc5724f04722e3d60eb9b4e02ecc1bdf5dd7a7fa/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/InstantiatingGrpcChannelProvider.java#L392-L393

**Describe the solution you'd like**
I think having the ChannelPool constructor create a temporary ForkJoin pool to invoke createSingleChannel would drastically improve start up times.

Internal issue: b/283099177

贡献指南

打开贡献指南

调研方向

从 gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/ChannelPool.java 第106行附近以及 InstantiatingGrpcChannelProvider.java 第392行附近开始,这里描述了 channel 的创建和预热。阅读 pool 构造函数如何调用 createSingleChannel,并确定并行创建应如何保留 channel 预热。完成标准是:大型已预热 pool 启动得更快,同时不改变其预期行为。

由索引模型根据 Issue 内容生成。

评估

技术栈
grpc, java
领域
api, backend, performance
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。