This chapter covers
- Topic settings to increase performance
- Determining the best number of partitions for a topic
- Kafka broker settings that influence performance
- Producer and consumer performance tuning
In the previous chapter, we saw how to reliably produce messages with Kafka. In this chapter, we’ll address the unfinished business of optimizing Kafka. How do we achieve the promised performance with Kafka?
Similar to reliability, when we talk about performance, we first need to clarify what this means to us. We can define performance in different ways. Are we concerned with bandwidth? The bandwidth that the system offers us is often crucial. We measure bandwidth in bytes per second. How many kilobytes/megabytes/gigabytes per second of data throughput do we achieve with our system? When we only talk about bandwidth, we often neglect latency, although it’s usually of greater importance to us.