Skip to main content

DEFAULT_MAX_CONCURRENT_STREAMS_PER_SERVICE

Constant DEFAULT_MAX_CONCURRENT_STREAMS_PER_SERVICE 

Source
pub const DEFAULT_MAX_CONCURRENT_STREAMS_PER_SERVICE: usize = 16;
Expand description

Default ceiling on concurrent server-side streaming responses per service — i.e. how many streaming RPCs one service may be actively pushing data for at once. Overridable via install_max_concurrent_streams_per_service (wired from ServerConfig::max_concurrent_streams_per_service).

This is the former per-RequestLoop MAX_INFLIGHT_CONTINUATIONS (16). When the spawn moved out of the transport front-ends into the dispatch core (#186) the bound is keyed by service name rather than living on each loop — the same granularity, since each service has exactly one RequestLoop. Keeping it per-service (not process-wide) preserves the original isolation: one service’s stuck or long-lived streams cannot starve another’s.