All Products
Search
Document Center

ApsaraMQ for Kafka:Rebalance partitions and redirect traffic

Last Updated:Jun 18, 2026

Rebalance partitions across a cluster or redirect traffic for a specific topic from the console to optimize disk utilization.

Background

Partition rebalancing

An uneven distribution of partitions across your topics can skew your cluster, leading to underutilized disk performance and capacity. The standard solution is to increase the topic partition count to a recommended multiple for the cluster. In production environments where you cannot immediately adjust partitions, use the partition rebalancing feature instead. It redistributes the partitions of all cloud storage topics as evenly as possible across all nodes.

Traffic redirection

If a cloud storage topic has high traffic and an uneven partition distribution, disk usage can spike on a specific node. Use the traffic redirection feature to move that topic's traffic to a node with lower disk usage.

Risks

To maintain cluster stability, partition rebalancing works on only one topic at a time. Traffic redirection for cloud storage topics completes in seconds but triggers clients to update metadata and reconnect. Ensure your clients can update metadata and reconnect automatically before you start. Data migration for local storage topics is slower—use caution when performing this operation on such topics.

Procedure

  1. Log on to the ApsaraMQ for Kafka console. In the left-side navigation pane, click Instances.

  2. In the top navigation bar, select the region where the instance that you want to manage resides.

  3. Configure partition rebalancing or traffic redirection.

    • Rebalance partitions for a cluster.

      1. On the Instances page, find the target instance and choose More > Partition Balancing in the Actions column.

      2. Carefully read the information in the dialog box and click OK.

    • Redirect traffic for a topic.

      1. On the Instances page, click the name of the target instance.

      2. In the navigation pane on the left, click Topics. On the page that appears, find the target topic and choose More > Traffic Redirection in the Actions column.

      3. Carefully read the information in the dialog box and click OK.