Skip to main content

validate_shuffle_sharding

Function validate_shuffle_sharding 

Source
pub fn validate_shuffle_sharding(
    shard_percent: Option<u32>,
    shard_min_backends: Option<u32>,
    shard_mode: Option<i32>,
) -> Result<(), &'static str>
Expand description

Validate a cluster’s shuffle-sharding knobs (sozu-proxy/sozu#524).

shard_percent turns sharding on and must lie in 1..=100; shard_min_backends must be at least 2, the smallest shard; and shard_min_backends or shard_mode without shard_percent is refused rather than silently inert. Called at config load and on every AddCluster.