emqx/apps/emqx_node_rebalance
Ilya Averyanov 500d4fedda fix(rebalance): fix start order of rebalance applications 2024-04-12 15:58:57 +03:00
..
etc chore: remove unused conf comments 2023-05-22 14:01:49 +08:00
include chore: update copyright-year 2024-02-23 08:21:06 +01:00
src fix(rebalance): fix start order of rebalance applications 2024-04-12 15:58:57 +03:00
test fix(rebalance): fix start order of rebalance applications 2024-04-12 15:58:57 +03:00
BSL.txt chore: update BSL license change date 2024-01-29 16:47:31 +01:00
README.md chore(rebalance): move apps from lib-ee, add READMEs 2023-05-09 20:51:24 +05:00
rebar.config style: erlfmt all `rebar.config` files and `bin/nodetool` 2023-12-29 09:08:03 +08:00

README.md

EMQX Node Rebalance

emqx_node_rebalance is a part of the node evacuation/node rebalance feature in EMQX. It implements high-level scenarios for node evacuation and rebalancing.

Application Responsibilities

emqx_node_rebalance application's core concept is a rebalance coordinator. Rebalance сoordinator is an entity that implements the rebalancing logic and orchestrates the rebalancing process. In particular, it:

  • Enables/Disables Eviction Agent on nodes.
  • Sends connection/session eviction commands to Eviction Agents according to the evacuation logic.

We have two implementations of the rebalance coordinator:

  • emqx_node_rebalance - a coordinator that implements node rebalancing;
  • emqx_node_rebalance_evacuation - a coordinator that implements node evacuation.

EMQX Integration

emqx_node_rebalance is a high-level application that is loosely coupled with the rest of the system. It uses Eviction Agent to perform the required operations.

User Facing API

The application provides API (CLI and HTTP) to perform the following operations:

  • Start/Stop rebalancing across a set of nodes or the whole cluster;
  • Start/Stop evacuation of a node;
  • Get the current rebalancing status of a local node.
  • Get the current rebalancing status of the whole cluster.

Also, an HTTP endpoint is provided for liveness probes.

Documentation

The rebalancing concept is described in the corresponding EIP.

Contributing

Please see our contributing.md.