googleapis / googleapis/java-storage

Feature request: expose ChannelPoolSettings on GrpcStorageOptions.Builder

Aperta
#3,553 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
api: storage
Lingua principale
Java
Stelle
141
Fork
93
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

## 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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start in GrpcStorageOptions.Builder and follow resolveSettingsAndOpts() to see how InstantiatingGrpcChannelProvider is configured. Add the requested builder setting and verify that StorageOptions.grpc().build().getService() accepts it while behavior remains unchanged when the setting is unset.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
grpc, java
Ambito
api, backend
Tipo di issue
Funzionalità
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Tranquilla
Chiarezza
Specificata chiaramente
Idoneità per principianti
76/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.