March Docs

WorkDispatch

WorkDispatch: capacity-aware RPC routing (P4 L6).

Routes function calls to the cluster node with the most spare capacity using the power-of-two-choices algorithm. Falls back to local execution when no peer is healthier by DISPATCH_THRESHOLD_MILLI (200 millis = 20% of a core) or when all load readings are stale.

Load readings decay: a NodeLoad sampled_at older than LOAD_STALE_MS (10s) is excluded from routing candidates.

ConsistentHash affinity: dispatch_affine routes by key hash for data-local work (same key always hits the same shard node unless it's down, in which case it falls back to load-aware dispatch).

Functions

fndispatchdispatch(#
fndispatch_affinedispatch_affine(#
fnpick_dispatch_targetpick_dispatch_target(#
fnpick_twopick_two(#