Skip to main content

DhtRateLimitConfig

Type Alias DhtRateLimitConfig 

Source
pub type DhtRateLimitConfig = RateLimitConfig;
Expand description

Resolved DHT rate-limit configuration. See ADR 022 §DHT Rate Limiting. Default returns the ADR 022 values (per-peer 20/40, per-IP 100/200, global 1000/2000).

Aliased Type§

pub struct DhtRateLimitConfig {
    pub per_peer_rate_per_sec: f64,
    pub per_peer_burst: u32,
    pub per_ip_rate_per_sec: f64,
    pub per_ip_burst: u32,
    pub global_rate_per_sec: f64,
    pub global_burst: u32,
    pub max_tracked_per_ip: usize,
    pub max_tracked_per_peer: usize,
}

Fields§

§per_peer_rate_per_sec: f64

Per-peer (source NodeId) sustained rate (requests/second).

§per_peer_burst: u32

Per-peer burst capacity.

§per_ip_rate_per_sec: f64

Per-IP sustained rate (requests/second).

§per_ip_burst: u32

Per-IP burst capacity.

§global_rate_per_sec: f64

Global inbound sustained rate (requests/second).

§global_burst: u32

Global inbound burst capacity.

§max_tracked_per_ip: usize

Hard cap on the per-IP keyed-limiter map (#645). 0 => unbounded (operator opt-in, the resolver warns).

§max_tracked_per_peer: usize

Hard cap on the per-peer keyed-limiter map (#645). 0 => unbounded.