<p>I 'm setting up a Kafka cluster with 3 nodes on Kubernetes. If a node crashes, should I auto-reassgin partitions by scripts?
Thank you very much.</p>

luanht2
<p>As @asolanki mentioned, Kafka will automatically failover leaders to brokers that are alive. I just wanted to note that this is not called a reassignment - it's called a <strong><em>leader failover</em></strong>.</p>

<p>In Kafka, a partition is <strong>assigned</strong> to N number of <strong>replicas</strong> <em>(N=replication factor)</em>. The in-sync replica set (ISR) is the set of replicas that are in-sync (alive and have the latest data). The ISR naturally follows the replica set.</p>

<p>A reassignment is when you change the <strong>replicas</strong> that this partition should be hosted on. I think an example would make this clear:</p>

<p>A simple <strong><em>failover</em></strong>:</p>

<pre><code>1. partition=0 is on brokers (replicas) replicas=[1,2,3], isr=[1,2,3]. Broker 1 is the leader
2. broker 1 fails. Kafka automatically fails over to another broker
3. replicas=[1,2,3], isr=[2,3] (broker 1 is dead)
</code></pre>

<p>A simple <strong><em>reassignment</em></strong>:</p>

<pre><code>1. partition=0 is on brokers (replicas) replicas=[1,2,3], isr=[1,2,3]
2. We reassign partition=0 to replicas=[4,5,6]
3. replicas=[4,5,6], isr=[4,5,6]
</code></pre>
