grpc-spring
grpc-spring copied to clipboard
Pooling feature for Channels
As one key feature of Optimizations, i am trying to looking forward the pooling setting for each channels(static(s), discoveries also) from this framework.
and seems it‘s un-support yet.
may i know any pooling feature putted under your consideration ?
I'm not sure what you are asking for. Can you please give an example of the pooling feature you mentioned?
The grpc channels are already pooled as long as they use the same channel name, see: https://github.com/yidongnan/grpc-spring-boot-starter/blob/master/grpc-client-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/client/channelfactory/AbstractChannelFactory.java#L104
HI bro, sorry for misunderstanding. pooling feature here ,it means some configurations, etc.
- the min number of core size for each ManagedChannel
- the max number of size for each ManagedChannel
- the max idle time 4... 5... and so on. Some kind like the jdbc pool ,or redis connection pool.
i read through the source file you suggested , and seems the expected feature is yet fulfit.
looking forward your feedback.
ManagedChannel already maintain pool of connections inside himself (see here). However there is one very special case where pooling of ManagedChannel's itself may be useful - hitting MAX_CONCURRENT_STREAM error. But grpc team already working on this issue and eventually it would be resolved. See performance guide ("Special topic" in the general section).