googleapis / googleapis/java-storage
Feature request: expose ChannelPoolSettings on GrpcStorageOptions.Builder
- 主要言語
- Java
- スター
- 141
- フォーク
- 93
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
## Is your feature request related to a problem? Please describe.
We use `StorageOptions.grpc()` with Direct Path on GKE for high-throughput writes (`WriteChannel`, resumable uploads). A single commit can trigger **hundreds of concurrent uploads** per pod.
`GrpcStorageOptions` builds `InstantiatingGrpcChannelProvider` without `setChannelPoolSettings()`, so the default is effectively **one gRPC channel**. With ~100+ concurrent RPCs, calls queue on that channel and we see high tail latency and underused bandwidth.
`ChannelPoolSettings` can be set on `StorageSettings` + `StorageClient`, but the high-level `Storage` API from `StorageOptions.grpc().build().getService()` offers no way to pass those settings.
(`google-cloud-storage` 2.34.0+, resolves to 2.55.x in our build.)
## Describe the solution you'd like
Add `setChannelPoolSettings(ChannelPoolSettings)` to `GrpcStorageOptions.Builder`, wired through to `InstantiatingGrpcChannelProvider` in `resolveSettingsAndOpts()`. Default unchanged when unset.
```java
Storage storage = StorageOptions.grpc()
.setProjectId(projectId)
.setChannelPoolSettings(ChannelPoolSettings.builder()
.setInitialChannelCount(8)
.setMaxChannelCount(16)
.setMaxRpcsPerChannel(50)
.build())
.build()
.getService();
```
## Describe alternatives you've considered
- **`StorageClient` + custom `StorageSettings`** — channel pool works, but not compatible with high-level `Storage` / `WriteChannel`.
- **Copy `resolveSettingsAndOpts()` in app code** — fragile.
- **Upload concurrency limit in app** — does not fix single-channel RPC queuing.
コントリビューションガイド
調査の方向性
GrpcStorageOptions.Builderから開始し、InstantiatingGrpcChannelProviderがどのように設定されるかを確認するためにresolveSettingsAndOpts()を追ってください。要求されたbuilder設定を追加し、設定が指定されていない場合も動作が変わらないまま、StorageOptions.grpc().build().getService()がその設定を受け入れることを確認してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- grpc, java
- 領域
- api, backend
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 76/100