---
url: /configuration/outbound/loadbalance.md
description: 按站点、轮次或会话策略分摊流的出站分组
---

# loadbalance

把流分摊到多个成员。

```yaml check
outbounds:
  direct:
    type: direct
  proxy:
    type: socks
    server: proxy.example:1080
  spread:
    type: loadbalance
    outbounds: [proxy, direct]
    strategy: consistent_hashing

route:
  final: spread

dns:
  servers:
    default: {type: udp, address: 127.0.0.1:53}
  final: default
```

## 字段

### type

* 类型：字符串。
* 必填：是，第一项。
* 取值：`loadbalance`。

### strategy

* 类型：字符串枚举。
* 默认：`consistent_hashing`。
* 取值：`consistent_hashing`、`round_robin`、`sticky_sessions`。

## 说明

`consistent_hashing` 按目的站点的稳定哈希选成员；`round_robin` 轮流；`sticky_sessions` 尽量把同一客户端的同一站点留在同一成员。成员和探测字段见[公共分组字段](/configuration/outbound/#公共分组字段)；默认每 `5m` 探测一次。

## 相关

* [出站总览](/configuration/outbound/)
