googleapis / googleapis/google-cloud-java

[sdk-platform-java] The max rpc per channel is set to 100 on GFE, we need to set maxRpcsPerChannel in gax accordingly.

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

描述

By default, the number of gRPC channel is set to [1 channel](https://github.com/googleapis/gapic-generator-java/blob/main/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/InstantiatingGrpcChannelProvider.java#L459) and the max rpc per channel is set to [Integer.MAX_VALUE](https://github.com/googleapis/gapic-generator-java/blob/3f6c4c04fde254cfc3c1441b44beeb2bbe0c7e03/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/ChannelPoolSettings.java#L131). However, the max rpc per channel is set to 100 on GFE(pending confirmation), if a channel is overloaded and `maxRpcsPerChannel` is not set, ChannelPool will not [resize](https://github.com/googleapis/gapic-generator-java/blob/main/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/ChannelPool.java#L248-L300) correctly and would cause performance degradation. There is a [related issue](https://github.com/grpc/grpc/issues/21386) in gRPC repo.

We need to set the default `maxRpcsPerChannel` to 100, and prevents it from being set to any number that is greater than 100.

We also need to make sure directpath is not affected by this, as directpath doesn't suffer all the same limits as GFEs.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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