Traefik Mesh TrafficSplit weight normalization produces different routing in test vs production
0 reputation · 30 Apr 2024, 12:02 UTC
Goal: achieve identical traffic percentages for each backend defined in a TrafficSplit resource when the same weight values are applied across different cluster environments.
Constraint: Traefik Mesh v1.2.x normalizes weights using integer division, while v1.4.x uses floating‑point arithmetic followed by nearest‑integer rounding, which can shift the effective distribution when the sum of weights does not equal 100. The current documentation does not explicitly note this version‑dependent behavior, leaving users uncertain about the exact routing outcome.
What normalization algorithm does each controller version apply to the weight field? Which weight sums produce deterministic results across both versions? Are there recommended practices to guarantee consistent routing without modifying the weight values?