Dome Systems

Pools

Routing strategies, failover limits, pool resolution order, and match_when dialect

This page lists routing strategies, failover limits, resolution order, and the match_when predicate dialect.

Refer to Pools concept for how routing works. Configure on Pools.

Routing strategies

StrategyPrimary selectionMember fields it uses
priority_weightedChooses by weight from the lowest priority tierPriority and weight
round_robinRotates through all members in orderNeither
least_loadedChooses the member with the fewest in-flight requests and breaks ties randomlyNeither
most_quota_remainingChooses the member with the most remaining per-model cost-quota headroom; unmetered members serve lastNeither

strategy_scope: workspace shares round-robin, least-loaded, and most_quota_remaining tiebreak state across agents; caller tracks per agent. Priority-weighted routing ignores strategy_scope. For most_quota_remaining, scope only affects the tiebreak rotation — primary ordering always follows remaining headroom.

most_quota_remaining reads the same cost-quota signal that gates routing. Exhausted members are locked out first by the quota barrier; this strategy only orders the survivors. With no per-model quotas configured, every member ties and the strategy degrades to round-robin. Meter every member for the ordering to have effect.

Failover

ValueRuntime behavior
No limit or allTry every eligible member until one succeeds
0Try only the primary
NTry the primary and up to N additional members

Authorization and streaming failover rules are on Pools.

Automatic pool selection

Use a match_when rule to select a pool from request attributes when the request does not name a pool directly. This selects the pool; its routing strategy and failover settings then select a member inside that pool.

Dome resolves a request's model value in this order:

  1. A pool with that exact name
  2. A direct model connection with that exact name
  3. A direct connection whose upstream model identifier matches
  4. The first pool in the configured order whose match_when predicate matches
  5. The workspace default pool

Exact names beat conditional routes. When more than one match_when rule matches, the first pool in the configured pool order wins. Reorder pools to change that precedence.

Match rule syntax

Enter one JSON predicate. By default, every condition in the object must match. An empty rule does not select the pool automatically.

Route long prompts to this pool
{
  "prompt_tokens": { "gt": 100000 }
}
Route requests to a versioned endpoint
{
  "endpoint": { "prefix": "/v1/enterprise/" }
}

match_when accepts these request attributes:

InputSupported matching
prompt_tokensEstimated prompt size, characters ÷ 4, with numeric gt, lt, and eq
requested_max_tokens, tool_countNumeric gt, lt, and eq
endpoint and header.<name>Equality, in, prefix, suffix, and RE2 regex
principal.metadata.<key>String or numeric matching
principal.act_as.sub, .email, and .claims.<key>String or numeric matching
principal.act_as.roles and .groupscontains, containsAny, and containsAll
Nested predicatesany, all, and not

Use any, all, or not to combine conditions differently:

Route requests that meet either condition
{
  "any": [
    { "prompt_tokens": { "gt": 100000 } },
    { "endpoint": { "prefix": "/v1/batch/" } }
  ]
}

An unknown condition, missing value, or unverified act-as attribute never matches. Automatic pool selection does not replace authorization.

Next steps

Create pools and attach them to Gateways:

  • Pools concept for members, routing, and reachability
  • Pools to create pools, manage members, and attach Gateways
  • Models reference for provider and credential catalogs
  • LLM gateway concept for dispatch on the wire

On this page

Was this page helpful?