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.
- Langage dominant
- Java
- Étoiles
- 2.1k
- Forks
- 1.2k
- Merge moyen
- 1 j 23 h
- PR mergées (30 j)
- 154
Description
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.
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.