Skip to the content.

Load Balancing and Failover

Skupper V2 provides two mechanisms for controlling traffic distribution. The official docs recommend MultiKeyListener as the preferred approach.

Approach 1: MultiKeyListener (Preferred)

Per-service, explicit control. See MultiKeyListener.

Global, implicit control via the cost field on Link resources.

apiVersion: skupper.io/v2alpha1
kind: Link
metadata:
  name: link-to-backup
spec:
  cost: 99999    # Very high = failover only
Rule Detail
Default cost 1. Local workloads have implicit cost 0.
Multi-hop Path cost = sum of all link costs along the path
Threshold behavior Traffic flows on lowest-cost path until open connections exceed the cost of an alternative path, then spills over
Distribution Statistical, not round robin
Scope Applies to ALL services on a link — cannot be set per-service
Single path When only one path exists, traffic flows regardless of cost
Failover If a target becomes unavailable, traffic moves to remaining path regardless of cost

Set backup link cost very high:

Limitations

Comparison

Aspect Link Cost MultiKeyListener
Granularity Per-link (global) Per-service
Control Implicit (threshold-based) Explicit (weights/priority)
Predictability Depends on connection count Deterministic ratios
Configuration On Link resource On MultiKeyListener resource
Docs recommendation “Alternative” “Preferred”