Support stream-level rebalancing for long-running RPCs (MaxStreamAge)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- grpc, java
Direzione di ricerca
Inizia con la proposta A9 per la gestione delle connessioni lato server e i riferimenti di grpc-go a keepalive.go e internal/transport/http2_server.go. Esamina quindi il ciclo di vita degli stream e i punti di ingresso della gestione degli errori di grpc-java, che non sono indicati nell’issue. Il lavoro è completato quando esiste un design gRFC accettato che copra jitter, stato di terminazione, comportamento dei retry e parità delle funzionalità per grpc-java e grpc-go.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Is your feature request related to a problem?
At our scale (1000+ client streams across 150 servers), long-running streaming RPCs (VStream CDC, Pub/Sub, Bigtable watch) create a load balancing problem with ORCA metrics. Using MaxConnectionAge causes connection churn for idle streams that only receive ORCA metrics. We need per-stream lifecycle management for efficient L7 load balancing.
The problem is that each server or client gRPC stream must implement its own stream termination logic in order to effectively use ORCA metrics and L7 load balancing. See best practices mentioned in https://github.com/grpc/grpc-java/issues/12525#issuecomment-3564341605.
Describe the solution you'd like
Similar to server-side connection management (gRPC A9) with MaxConnectionAge & MaxConnectionGrace for L4 load balancers, we propose adding a MaxStreamAge. Note we intentionally do not add grace since MaxConnectionGrace can be used to terminate with a graceful and forceful signal, while vstream is terminated the same either way (with error).
- terminate a stream after the given age (with jitter to avoid thundering herd)
- work at L7 (stream level) instead of L4 (connection level)
- allow orca metrics to continue flowing on the connection
- send an error code that clients could handle and immediately retry on the connection (possibly connecting to another server based on gRPC metrics)
This would prevent every application from re-implementing the same interval/jitter/status logic for long-running streams.
Describe alternatives you've considered
- MaxConnectionAge: Inefficient with L7 LB; closes connection even for idle ORCA streams
- Client-side timers: Every client must implement jitter/retry logic differently
- Server-side timers: Requires custom code per service (repeated development effort); no standard status codes
- MaxConnectionIdle: Only triggers when ALL streams are idle, not per-stream
Additional context
Our production environment uses:
- Server: grpc-go (Vitess vttablet)
- Client: grpc-java (application clients)
We need feature parity in both implementations for this to work. We're willing to implement both and contribute the code if the design is accepted. If we gain support on this issue, we can work on a gRFC as this would likely benefit from formal design review.
- Lingua principale
- Java
- Stelle
- 12.1k
- Fork
- 4k
- Merge medio
- 2g 3h
- PR unite (30g)
- 30
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di grpc/grpc-java
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
grpc/grpc-java#13063 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
grpc/grpc-java#13052 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Support of `dns:name` URIsApertadocs enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
grpc/grpc-java#10824 · 8 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di grpc/grpc-java
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
refinedmods/refinedstorage2#1414 · 1 commento ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
In Java's `LongBoundedSum`, setting `lower` to `Long.MIN_VALUE` under-estimates the sensitivityAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
google/differential-privacy#489 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
link-check link-check:manual
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100