5 Reliability

 

This chapter covers

  • Kafka’s acknowledgment settings
  • Data availability and fault tolerance in Kafka
  • Kafka’s delivery guarantees
  • Kafka’s transactional capabilities
  • Leader-follower principle in Kafka

Now we know how topics and messages look in Kafka and how Kafka relates to a log. In the next sections, we’ll explore some crucial aspects of Kafka’s operation. Before we take a closer look at how we can influence the performance of our Kafka cluster in the next chapter, we’ll examine the parameters we can adjust to improve reliability in this chapter.

When we consider the topic of reliability, we can roughly divide it into three subcategories. The first category is data durability, which deals with how Kafka ensures that data is stored correctly in perpetuity. The second category is availability, which refers first to ensuring that consumers can access our written data at any time if possible, and second to ensuring that producers can also write data at any time. Both data durability and availability can be achieved relatively well with replication in Kafka.

5.1 Acknowledgments

5.1.1 ACK strategies in Kafka

5.1.2 ACKs and ISRs

5.1.3 Message delivery guarantees in Kafka

5.2 Transactions

5.2.1 Transactions in databases

5.2.2 Transactions in Kafka

5.2.3 Transactions and consumers

5.3 Replication and the leader-follower principle

Summary