Expand description
hyperlane-plugin-concurrency
Lock-free atomic global and per-route-prefix in-flight concurrency limiter
and adaptive load-shedding plugin for Hyperlane with optional bounded
tokio::sync::Semaphore queuing, leak-proof RAII Context permits, and
prebuilt 503 Service Unavailable wire responses.
Structs§
- Adaptive
Shed Config - Latency-driven AIMD adaptive load-shedding parameters.
- Concurrency
Config - Top-level configuration for
ConcurrencyLimiterandConcurrencyPlugin. - Concurrency
Limiter - High-performance lock-free concurrency limiter backing
ConcurrencyPlugin. - Concurrency
Permit - Leak-proof RAII concurrency permit stored in Hyperlane
ContextunderATTR_CONCURRENCY_PERMIT. - Concurrency
Plugin - Process-wide
ConcurrencyPluginsingleton holding a compiledConcurrencyLimiter. - Concurrency
Request Hook - Opt-in request middleware acquiring a
ConcurrencyPermitor shedding with503 Service Unavailable. - Concurrency
Response Hook - Opt-in response middleware releasing the
ConcurrencyPermitstored inContextattributes. - Concurrency
Snapshot - Point-in-time diagnostic counters exported by
ConcurrencyLimiter::snapshot. - Prefix
Concurrency Limit - Per-route-prefix in-flight concurrency rule.
Enums§
- Shed
Reason - Reason why a concurrency acquisition was shed (
503 Service Unavailable).
Constants§
- ATTR_
CONCURRENCY_ PERMIT - Context attribute key storing the active RAII
ConcurrencyPermit. - DEFAULT_
ADAPTIVE_ TARGET_ LATENCY_ MS - Default target request latency in milliseconds for AIMD adaptive load shedding.
- DEFAULT_
MAX_ IN_ FLIGHT - Default global maximum concurrent in-flight requests.
- DEFAULT_
RETRY_ AFTER_ SECS - Default
Retry-Afterheader value in seconds emitted on503 Service Unavailable. - DEFAULT_
SHED_ BODY - Default rejection body emitted when concurrency capacity is saturated.
- DEFAULT_
SHED_ CONTENT_ TYPE - Default
Content-Typeheader emitted on shed responses.