docs: Add a guide on configuring ChannelPools for gRPC#12905
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive guide for configuring gRPC channel pools in Java client libraries, covering best practices, dynamic sizing, and troubleshooting. The review feedback identifies a few improvements: aligning the logging levels in the code examples with the descriptive text to ensure consistency and prevent log flooding, and removing a stray filename that was accidentally appended to the end of the document.
|
Pending @blakeli0's review before merging |
|
|
||
| ## Background | ||
|
|
||
| When handling heavy traffic, a single gRPC connection often becomes a performance bottleneck. To overcome this, the Google Cloud Java client libraries use **Channel Pooling** via the Gax-Java (Google API Extensions for Java) library. |
There was a problem hiding this comment.
This sounds like one channel is a problem, but grpc official guide mentioned that
Always re-use stubs and channels when possible.
I think we should follow the official grpc guide and mention that one channel should be sufficient for vast majority of libraries and use cases, Channel Pool was designed only for extreme cases.
There was a problem hiding this comment.
When handling heavy traffic, a single gRPC connection often becomes a performance bottleneck.
I'll reword this to avoid to make this sound like a possibility, rather than always asserting that one channel is the problem.
There is an note at the beginning of the guide:
> [!NOTE]
> The default channel pool configuration is designed to work well for the majority of workloads. You do not need to change these settings unless you are experiencing performance issues or have specific throughput requirements. If you do run into issues, this guide will help you tune the channel pool for your workload.
No description provided.