Question: 1 / 50

What condition leads to a replica being considered out of sync?

If it does not contact the leader in 5 seconds

If it is behind in fetching messages for over 10 seconds

A replica is considered out of sync primarily when it is not able to keep up with the leader in terms of message fetching. This situation occurs when the replica falls behind in the log by a significant amount of time, specifically over a defined threshold, which in this case is over 10 seconds. The rationale behind setting such a threshold is to ensure that replicas remain consistent with the leader's state; if a replica lags too far behind, it may not be able to rejoin the leader efficiently and could risk data loss during failover scenarios. Keeping replicas synchronized with the leader is essential in maintaining data integrity and availability within the Kafka ecosystem. Replicas must not only be current with the leader's state but also be capable of quickly catching up in case of temporary disconnections or other interruptions. This is a critical aspect of Kafka’s design to provide high throughput and fault tolerance. Other conditions, such as not contacting the leader within a time frame, leader crashes, or not sending heartbeats to Zookeeper, may affect the overall operation and coordination of the replicas. However, they do not specifically address the primary measure of synchronization concerning message fetching delays, making the condition of being behind in fetching messages the most relevant for identifying an out-of-sync replica in the

If the leader crashes

If it does not send a heartbeat to Zookeeper

Next

Report this question