Skip to content
This repository was archived by the owner on Feb 24, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Formatting code block
  • Loading branch information
cindy-peng committed Dec 4, 2024
commit af4f291dc7e768157b5725da2536dab3f7ab3419
12 changes: 6 additions & 6 deletions .readme-partials.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ custom_content: |
The client can be built from the `grpc-experimental` branch on GitHub. For private preview, you can also download the artifact with the instructions provided below.

1. Download the datastore private preview package with dependencies:
```python
https://datastore-sdk-feature-release.web.app/google-cloud-datastore-2.20.0-grpc-experimental-1-SNAPSHOT-jar-with-dependencies.jar
```
curl -o <path-to-downloaded-jar> https://datastore-sdk-feature-release.web.app/google-cloud-datastore-2.20.0-grpc-experimental-1-SNAPSHOT-jar-with-dependencies.jar
```
2. Run the following commands to install JDK locally:
```python
```
mvn install:install-file -Dfile=<path-to-downloaded-jar> -DgroupId=com.google.cloud -DartifactId=google-cloud-datastore -Dversion=2.20.0-grpc
```
3. Edit your pom.xml to add above package to `<dependencies/>` section:
Expand Down Expand Up @@ -194,7 +194,7 @@ custom_content: |

However sometimes you may want to change your connection pool size due to high throughput or buffered requests. Ideally, to leave room for traffic fluctuations, a connection pool has about twice the number of connections it takes for maximum saturation. Because a connection can handle a maximum of 100 concurrent requests, between 10 and 50 outstanding requests per connection is optimal. The limit of 100 concurrent streams per gRPC connection is enforced in Google's middleware layer, and you are not able to reconfigure this number.

The following steps help you calculate the optimal number of connections in your channel pool using client-side metrics such as those available from [OpenCensus](https://opencensus.io/guides/grpc/java/#examining-metrics).
The following steps help you calculate the optimal number of connections in your channel pool using client-side metrics.
Comment thread
cindy-peng marked this conversation as resolved.
Outdated

From your client-side metrics, gather the following information:

Expand All @@ -207,8 +207,8 @@ custom_content: |

These steps are expressed in the following equations:
```java
(QPS sec ÷ (1,000 ÷ latency ms)) ÷ 50 streams = Minimum optimal number of connections
(QPS sec ÷ (1,000 ÷ latency ms)) ÷ 10 streams = Maximum optimal number of connections
(QPS ÷ (1,000 ÷ latency ms)) ÷ 50 streams = Minimum optimal number of connections
(QPS ÷ (1,000 ÷ latency ms)) ÷ 10 streams = Maximum optimal number of connections
```

###### Example
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,13 @@ In this feature launch, the [Java Datastore client](https://github.com/googleapi
The client can be built from the `grpc-experimental` branch on GitHub. For private preview, you can also download the artifact with the instructions provided below.

1. Download the datastore private preview package with dependencies:
```python
https://datastore-sdk-feature-release.web.app/google-cloud-datastore-2.20.0-grpc-experimental-1-SNAPSHOT-jar-with-dependencies.jar
```
```
curl -o <path-to-downloaded-jar> https://datastore-sdk-feature-release.web.app/google-cloud-datastore-2.20.0-grpc-experimental-1-SNAPSHOT-jar-with-dependencies.jar
```
2. Run the following commands to install JDK locally:
```python
mvn install:install-file -Dfile=<path-to-downloaded-jar> -DgroupId=com.google.cloud -DartifactId=google-cloud-datastore -Dversion=2.20.0-grpc
```
```
mvn install:install-file -Dfile=<path-to-downloaded-jar> -DgroupId=com.google.cloud -DartifactId=google-cloud-datastore -Dversion=2.20.0-grpc
```
3. Edit your pom.xml to add above package to `<dependencies/>` section:
```xml
<dependency>
Expand Down Expand Up @@ -292,7 +292,7 @@ The default connection pool size is right for most applications, and in most cas

However sometimes you may want to change your connection pool size due to high throughput or buffered requests. Ideally, to leave room for traffic fluctuations, a connection pool has about twice the number of connections it takes for maximum saturation. Because a connection can handle a maximum of 100 concurrent requests, between 10 and 50 outstanding requests per connection is optimal. The limit of 100 concurrent streams per gRPC connection is enforced in Google's middleware layer, and you are not able to reconfigure this number.

The following steps help you calculate the optimal number of connections in your channel pool using client-side metrics such as those available from [OpenCensus](https://opencensus.io/guides/grpc/java/#examining-metrics).
The following steps help you calculate the optimal number of connections in your channel pool using client-side metrics.

From your client-side metrics, gather the following information:
Comment thread
cindy-peng marked this conversation as resolved.
Outdated

Expand All @@ -305,8 +305,8 @@ From your client-side metrics, gather the following information:

These steps are expressed in the following equations:
```java
(QPS sec ÷ (1,000 ÷ latency ms)) ÷ 50 streams = Minimum optimal number of connections
(QPS sec ÷ (1,000 ÷ latency ms)) ÷ 10 streams = Maximum optimal number of connections
(QPS ÷ (1,000 ÷ latency ms)) ÷ 50 streams = Minimum optimal number of connections
(QPS ÷ (1,000 ÷ latency ms)) ÷ 10 streams = Maximum optimal number of connections
```

###### Example
Expand Down