jackyfkc.github.io

教土豆学计算机

Architecture

Kafka Cluster 来源: Kafka 0.8.1 Official Document

Design principles

Simple storage

Each partition of a topic corresponds to a logical log. Physically, a log is implemented as a set of segment file of approximately the same size.

For better performance, Kafka flush the segment files to disk ony after a configurable number of messages have been published or a certain amount of time has elapsed.

A message is addressed by a log offset.

Efficient transfer

Stateless broker

In Kafka, the information about how much each consumer has consumed is not maintained by the broker, but by the consumer itself.

Guarantees

At a high-level Kafka gives the following guarantees: