concept replication in category kafka

appears as: replication
Kafka Streams in Action: Real-time apps and microservices with the Kafka Streams API

This is an excerpt from Manning's book Kafka Streams in Action: Real-time apps and microservices with the Kafka Streams API.

  • Instead of avoiding failure, embracing failure by using replication
  • Although storing data remotely may sound risky, because a server can go down, Kafka offers data redundancy. Data is replicated to one or more machines in the cluster as you write to one broker in Kafka (we’ll cover replication in an upcoming section).

    Kafka has the notion of leader and follower brokers. In Kafka, for each topic partition, one broker is chosen as the leader for the other brokers (the followers). One of the chief duties of the leader is to assign replication of topic partitions to the follower brokers. Just as Kafka allocates partitions for a topic across the cluster, Kafka also replicates the partitions across machines. Before we go into the details of how leaders, followers, and replication work, we need to discuss the technology Kafka uses to achieve this.