Kafka通过分区(partitioning)、添加broker和consumer以及调优来扩展处理大规模吞吐量(每秒数百万事件)。理解Kafka如何扩展对于大容量部署至关重要。
扩展杠杆
✓ PARTITIONS → the primary scaling unit: more partitions → more parallelism (producer and
consumer) → distribute data and load across brokers and consumers
✓ BROKERS → add brokers to the cluster → more storage, throughput, and capacity (spread
partitions across more machines)
✓ CONSUMERS → add consumers to a group (up to partition count) → parallel consumption
✓ PRODUCERS → batching, compression, multiple producers → high write throughput
→ Kafka scales HORIZONTALLY (add partitions/brokers/consumers)
