Apache Kafka Practice

Question: 1 / 400

What is the recommended minimum number of replicas in Kafka?

2 replicas

3 replicas

The recommended minimum number of replicas in Apache Kafka is three. This recommendation is primarily based on the need for durability and availability in a distributed system.

Having three replicas provides a balance between fault tolerance and resource utilization. In the event that one broker fails, the remaining two replicas can still ensure that data remains available. This setup allows for one replica to be lost without sacrificing data availability, as at least one more replica exists to take over the role as the leader for that partition. Additionally, if a broker is to be taken down for maintenance or a crash occurs, the additional replicas allow for continued operations without significant data loss or downtime.

Configuring fewer than three replicas, such as only two, creates a vulnerability. If one broker goes down, there is no redundancy left, leading to potential data loss or downtime for that partition until the broker is back online. With three replicas, the system can sustain one loss while still maintaining two copies of the data, leading to greater resilience against node failures.

Ultimately, using three replicas strikes a good compromise for most use cases in Kafka, ensuring you have both high availability and durability while not overcommitting resources.

Get further explanation with Examzify DeepDiveBeta

4 replicas

5 replicas

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy