pub struct PoolConfig {
pub policy: ChunkPolicy,
pub pause_after_failures: u32,
pub retire_after_failures: u32,
pub backoff_initial: Duration,
pub backoff_max: Duration,
}Expand description
Failure handling and chunk sizing for a LanePool.
Fields§
§policy: ChunkPolicyHow chunks are sized from each lane’s rate.
pause_after_failures: u32Consecutive failed chunks a lane may have before it starts pausing between
attempts (1: pause after every failure). A single dropped connection is common
enough that retrying at once is often right.
retire_after_failures: u32Consecutive failed chunks after which a lane is retired for the rest of the
epoch. u32::MAX never retires.
backoff_initial: DurationThe first pause; each further consecutive failure doubles it.
backoff_max: DurationThe longest pause.
Implementations§
Source§impl PoolConfig
impl PoolConfig
Sourcepub const EXPORT: Self
pub const EXPORT: Self
Still export / tilt video: 22 s chunks, pause from the 2nd consecutive failure (15 s doubling to 120 s, the desktop export’s schedule), retire after 5.
Sourcepub const INTERACTIVE: Self
pub const INTERACTIVE: Self
Interactive requests: 1.5 s chunks, short pauses (250 ms to 2 s), retire after 3.
Sourcepub fn backoff(&self, consecutive_failures: u32) -> Duration
pub fn backoff(&self, consecutive_failures: u32) -> Duration
The pause after consecutive_failures failed chunks in a row: zero below
Self::pause_after_failures, then backoff_initial doubling per further
failure, capped at backoff_max.