Octo Router logoOctoRouter
Routing

Round Robin

Distribute requests sequentially across a set of healthy providers.

Round Robin Routing

Round Robin is a provider-centric strategy that cycles through your healthy providers in a fixed order. It ensures an even distribution of requests across your infrastructure, assuming all providers are healthy.

Configuration

To enable round-robin routing, set your strategy to round-robin.

routing:
  strategy: "round-robin"

How it Works

  1. Circular Queue: Octo Router maintains an internal pointer to the "next" provider in the list.
  2. Selection: For each new request, the router picks the next provider in sequence.
  3. Health Awareness: If a provider's Circuit Breaker is open, the router automatically skips it and moves to the next one in the queue.

Interaction with Semantic Policies

Round Robin works with Semantic Policies by operating on the filtered set:

  1. Filtering: The semantic policy narrows down the providers based on intent (e.g., only "fast-chat" providers).
  2. Sequential Rotation: The router then performs its round-robin cycle only among that subset of allowed providers.

Summary: Round Robin vs Others

FeatureRound RobinWeighted StrategyLatency-Based
Primary UnitProviderProviderProvider
LogicSequential RotationPercentage distributionFastest Response
Model ChoiceUses provider's defaultUses provider's defaultUses provider's default
Best ForEven load balancingTesting specific ratiosPerformance optimization

On this page