hyperlane-plugin-concurrency 23.3.2

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

hyperlane-plugin-concurrency

Lock-Free In-Flight Concurrency Limiter & Adaptive Load-Shedding Plugin

Crates.io Version Docs.rs CI Status Rust 2024 License: MIT

Workspace Overview · Plugin Catalog · API Docs


Overview

hyperlane-plugin-concurrency bounds active in-flight requests globally and per route prefix for hyperlane services (hook order -108 / 85). It is opt-in and transparent (Status::Continue) when unconfigured.

Installation

cargo add hyperlane-plugin-concurrency

Usage

use hyperlane_plugin_concurrency::{ConcurrencyConfig, ConcurrencyPlugin};

fn setup_concurrency() {
    ConcurrencyPlugin::init(ConcurrencyConfig::default());
}

Verification

cargo run -p hyperlane-cli -- fmt --check
cargo clippy -p hyperlane-plugin-concurrency --all-features --all-targets -- -D warnings
cargo test -p hyperlane-plugin-concurrency --all-features

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.