On this page
Kafka Improvement Proposal
KIP-226: dynamic broker configuration
KIP-226 lets you change many Kafka broker settings while the broker runs, without a restart. kafka-configs.sh can set a value for one broker or a default for the whole cluster, and the broker applies it at once. Certificates, thread pools, listeners and default topic settings are among the settings that became dynamic.
- Proposal
- KIP-226, Dynamic Broker Configuration
- Status
- Shipped Since Kafka 1.1 (2018).
- Area
- Cluster and operations
- Proposal page
- KIP-226 on the Apache Kafka wiki
Why it was needed
Before Kafka 1.1 every broker setting lived in server.properties and changing it meant a rolling restart. Renewing a TLS certificate, adding a listener or tuning thread counts on a large cluster took hours and moved leadership around each time.
What it changes
Each broker setting has an update mode: read-only (needs a restart), per-broker, or cluster-wide. Dynamic values are stored in the cluster metadata and take precedence in this order: per-broker value, cluster-wide default, server.properties, built-in default. Topic settings were already dynamic per topic; KIP-226 added dynamic cluster defaults for them.
How to use it
- Change one broker with kafka-configs.sh --bootstrap-server ... --entity-type brokers --entity-name 1 --alter --add-config log.cleaner.threads=2.
- Use --entity-default instead of --entity-name for a cluster-wide default, and --delete-config to remove an override.
- Check a setting's update mode in the broker config reference before relying on it.
Where it stands
Shipped in Kafka 1.1 and extended in later releases. With Eligible Leader Replicas on (KIP-966), min.insync.replicas can only be set cluster-wide or per topic, no longer per broker.
What comes next
Stable. Each release makes a few more settings dynamic.
See it in the simulator
- Change Kafka min.insync.replicas at runtime, no restart (Live config changes) Step 5: config_change: min.ISR 2 → 3 Open at this step: Change Kafka min.insync.replicas at runtime, no restart
- Change Kafka min.insync.replicas at runtime, no restart (Live config changes) Step 6: O3 rejected - ISR=2 < min.ISR=3 Open at this step: Change Kafka min.insync.replicas at runtime, no restart