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.
- Ngôn ngữ chính
- Java
- Star
- 2.1k
- Fork
- 1.2k
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 154
Mô tả
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.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.