2

We are developing grpc based services in JAVA using SpringBoot.

We are following https://github.com/LogNet/grpc-spring-boot-starter

@GrpcService : used at server side service

@GrpcClient : used at client side stub

I am able to test this application.

Question : On production , we will be receiving around 5000 request per second with each request may take from 25 ms to 1 second.

Client side : How to implement connection (channel) pooling?

Server side : How to make server to handle multiple request simultaneously like any web server does ?

dReAmEr
  • 6,986
  • 7
  • 36
  • 63

1 Answers1

1

Client side : How to implement connection (channel) pooling?

Please describe what kind of pooling you are expecting - whether multiple channels using sub-channels/connections from a pool or a higher level pooling mechanisms for the channels themselves?

Server side : How to make server to handle multiple request simultaneously like any web server does ?

This is already the case. Look at ServerBuilder.executor() which allows you to specify your own executor for concurrent handling of requests.

San P
  • 494
  • 3
  • 7
  • As per my understanding, Single channel represent single TCP connection undeline. So if we have let's assume 5000 request per second, we want to have Pool of Channel to handle such scale of traffic, which is why looking for Pooling over Channel. – dReAmEr Dec 27 '20 at 13:53
  • @dReAmEr Have you found a way to create a pool of channels? Can you share more details? – chaosmonk Jul 02 '21 at 17:46
  • 1
    Check this out https://stackoverflow.com/questions/63749113/grpc-call-channel-connection-and-http-2-lifecycle to understand channels, sub-channels & connections – San P Jul 07 '21 at 04:06
  • We had a channel pooling internal library for the same. But now we are looking to move away from this and use a single ManagedChannel for the grpc client. Reason I got to know so far is that "GRPC is capable of handling all the RPC requests through the same underlying HTTP/2 connection by utilizing the power of multiplexing many requests into streams.". Hence I am searching for more answers on why to use just a single channel. But the meaning here is that we can think if we really need channel pool for this or just a single one suffices. – Rohit Singh Oct 06 '21 at 13:43