2 Performance Optimization

Kafka Operations on Kubernetes · 3:56

Listen on 93

Lyrics

[Verse 1]
When your producers are moving too slow
Batch size matters, let the messages flow
Linger milliseconds, wait a little more
Pack them tight before they walk out the door
Compression's your friend when the data gets large
GZIP or LZ4, you're the one in charge

[Chorus]
Tune it up, tune it down
Performance secrets all around
Batch and linger, fetch and poll
Network threads take control
IOPS flying, GC's clean
Fastest Kafka you've ever seen

[Verse 2]
Consumer side needs its own special care
Fetch size bigger when you've got data to spare
Max poll records, don't bite more than you chew
Balance the load with what your app can do
Pull those messages in the perfect amount
Every millisecond's what we're here to count

[Chorus]
Tune it up, tune it down
Performance secrets all around
Batch and linger, fetch and poll
Network threads take control
IOPS flying, GC's clean
Fastest Kafka you've ever seen

[Bridge]
Broker level's where the magic happens
Network threads for the connections snapping
IO threads for the disk operations
Handle the load across all your nations
Eight network threads is usually right
Sixteen IO keeps your storage bright

[Verse 3]
Storage benchmarks tell the real story
IOPS and throughput, that's your glory
Sequential writes are what Kafka loves
Random reads when the consumer shoves
Test your disks before you deploy
SSD speed that you can enjoy

[Chorus]
Tune it up, tune it down
Performance secrets all around
Batch and linger, fetch and poll
Network threads take control
IOPS flying, GC's clean
Fastest Kafka you've ever seen

[Bridge 2]
G1 garbage collector's your best friend
Heap size matters from start to end
MaxGCPauseMillis set to twenty
Concurrent threads, you'll need plenty
JVM flags that keep it smooth
Performance gains that really soothe

[Outro]
From producer batch to consumer fetch
Every setting's got its perfect match
Network IO and storage speed
G1GC gives you all you need
Strimzi running like a dream
The fastest streaming you've ever seen

← 4 Lab: CDC Pipeline with Debezium | 6 Lab: Full Observability Stack →