【Kafka十二】关于Kafka是一个Commit Log Service

Kafka is a distributed, partitioned, replicated commit log service.这里的commit log如何理解?

 

A message is considered "committed" when all in sync replicas for that partition have applied it to their log. Only committed messages are ever given out to the consumer. This means that the consumer need not worry about potentially seeing a message that could be lost if the leader fails. Producers, on the other hand, have the option of either waiting for the message to be committed or not, depending on their preference for tradeoff between latency and durability. This preference is controlled by the request.required.acks setting that the producer uses.

 

The guarantee that Kafka offers is that a committed message will not be lost, as long as there is at least one in sync replica alive, at all times.

Kafka will remain available in the presence of node failures after a short fail-over period, but may not remain available in the presence of network partitions.

 

Kafka是一个基于副本的高可靠的消息系统,在消息可用前,Kafka保证消息已经提交到足够的副本中(这个在min.insync.replicas中配置),这种逻辑类似于Zookeeper的写操作(Leader写,然后指定个数的Follower完成同步)。

 

Kafka不同于Zookeeper,Zookeeper是可以在网络发生分区后,能够继续工作

 

你可能感兴趣的:(service)