粒度的理解和应用:
粒度,就是指通过哪个层,哪个角度,哪个单位来定义或者分析的一个思维;
比如RocketMq的复制是topic级别的,kafka也是topic级别的;
但是RocketMq的复制处理中,Leader和follower是broker粒度的,而kafka的leader和follwer是分区粒度的

The unit of replication is the topic partition. Under non-failure conditions, each partition in Kafka has
a single leader and zero or more followers. The total number of replicas including the leader constitute
the replication factor. All reads and writes go to the leader of the partition. Typically, there are many
more partitions than brokers and the leaders are evenly distributed among brokers. The logs on the followers are
identical to the leader’s log—all have the same offsets
and messages in the same order (though, of course, at any given time the leader may have a few as-yet unreplicated messages at the end of its log).
参考:http://kafka.apache.org/documentation/#majordesignelements

Logo

Kafka开源项目指南提供详尽教程,助开发者掌握其架构、配置和使用,实现高效数据流管理和实时处理。它高性能、可扩展,适合日志收集和实时数据处理,通过持久化保障数据安全,是企业大数据生态系统的核心。

更多推荐