hyperlane-plugin-concurrency
Lock-Free In-Flight Concurrency Limiter & Adaptive Load-Shedding Plugin
Workspace Overview · Plugin Catalog · API Docs
Overview
Opt-in request (-108) and response (85) middleware enforcing lock-free atomic global and per-route-prefix in-flight concurrency caps, AIMD latency-driven adaptive load shedding, optional bounded wait queues via tokio::sync::Semaphore, prebuilt 503 Service Unavailable + Retry-After wire responses, and leak-proof RAII ConcurrencyPermit guards stored in Hyperlane Context attributes (ATTR_CONCURRENCY_PERMIT) that release automatically on early Status::Reject, panics, or dropped connections.
This crate is a member of the hyperlane unified Rust 2024 workspace. All plugin crates are opt-in and transparent (Status::Continue) when unconfigured.
Responsibilities & Module Layout
struct/enum/impl—ConcurrencyConfig,PrefixConcurrencyLimit,AdaptiveShedConfig,ConcurrencyLimiter,ConcurrencyPermit,ConcurrencyPlugin,ConcurrencyRequestHook(-108), andConcurrencyResponseHook(85)fn— Segment-boundary prefix normalization, lock-free atomic CAS slot acquisition, and EWMA/AIMD limit updates
Installation
Verification
Run crate-scoped formatting, lint, and test gates from the workspace root:
Documentation & Governance
- Project standards and release workflows live in
../../.agents/skills/hyperlane/SKILL.md.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contact
For inquiries, please contact the author at root@devhub.vip.