kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neha Narkhede <neha.narkh...@gmail.com>
Subject Re: interesting paper on log replication
Date Tue, 16 Apr 2013 18:14:12 GMT
More notable differences from Kafka as far as log replication protocol
is concerned -

- Raft considers log entries as committed as soon as it is
acknowledged by a majority of the servers in a cluster. Compare this
to Kafka where we have the notion of "in-sync followers" that are
required to ack every batch of log entries in order for the leader to
commit those.

- Raft uses the election voting mechanism to select a new  leader
whose log is as “up-to-date” as possible. Compare this to Kafka where
we can pick ANY of the "in-sync followers" as the next leader, we
typically pick the first one in the list. We do not try to pick the
"in-sync follower" with the largest log for simplicity and fewer RPCs.

- In Raft, when the follower's log diverts from the leader's (in the
presence of multiple failures), the leader-follower RPC truncates the
follower's log up to the diversion point and then replicate the rest
of the leader's log. This ensures that follower's log is identical to
that of the leader's in such situations. Compare this to Kafka, where
we allow the logs to divert and don't reconcile perfectly.

Thanks,
Neha

On Sun, Apr 14, 2013 at 9:42 PM, Jun Rao <junrao@gmail.com> wrote:
> Thanks for the link. This paper provides an alternative, but similar
> implementation to that in Zookeeper. The key difference seems to be that
> the former supports membership reconfiguration.
>
> Kafka replication is simpler because it separates the leader election part
> from log replication. Such separation has a few benefits: (1) the leader
> election part is easier to implement by leveraging a consensus system (e.g.
> Zookeeper); (2) the log format is simpler since the log itself is not used
> for leader election; (3) the replication factor for the log is decoupled
> from the number of parties required for leader election (e.g., in Kafka we
> can choose a replication factor of 2 for the log while using an ensemble of
> 5 for a Zookeeper cluster).
>
> Both Rafe and Zookeeper are solving a harder problem than Kafka replication
> because they have no consensus service to rely upon for their own leader
> election since they are implementing a consensus service.
>
> Thanks,
>
> Jun
>
>
> On Tue, Apr 9, 2013 at 10:34 PM, Jay Kreps <jay.kreps@gmail.com> wrote:
>
>> Very similar in design to kafka replication
>> https://ramcloud.stanford.edu/wiki/download/attachments/11370504/raft.pdf
>>
>> -Jay
>>

Mime
View raw message