Each partition has a 'preferred' leader — the first replica in its replica assignment list. After broker restarts, leadership can become unbalanced. Preferred leader election (PLE) moves leadership back to the original brokers, ensuring even load distribution. Kafka can do this automatically (auto.leader.rebalance.enable=true) or manually via CLI.
Key configuration
auto.leader.rebalance.enable=true — automatic rebalancing
leader.imbalance.per.broker.percentage=10 — trigger threshold