You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(flowcontrol): apply effective defaults for DefaultRequestTTL and per-band MaxRequests
Neither field had an effective default despite documentation claiming otherwise: an
unset defaultRequestTTL applied no TTL at all, and the per-band MaxRequests doc
referenced a defaultPriorityBandMaxRequests constant that did not exist. A default
configuration could therefore queue requests with no time or count bound until the
per-band byte limit (1 GB).
- Default DefaultRequestTTL to 60s in controller.NewConfig. The TTL is a queue-wait
budget: a request that cannot dispatch within it is shed with a retryable
backpressure error rather than served with severely degraded time-to-first-token.
It is the only bound on queue wait when neither the client nor the gateway
enforces a request deadline (the well-lit guides configure no gateway request
timeout); deadlines that fire sooner evict via context cancellation instead. An
explicit 0s disables the TTL (disconnect-only), distinguishable from unset via
the pointer-typed API field.
- Default per-band MaxRequests to 5000 in applyDefaults, mirroring the MaxBytes
handling: band-level 0 is treated as unset and receives the default. The pair is
self-consistent: under a dispatch halt, occupancy self-limits at arrival rate x
TTL, so the count cap only binds above ~83 req/s per band.
- Global limits remain unlimited by default (omitted or explicit 0); band count is
bounded by the distinct priorities defined in InferenceObjectives.
- Fix stale docs: FlowGCTimeout default (5 minutes, not 1 hour), the nonexistent
maxBytes-0-drops-immediately claim on DefaultNegativePriorityBand (band-level 0
has never meant zero capacity), and the InitialEffectiveTTL adapter docstring.
Fixes#2095
Part of #1187
Signed-off-by: Luke Van Drie <lukevandrie@google.com>
0 commit comments