Updated on 2024-11-29 GMT+08:00

Balancing Redis Cluster Data

Scenario

Data in Redis clusters may not be evenly distributed if an expansion fails or some instances are offline. You can use the balance function provided by the system to implement automatic balancing of cluster data.

Impact on the System

Data balancing severely affects the service performance of the Redis cluster, increases the data loss risk to some extent, and affects data reliability.

You are advised to perform this operation only in off-peak hours or when you ensure that there is no service access to Redis clusters after an alarm indicating data imbalance is generated. Before you perform balancing, check the following:

  • Check the Redis alarm information. Ensure that there are no alarms related to the cluster whose data needs to be balanced or instances in the cluster (excluding the alarms "Redis Instance Memory Usage Exceeds the Threshold", "Uneven Slot Distribution of Redis Master Instances", and "Redis Slot Migration Exception").
  • Choose Cluster > Name of the desired cluster > Services > Redis. In the Alarm and Event History area of the Dashboard tab page that is displayed, check whether active/standby switchovers frequently occur in the current Redis cluster. If yes, data balancing is not recommended.
  • Check whether RDB persistence has been enabled for the Redis cluster whose data needs to be balanced. If not, data balancing is not recommended.

Procedure

  1. You have logged in to FusionInsight Manager.
  2. Choose Cluster > Name of the desired cluster > Services > Redis > Redis Manager.
  3. Click Balance in the Operation column of the target Redis cluster.
  4. In Balance Redis Cluster, enter the system administrator password and click OK.

    • If an instance is not in position and cannot be restored, perform capacity reduction to remove the instance and its master instance.
    • During the cluster scale-out, scale-in, or balance operation, make sure that the cluster load is small or the cluster does not provide external services to prevent operation failure.