Skip to main content

Bandwidth-aware Load Distribution using Carrier Bandwidth Priority

The Raft transport protocol allows applications to influence how traffic is distributed across available carriers. By assigning priorities, users can express a preference for certain carriers while still benefiting from automatic fallback when bandwidth becomes constrained. This mechanism ensures that preferred carriers are used as much as possible, while lower-priority carriers are used only when needed to maintain throughput and service continuity.

How Bandwidth-aware Load Distribution Works

Raft continuously estimates the available bandwidth for each carrier based on its internal network model. Using this information, it distributes traffic according to the carrier priorities you have configured.

The distribution follows these principles:

  • Higher-priority carriers carry more load: Carriers with higher priority values receive a larger share of the traffic.
  • Equal-priority carriers share load: When two or more carriers share the same priority, they round-robin the data load within their respective bandwidth estimates.
  • Single-carrier operation when possible: If the highest-priority carrier has sufficient capacity, it will carry all traffic.
  • Automatic fallback when approaching saturation: As a high-priority carrier becomes saturated, Raft automatically begins routing traffic to the next-lower-priority carrier.
  • Optimized use of preferred links: Preferred carriers are used to their maximum potential before others are involved.

This model provides both optimal performance and robust fallback behavior without manual intervention.

Enabling Bandwidth-aware Load Distribution

To enable the feature, specify a carrier priority for each carrier used by the stream. Once priorities are configured, load distribution becomes active automatically.

Important: A higher numeric value means higher priority. All carriers must have a configured priority for this feature to be enabled.

Restoring Standard Round-robin Behavior

If you want to return to classic round-robin load sharing (that is, without bandwidth-aware distribution), simply remove the priority setting from all carriers.

Handling Over-capacity Flows

When bandwidth-aware load distribution is enabled, Raft may throttle traffic if the combined carrier capacity is lower than the offered load. Raft enforces throttling using a token-bucket drop policy at the stream input. This ensures that only data that the network can carry is accepted.

Impact on Applications

What happens next depends on the transport protocol used:

  • Protocols with built-in flow control (e.g., TCP, QUIC): Packet drops provide natural backpressure. The sender will automatically slow its rate to match the actual network capacity.

  • Protocols without flow control (e.g., UDP): The application must be able to adapt—for example, by reducing video bitrate when drops occur.

note

Applications that cannot react to dropped packets may experience degraded performance if sending at rates beyond the network's capacity.

Example

In the screenshot below, two Raft instances are configured such that:

  • Carrier 0 has a lower priority and automatically carries the overflow traffic that Carrier 1 cannot handle.
  • Carrier 1 has the highest priority and will carry as much traffic as possible until it becomes saturated.

Bandwidth-aware load distribution example

Returning to Round-robin Mode

To revert to normal round-robin load sharing, remove all carrier priorities. An example configuration is shown below:

Round-robin configuration example