emqx/apps/emqx_eviction_agent
Andrew Mayorov d26995a2aa
Merge pull request #11524 from keynslug/ft/EMQX-10713/unified-route-tab
feat(router): add routing storage schema with 2 tables
2023-09-05 12:38:00 +04:00
..
etc chore: remove unused conf comments 2023-05-22 14:01:49 +08:00
src feat: cluster purge (r5.2) 2023-09-04 09:15:28 -03:00
test Merge pull request #11524 from keynslug/ft/EMQX-10713/unified-route-tab 2023-09-05 12:38:00 +04:00
BSL.txt chore(rebalance): move apps from lib-ee, add READMEs 2023-05-09 20:51:24 +05:00
README.md chore(rebalance): move apps from lib-ee, add READMEs 2023-05-09 20:51:24 +05:00
rebar.config chore(rebalance): move apps from lib-ee, add READMEs 2023-05-09 20:51:24 +05:00

EMQX Eviction Agent

emqx_eviction_agent is a part of the node evacuation/node rebalance feature in EMQX. It is a low-level application that encapsulates working with actual MQTT connections.

Application Responsibilities

emqx_eviction_agent application:

  • Blocks incoming connection to the node it is running on.
  • Serves as a facade for connection/session eviction operations.
  • Reports blocking status via HTTP API.

The emqx_eviction_agent is relatively passive and has no eviction/rebalancing logic. It allows emqx_node_rebalance to perform eviction/rebalancing operations using high-level API, without having to deal with MQTT connections directly.

EMQX Integration

emqx_eviction_agent interacts with the following EMQX components:

  • emqx_cm - to get the list of active MQTT connections;
  • emqx_hooks subsystem - to block/unblock incoming connections;
  • emqx_channel and the corresponding connection modules to perform the eviction.

User Facing API

The application provided a very simple API (CLI and HTTP) to inspect the current blocking status.

Documentation

The rebalancing concept is described in the corresponding EIP.

Contributing

Please see our contributing.md.