Re:Kafka vs. Redpanda Performance – Do the claims add up?
by galeaspablo on Tuesday May 16, 2023 @05:18AM
(#35959382)
I love this question. Would be great to hear back from Confluent about this.
One safety mechanism I can think of is that the replicas will detect the leader is down and trigger leader election themselves. Or that upon restart the leader realized it restarted and triggers leader election in a way that B ends up as the leader. (not sure either is being done)
As I think about it more, even if there’s a solution I think I’ll stick to running Redpanda or running Kafka with fsync.
Re:Kafka vs. Redpanda Performance – Do the claims add up?
by rdtsc on Tuesday May 16, 2023 @09:15AM
(#35961440)
The solution seems to be fsync. It’s what it’s for. It’s very appealing to wave it away because it’s expensive.
The situation above may be just one example of data loss, but it seems there could be others when we gamble on hoping servers restart quickly enough, and don’t crash at the same time, etc.
Then, in Kafka, what if the leader dies with power failure and came back instantaneously?
i.e.: - There are 3 replicas A(L), B(F), C(F) (L = leader, F = follower) - 1) append a message to A - 2) B, C replicas the message. The message is committed - 3) A dies and came back instantaneously before zk.session.timeout elapsed (i.e. no leadership failover happens), with losing its log prefix due to no fsync
Then B, C truncates the log and the committed message could be lost? Or is there any additional safety mechanism for this scenario?