FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat: Improve upon the default gRPC Connection Pool size by cindy-peng · Pull Request #1706 · googleapis/java-datastore · GitHub

This repository was archived by the owner on Feb 24, 2026. It is now read-only.
/ java-datastore Public archive

feat: Improve upon the default gRPC Connection Pool size - #1706

Merged
cindy-peng merged 9 commits into
grpc-experimentalfrom
cindy/connectionPoolSize
Feb 6, 2025
Merged

feat: Improve upon the default gRPC Connection Pool size#1706
cindy-peng merged 9 commits into
grpc-experimentalfrom
cindy/connectionPoolSize

Conversation

cindy-peng commented Jan 9, 2025
edited
Loading

Copy link
Copy Markdown
Contributor

The current Java SDK uses a default gRPC connection pool with only one channel . This can cause performance issues for clients with high request rates (over 100 queries per second) because they may experience throttling.

To address this, this PR update proposes changing the default connection pool settings to allow for multiple channels (minimum 1, maximum 4). This should improve performance for clients with high request rates, without requiring any changes to their code. Customers can still customize the connection pool settings if needed.

Please refer here for more details:
configure a more reasonable default grpc connection pool config

cindy-peng requested review from a team January 9, 2025 19:22
product-auto-label Bot added size: s Pull request size is small. api: datastore Issues related to the googleapis/java-datastore API. labels Jan 9, 2025

gkevinzheng left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Could you use constants for gRPC minimum and maximum channel counts?

daniel-sanche left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM, but I agree with Kevin that constants would be good to have

Copy link
Copy Markdown
Contributor Author

Could you use constants for gRPC minimum and maximum channel counts?

Good catch! Fixed.

cindy-peng requested a review from a team January 14, 2025 03:43
product-auto-label Bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Jan 14, 2025

Copy link
Copy Markdown

Warning: This pull request is touching the following templated files:

  • .github/workflows/ci.yaml

product-auto-label Bot added size: s Pull request size is small. and removed size: m Pull request size is medium. labels Jan 14, 2025

gkevinzheng left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

jimit-j-shah left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Have you tested and verified that this indeed improves latency at the SDK? Running a client with high enough operation qps should be able to verify this.

Also, you can use tcpdump or netstat to verify the work done over each gcp connection .

Copy link
Copy Markdown
Contributor Author

Have you tested and verified that this indeed improves latency at the SDK? Running a client with high enough operation qps should be able to verify this.

Also, you can use tcpdump or netstat to verify the work done over each gcp connection .

Hi Jimit, I ran some benchmark tests with 1000 QPS and this change improved lookup and update average latencies by 2%-6%: go/connection-pooling-benchmark. I think this is a good indicator that the change improved latency at the SDK.

cindy-peng merged commit 7ba4531 into grpc-experimental Feb 6, 2025
cindy-peng deleted the cindy/connectionPoolSize branch February 6, 2025 15:50
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: datastore Issues related to the googleapis/java-datastore API. size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL