Skip to main content
WuKongIM supports dynamic scaling in Linux environments, allowing flexible adjustment of cluster size based on business requirements.

Single Node Mode Scaling

Description

The previously deployed single node mode now needs to be scaled to multiple servers. Here we use two servers as an example to explain how to scale. Assume there are two servers with the following information: node1 is the originally deployed single node, now we want to scale to two servers, node2 is the newly added node.
The following file contents are set with assumed server IPs, just replace the corresponding IPs with your own.

Preparation

You need to deploy nginx (recommended version 1.27.0) on the node1 node for load balancing.

Deploy WuKongIM

Deploy WuKongIM on the node2 node. The process is the same as single node mode, so it won’t be repeated here. For details: Refer to the WuKongIM deployment tutorial Single Node Mode.

Configure WuKongIM

Modify the configuration file wk.yaml on node2, complete content as follows:
Modify the configuration file wk.yaml on node1, complete content as follows:

Configure nginx

Restart

Finally, restart nginx on node1 and WuKongIM on both node1 and node2.

Verification

Log into the management system, in node management you can see if the newly added node’s status is “Joined”. If so, scaling is successful.

Multi-Node Scaling Mode

Description

Nodes originally deployed using multi-node mode can expand cluster size by adding nodes. This document describes how to expand cluster size by adding nodes. Assume the newly added node information is as follows:

Install WuKongIM

On node4:

1. Download Executable File

2. Modify Executable File Permissions

Configuration

Configure WuKongIM

Create configuration file wk.yaml on node4 with the following content:

Configure nginx

Configure nginx on the original node1 node, add load balancing configuration for node4.
Remember to restart nginx for the configuration to take effect:

Start WuKongIM

Verification

Log into the management system, in node management you can see if the newly added node’s status is “Joined”. If so, scaling is successful.

Next Steps

Upgrade Guide

Learn about version upgrades

Monitoring Setup

Set up monitoring for scaled cluster

Multi-Node Deployment

Learn about multi-node deployment

Server Configuration

Configure advanced settings