pub type PoolTuningConfig = PoolPressureMonitorConfig;Use PoolPressureMonitorConfig
Expand description
Deprecated alias for PoolPressureMonitorConfig.
This type was renamed in v2.0.1 to clarify that pool monitoring operates in
recommendation mode only — the pool is not resized at runtime.
Use PoolPressureMonitorConfig in new code.
Aliased Type§
pub struct PoolTuningConfig {
pub enabled: bool,
pub min_pool_size: u32,
pub max_pool_size: u32,
pub target_queue_depth: u32,
pub scale_up_step: u32,
pub scale_down_step: u32,
pub scale_down_idle_ratio: f64,
pub tuning_interval_ms: u64,
pub samples_before_action: u32,
}Fields§
§enabled: boolEnable adaptive pool sizing. Default: false.
min_pool_size: u32Minimum pool size. The tuner never shrinks below this value. Default: 5.
max_pool_size: u32Maximum pool size. The tuner never grows above this value. Default: 50.
target_queue_depth: u32Maximum acceptable queue depth before scaling up. Default: 3.
scale_up_step: u32Connections to add per scale-up step. Default: 5.
scale_down_step: u32Connections to remove per scale-down step. Default: 2.
scale_down_idle_ratio: f64Minimum idle ratio (idle / total) before considering a scale-down. Default: 0.5 (50% idle connections triggers potential shrink).
tuning_interval_ms: u64Polling interval in milliseconds. Default: 30 000 (30 s).
samples_before_action: u32Consecutive samples above threshold required before acting. Default: 3.