Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add rebalance v2alpha2 #875

Merged
merged 3 commits into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 37 additions & 2 deletions docs/en_US/tasks/configure-emqx-rebalance.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The value of rebalancing mainly has the following two points:
- **Improve system scalability**: Due to the persistent nature of MQTT connections, connections to the original nodes will not automatically migrate to the new nodes when the cluster scales. To address this, you can use the load rebalancing feature to smoothly transfer connections from overloaded nodes to newly-added ones. This process ensures a more balanced distribution of load across the entire cluster and enhances throughput, response speed, and resource utilization rate.
- **Reduce O&M costs**: For clusters with unevenly distributed loads, where some nodes are overloaded while others remain idle, you can use the load rebalancing feature to automatically adjust the load within the cluster. This helps achieve a more balanced distribution of work and reduces operation and maintenance costs.

For EMQX cluster load rebalancing, please refer to the document: [Rebalancing](https://docs.emqx.com/en/enterprise/v4.4/advanced/rebalancing.html#rebalancing).
For EMQX cluster load rebalancing, please refer to the document: [Rebalancing](https://docs.emqx.com/en/enterprise/v5.1/deploy/cluster/rebalancing.html#%E9%9B%86%E7%BE%A4%E8%B4%9F%E8%BD%BD%E9%87%8D%E5%B9%B3%E8%A1%A1)

:::tip

Expand All @@ -25,8 +25,12 @@ The cluster load rebalancing requirements EMQX Enterprise must be greater than o

The corresponding CRD of the cluster rebalancing in EMQX Operator is `Rebalance`, and its example is as follows:

:::: tabs type:card

::: tab EMQX Enterprise 5.x

```yaml
apiVersion: apps.emqx.io/v1beta4
apiVersion: apps.emqx.io/v2alpha2
kind: Rebalance
metadata:
name: rebalance-sample
Expand All @@ -43,8 +47,38 @@ spec:
relSessThreshold: "1.1"
```

> For Rebalance configuration, please refer to the document: [Rebalance reference](../reference/v2alpha2-reference.md#rebalancestrategy).

:::

::: tab EMQX Enterprise 4.x

```yaml
apiVersion: apps.emqx.io/v2alpha2
kind: Rebalance
metadata:
name: rebalance-sample
spec:
instanceName: emqx-ee
instanceKind: EmqxEnterprise
rebalanceStrategy:
connEvictRate: 10
sessEvictRate: 10
waitTakeover: 10
waitHealthCheck: 10
absConnThreshold: 100
absSessThreshold: 100
relConnThreshold: "1.1"
relSessThreshold: "1.1"
```

> For Rebalance configuration, please refer to the document: [Rebalance reference](../reference/v1beta4-reference.md#rebalancestrategy).


:::

::::

## Test Load Rebalancing

### Cluster Load Distribution Before Rebalancing
Expand All @@ -64,6 +98,7 @@ metadata:
name: rebalance-sample
spec:
instanceName: emqx-ee
instanceKind: EmqxEnterprise
rebalanceStrategy:
connEvictRate: 10
sessEvictRate: 10
Expand Down
40 changes: 38 additions & 2 deletions docs/zh_CN/tasks/configure-emqx-rebalance.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

- **降低运维成本**:如果系统中某些节点负载过高或过低,需要对这些节点进行手动调整,而通过重平衡,可以自动调整节点的负载,降低运维成本。

关于 EMQX 集群负载重平衡可以参考文档:[重平衡](https://docs.emqx.com/zh/enterprise/v4.4/advanced/rebalancing.html#%E9%87%8D%E5%B9%B3%E8%A1%A1)
关于 EMQX 集群负载重平衡可以参考文档:[重平衡](https://docs.emqx.com/zh/enterprise/v5.1/deploy/cluster/rebalancing.html#%E9%9B%86%E7%BE%A4%E8%B4%9F%E8%BD%BD%E9%87%8D%E5%B9%B3%E8%A1%A1)

:::tip

Expand All @@ -26,8 +26,12 @@

集群重平衡在 EMQX Operator 里面对应的 CRD 为 `Rebalance`,其示例如下所示:

:::: tabs type:card

::: tab EMQX Enterprise 5.x

```yaml
apiVersion: apps.emqx.io/v1beta4
apiVersion: apps.emqx.io/v2alpha2
kind: Rebalance
metadata:
name: rebalance-sample
Expand All @@ -44,8 +48,39 @@ spec:
relSessThreshold: "1.1"
```

> 关于 Rebalance 配置可以参考文档:[Rebalance reference](../reference/v2alpha2-reference.md#rebalancestrategy)。

:::

::: tab EMQX Enterprise 4.x

```yaml
apiVersion: apps.emqx.io/v2alpha2
kind: Rebalance
metadata:
name: rebalance-sample
spec:
instanceName: emqx-ee
instanceKind: EmqxEnterprise
rebalanceStrategy:
connEvictRate: 10
sessEvictRate: 10
waitTakeover: 10
waitHealthCheck: 10
absConnThreshold: 100
absSessThreshold: 100
relConnThreshold: "1.1"
relSessThreshold: "1.1"
```

> 关于 Rebalance 配置可以参考文档:[Rebalance reference](../reference/v1beta4-reference.md#rebalancestrategy)。

:::

::::



## 测试集群负载重平衡

### 集群负载情况(重平衡前)
Expand All @@ -65,6 +100,7 @@ metadata:
name: rebalance-sample
spec:
instanceName: emqx-ee
instanceKind: EmqxEnterprise
rebalanceStrategy:
connEvictRate: 10
sessEvictRate: 10
Expand Down