Skip to main content

SoloPartitioner

Trait SoloPartitioner 

Source
pub trait SoloPartitioner: Send + Sync {
    // Required method
    fn partition_for_lane(&self, lane: &LaneId, config: &PartitionConfig) -> u16;
}
Expand description

Strategy for picking a solo execution’s partition from its lane id.

RFC-011 §5.6 defines the birthday-paradox traffic-amplification mitigation: solo execs hash their lane id to a flow partition with crc16, which can collide with a flow’s own partition. Operators that hit a persistent collision install a custom strategy at boot time via solo_partition_with instead of rebuilding ff-server.

The default impl Crc16SoloPartitioner matches the algorithm used by every other partition family. Replace only when a real collision surfaces via ff-server admin partition-collisions.

Required Methods§

Source

fn partition_for_lane(&self, lane: &LaneId, config: &PartitionConfig) -> u16

Return the partition index for a solo execution on the given lane.

Must return a value in 0..config.num_flow_partitions. Must be deterministic — the same (lane, config) always produces the same index (violated determinism → exec keys would route differently on each mint, breaking all cross-lookup invariants).

Implementors§