You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
KAFKA-19048: Minimal Movement Replica Balancing algorithm
The new replica rebalancing strategy aims to achieve the following objectives:
1. Minimal Movement: Minimize the number of replica relocations during rebalancing.
2. Replica Balancing: Ensure that replicas are evenly distributed across brokers.
3. Anti-Affinity Support: Support rack-aware allocation when enabled.
4. Leader Balancing: Distribute leader replicas evenly across brokers.
5. ISR Order Optimization: Optimize adjacency relationships to prevent failover traffic concentration in case of broker failures.
<p>If the number of replicas assigned to a rack is not a multiple of the number of nodes in that rack, some nodes will host one additional replica compared to others.</p>
80
+
* <p>If the number of replicas assigned to a rack is not a multiple of the number of nodes in that rack, some nodes will host one additional replica compared to others.</p>
64
81
* <li><b>Rack Count = Replication Factor:</b>
65
82
* <ul>
66
83
* <li>If all racks contain an equal number of nodes, each node will have the same number of replicas.</li>
@@ -113,7 +130,7 @@ public class MinimalMovementReplicaBalancer {
113
130
*/
114
131
privatefinalintreplicationFactor;
115
132
116
-
privatefinalList<BrokerMetadata> brokerMetadatas;
133
+
privatefinalList<UsableBroker> usableBrokers;
117
134
118
135
/**
119
136
* Total number of replicas across all partitions (calculated as partitionCount * replicationFactor).
@@ -177,7 +194,7 @@ public class MinimalMovementReplicaBalancer {
0 commit comments