Partition เป็นหัวใจของการออกแบบ Kafka — มันทำให้เกิด การทำงานแบบขนานและการขยายขนาด (กระจายข้อมูลและการบริโภค) ในขณะที่ให้ การรับประกันลำดับภายในแต่ละ partition การเข้าใจ partition เป็นกุญแจสำคัญต่อการเข้าใจว่า Kafka ขยายขนาดและจัดลำดับ event อย่างไร
partition ทำให้เกิดการทำงานแบบขนานและการขยายขนาด
A topic is split into multiple PARTITIONS, distributed across brokers:
→ data is spread across partitions → distribute storage and load
→ CONSUMER PARALLELISM → each partition consumed by one consumer in a group →
more partitions = more parallel consumers = higher throughput
→ scale a topic by adding partitions (and consumers)
→ partitions are the unit of PARALLELISM and horizontal scaling in Kafka
