Skip to content

Load-balance

proxy-groups:
- name: "load-balance"
type: load-balance
proxies:
- ss1
- ss2
- vmess1
url: 'https://www.gstatic.com/generate_204'
interval: 300
#lazy: true
#strategy: consistent-hashing # or round-robin
# hash-key: in-user

Refer to Common Fields.

Load Balancing Strategies

  • round-robin will distribute all requests among different proxy nodes within the strategy group.

  • consistent-hashing will assign requests with the same target address to the same proxy node within the strategy group.

  • sticky-sessions: requests with the same source address and target address will be directed to the same proxy node within the strategy group, with a cache expiration of 10 minutes.

Selects what a hashing strategy derives its key from. Only takes effect when strategy is consistent-hashing or sticky-sessions

  • in-user pins on the authenticated inbound user name (the same field IN-USER rules match on). It does not vary with the target address, so a single task spanning multiple domains will not switch nodes or change egress IP halfway through; unauthenticated requests fall back to the strategy’s own key
  • When unset, behavior is exactly the same as before