priorityStrategy

Version

Selects a node by ascending priority, then health. Nodes are grouped by their priority value (lower means higher priority); the first group that contains at least one node currently up is used, and if it holds several up nodes one is picked at random. Lower-priority groups are only used once all higher-priority nodes are down. If no node is up anywhere, it falls back to the first node in priority order. Set each node's priority attribute to control the order.

Example Configuration

balancer:
priorityStrategy: {}
clusters:
- nodes:
- host: primary.predic8.com
port: 8080
priority: 1
- host: standby.predic8.com
port: 8080
priority: 2
balancer:
   priorityStrategy: {}
   clusters:
     - nodes:
         - host: primary.predic8.com
           port: 8080
           priority: 1
         - host: standby.predic8.com
           port: 8080
           priority: 2

Syntax

priorityStrategy: {}
priorityStrategy: {}

Can be used in