Skip to content
Kafka Is FunProgress

IntermediateOperations

How do you safely perform a rolling upgrade of a Kafka cluster?

Reference answer

Safe rolling upgrade procedure: 1) Check release notes for configuration/API changes. 2) Update broker configs if needed (often can be done live with kafka-configs.sh). 3) Stop broker N with SIGTERM (graceful shutdown: controlled.shutdown.enable=true allows in-flight requests to complete). 4) Wait for UnderReplicatedPartitions=0 before proceeding. 5) Upgrade broker N's Kafka binary. 6) Start broker N. 7) Wait for it to rejoin ISR and URP=0 again. 8) Repeat for each broker. Never restart multiple brokers simultaneously if RF=3, minISR=2.

Expected key concepts: rolling upgrade, SIGTERM, controlled.shutdown, UnderReplicatedPartitions, ISR, binary, rejoin, RF=3, minISR=2, sequential