perf(spanner): add gRPC channel pooling#5491
Open
olavloite wants to merge 2 commits intogoogleapis:mainfrom
Open
perf(spanner): add gRPC channel pooling#5491olavloite wants to merge 2 commits intogoogleapis:mainfrom
olavloite wants to merge 2 commits intogoogleapis:mainfrom
Conversation
Applications that use Spanner for high throughput often need more than one gRPC channel in order to achieve the best possible performance. Having more than one channel both increases the number of concurrent streams that an application can have open at any time (the limit is 100 per gRPC channel), and distributes the load that is generated by the application across multiple Spanner frontends.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5491 +/- ##
========================================
Coverage 97.73% 97.74%
========================================
Files 218 218
Lines 49013 49236 +223
========================================
+ Hits 47904 48124 +220
- Misses 1109 1112 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
olavloite
commented
Apr 22, 2026
| let transport = | ||
| crate::generated::gapic_dataplane::transport::Spanner::new(config.clone()).await?; | ||
| let grpc_client = transport.inner.clone(); | ||
| let num_channels = std::env::var("SPANNER_NUM_CHANNELS") |
Contributor
Author
There was a problem hiding this comment.
We will add a 'normal' configuration option for this as well in a follow-up PR (assuming that we go with this solution)
Contributor
There was a problem hiding this comment.
I am not sure if this helps, but consider:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Applications that use Spanner for high throughput often need more than one gRPC channel in order to achieve the best possible performance. Having more than one channel both increases the number of concurrent streams that an application can have open at any time (the limit is 100 per gRPC channel), and distributes the load that is generated by the application across multiple Spanner frontends.
See also go/spanner-rust-channel-pool