Two other important features of Kafka are parallelism and redundancy. Kafka does this by providing each topic with a certain number of sections and replicas.
Partitions
Sections: one piece of Kafka's theme. The number of sections is customizable for each topic. More sections allow more parallelism when reading from topics. The number of sections determines how many consumers you have in the consumer group. For example, if a topic has 3 sections, you can have 3 consumers in the balance of consumers who consume between sections. Thus, you have parallelism of 3. This section number is somewhat difficult to determine until you know how fast you produce data and how fast you consume data. If you have a topic that you know will be large, you will need to have more sections.
Replicas
Replicas: These are copies of partitions. They are never written or read. Their sole purpose is data redundancy. If your topic has n replicas, n-1 brokers may fail before data loss occurs. In addition, you cannot have a topic such as the replication rate, which is greater than the number of brokers that you have. For example, you have 5 Kafka brokers, you may have a topic with a maximum replication ratio of 5, and 5-1 = 4 brokers can go down to data loss.
source share