Handling Data Loss.

How Kafka handles Data Loss — Replication and In-Sync-Replica (ISR)

Learn how Kafka handles data loss in the event of failure.

How Kafka handle data loss?

Scenario — Broker-1 failure

Broker-1 is down.

In-Sync Replica (ISR)

We will look at replication values, who is the leader, and in-sync replica

list all topics

.\bin\windows\kafka-topics.bat --zookeeper localhost:2181 --describe
you can see the partition is 50
you can see 2 topics are created.

List data of one topic

.\bin\windows\kafka-topics.bat --zookeeper localhost:2181 --describe --topic test-topic-replicated

Replicas (see command prompt)

In-sync replica

Making broker down.

shutdown completed.

let us run again to check what happens

.\bin\windows\kafka-topics.bat --zookeeper localhost:2181 --describe --topic test-topic-replicated

Software Engineer at HCL | Technical Content Writing | Follow me on LinkedIn https://www.linkedin.com/in/sagarkudu/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store