grpc-spring icon indicating copy to clipboard operation
grpc-spring copied to clipboard

Pooling feature for Channels

Open freezingWu opened this issue 4 years ago • 3 comments

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 ?

freezingWu avatar Aug 17 '20 15:08 freezingWu

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

ST-DDT avatar Aug 17 '20 17:08 ST-DDT

HI bro, sorry for misunderstanding. pooling feature here ,it means some configurations, etc.

  1. the min number of core size for each ManagedChannel
  2. the max number of size for each ManagedChannel
  3. 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.

freezingWu avatar Aug 24 '20 02:08 freezingWu

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).

onyn avatar Dec 05 '23 14:12 onyn