hyperlane-plugin-concurrency 23.3.0

A lock-free atomic global and per-route-prefix in-flight concurrency limiter and adaptive load-shedding plugin for the Hyperlane framework with optional bounded Tokio Semaphore queuing, leak-proof RAII Context permits, and prebuilt 503 Retry-After wire responses.
Documentation
1
2
3
4
5
6
7
8
9
10
/// Reason why a concurrency acquisition was shed (`503 Service Unavailable`).
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum ShedReason {
    /// Global in-flight limit (or adaptive effective limit) was saturated.
    GlobalLimitExceeded,
    /// Matched route-prefix in-flight limit was saturated.
    PrefixLimitExceeded,
    /// Bounded wait timeout expired before a concurrency slot became available.
    WaitTimedOut,
}