SlideShare a Scribd company logo
4
Most read
5
Most read
Mastering Kafka Producer Configs
A Guide to Optimizing Performance
Agenda
2
01
Introduction
An overview on Kafka Producer API
02
Configs walkthrough
Understanding different kafka producer configs
and test results
Best Practices
Learnings
03
01
03
02
Introduction
3
● Producers are one of the core components of the Kafka ecosystem, responsible for publishing data to
Kafka topics.
● Producer configurations are a set of properties that allow developers to customize the behavior of their
Kafka producers.
● Understanding producer configurations is important for optimizing performance, ensuring reliability, and
achieving specific use cases.
● Explore the most common Kafka producer configurations and how they can be used to fine-tune your
Kafka applications.
MyTopic-1
Producer
Apache Kafka Cluster
Follower Replica
Record
Accumulator
Metadata Cache
Leader Replica
Follower Replica
● batch.size
● linger.ms
● max.request.size
Performance Test Results
● With default configs: Throughput 66.83 MB/sec
● With batch.size=128000 and linger.ms=50 : Throughput 90.33 MB/sec
MyTopic-1
Producer
Send Buffer
Record
Accumulator
Metadata Cache
Apache Kafka Cluster
Follower Replica Follower Replica
Leader Replica
● buffer.memory
● max.block.ms
Performance Test Results
7
● With buffer.memory=100MB: Throughput 74.44 MB/sec
Producer
Record
Accumulator
Metadata Cache
Apache Kafka Cluster
Follower Replica Follower Replica
Leader Replica
MyTopic-1
Send Buffer
compression.type
[none,gzip,snappy,lz4,zstd]
9
● With compression.type=gzip: Throughput 28.24 MB/sec
● With compression.type=zstd and snappy: Throughput 56.25 and 83.93 MB/sec respectively
Performance Test Results
Producer
was it successful?
Record
Accumulator
Metadata Cache
Apache Kafka Cluster
Follower Replica Follower Replica
Leader Replica
Send Buffer
acks=[all,-1,0,1]
Performance Test Results
11
● With acks=1: Throughput= 91.84 MB/sec
● With acks=0: Throughput= 96.26 MB/sec
Best Practices
• Adjust batch.size upwards, but avoid setting it excessively high
• Determine the optimal value for linger.ms
• Choose the compression.type wisely
• Configure acknowledgments (acks) according to your specific needs
• Increase buffer.memory only when necessary
Thank You

More Related Content

PDF
Introduction to Apache Kafka
PDF
An Introduction to Apache Kafka
PPTX
Westpac Bank Tech Talk 1: Dive into Apache Kafka
PPTX
Mule soft meetup_chandigarh_#7_25_sept_2021
PDF
SFBigAnalytics_20190724: Monitor kafka like a Pro
PPTX
Netflix Data Pipeline With Kafka
PPTX
Netflix Data Pipeline With Kafka
PDF
Introduction to apache kafka
Introduction to Apache Kafka
An Introduction to Apache Kafka
Westpac Bank Tech Talk 1: Dive into Apache Kafka
Mule soft meetup_chandigarh_#7_25_sept_2021
SFBigAnalytics_20190724: Monitor kafka like a Pro
Netflix Data Pipeline With Kafka
Netflix Data Pipeline With Kafka
Introduction to apache kafka

Similar to Mastering Kafka Producer Configs: A Guide to Optimizing Performance (20)

PPTX
Intro to Apache Apex @ Women in Big Data
PDF
Tokyo AK Meetup Speedtest - Share.pdf
PDF
Twitter’s Apache Kafka Adoption Journey | Ming Liu, Twitter
PDF
How Apache Kafka® Works
PPTX
Streaming in Practice - Putting Apache Kafka in Production
PPTX
F_1330_Narkhede_Kafka .pptx
PPT
Kafka Explainaton
PDF
Tips & Tricks for Apache Kafka®
PPTX
Envoy and Kafka
PPTX
Ingestion and Dimensions Compute and Enrich using Apache Apex
PDF
MySQL Manchester TT - 5.7 Whats new
PDF
Kafka to the Maxka - (Kafka Performance Tuning)
ODP
Introduction to Apache Kafka- Part 1
PDF
Alibaba cloud benchmarking report ecs rds limton xavier
PDF
Oracle Analytics Server Infrastructure Tuning guide v2.pdf
PDF
Insta clustr seattle kafka meetup presentation bb
PPTX
What's New in Apache Pulsar 2.9- Pulsar Summit Asia 2021
PPTX
Take Kafka-on-Pulsar to Production at Internet Scale: Improvements Made for P...
PPTX
Real time data pipline with kafka streams
PDF
Streaming Processing with a Distributed Commit Log
Intro to Apache Apex @ Women in Big Data
Tokyo AK Meetup Speedtest - Share.pdf
Twitter’s Apache Kafka Adoption Journey | Ming Liu, Twitter
How Apache Kafka® Works
Streaming in Practice - Putting Apache Kafka in Production
F_1330_Narkhede_Kafka .pptx
Kafka Explainaton
Tips & Tricks for Apache Kafka®
Envoy and Kafka
Ingestion and Dimensions Compute and Enrich using Apache Apex
MySQL Manchester TT - 5.7 Whats new
Kafka to the Maxka - (Kafka Performance Tuning)
Introduction to Apache Kafka- Part 1
Alibaba cloud benchmarking report ecs rds limton xavier
Oracle Analytics Server Infrastructure Tuning guide v2.pdf
Insta clustr seattle kafka meetup presentation bb
What's New in Apache Pulsar 2.9- Pulsar Summit Asia 2021
Take Kafka-on-Pulsar to Production at Internet Scale: Improvements Made for P...
Real time data pipline with kafka streams
Streaming Processing with a Distributed Commit Log
Ad

More from HostedbyConfluent (20)

PDF
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
PDF
Renaming a Kafka Topic | Kafka Summit London
PDF
Evolution of NRT Data Ingestion Pipeline at Trendyol
PDF
Ensuring Kafka Service Resilience: A Dive into Health-Checking Techniques
PDF
Exactly-once Stream Processing with Arroyo and Kafka
PDF
Fish Plays Pokemon | Kafka Summit London
PDF
Tiered Storage 101 | Kafla Summit London
PDF
Building a Self-Service Stream Processing Portal: How And Why
PDF
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
PDF
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
PDF
Navigating Private Network Connectivity Options for Kafka Clusters
PDF
Apache Flink: Building a Company-wide Self-service Streaming Data Platform
PDF
Explaining How Real-Time GenAI Works in a Noisy Pub
PDF
TL;DR Kafka Metrics | Kafka Summit London
PDF
A Window Into Your Kafka Streams Tasks | KSL
PDF
Data Contracts Management: Schema Registry and Beyond
PDF
Code-First Approach: Crafting Efficient Flink Apps
PDF
Debezium vs. the World: An Overview of the CDC Ecosystem
PDF
Beyond Tiered Storage: Serverless Kafka with No Local Disks
PDF
Automating Speed: A Proven Approach to Preventing Performance Regressions in ...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Renaming a Kafka Topic | Kafka Summit London
Evolution of NRT Data Ingestion Pipeline at Trendyol
Ensuring Kafka Service Resilience: A Dive into Health-Checking Techniques
Exactly-once Stream Processing with Arroyo and Kafka
Fish Plays Pokemon | Kafka Summit London
Tiered Storage 101 | Kafla Summit London
Building a Self-Service Stream Processing Portal: How And Why
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
Navigating Private Network Connectivity Options for Kafka Clusters
Apache Flink: Building a Company-wide Self-service Streaming Data Platform
Explaining How Real-Time GenAI Works in a Noisy Pub
TL;DR Kafka Metrics | Kafka Summit London
A Window Into Your Kafka Streams Tasks | KSL
Data Contracts Management: Schema Registry and Beyond
Code-First Approach: Crafting Efficient Flink Apps
Debezium vs. the World: An Overview of the CDC Ecosystem
Beyond Tiered Storage: Serverless Kafka with No Local Disks
Automating Speed: A Proven Approach to Preventing Performance Regressions in ...
Ad

Recently uploaded (20)

PPTX
Big Data Technologies - Introduction.pptx
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Cloud computing and distributed systems.
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
cuic standard and advanced reporting.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Big Data Technologies - Introduction.pptx
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Spectral efficient network and resource selection model in 5G networks
Reach Out and Touch Someone: Haptics and Empathic Computing
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Cloud computing and distributed systems.
Network Security Unit 5.pdf for BCA BBA.
Mobile App Security Testing_ A Comprehensive Guide.pdf
NewMind AI Weekly Chronicles - August'25 Week I
cuic standard and advanced reporting.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Unlocking AI with Model Context Protocol (MCP)
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Machine learning based COVID-19 study performance prediction
Encapsulation_ Review paper, used for researhc scholars
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx

Mastering Kafka Producer Configs: A Guide to Optimizing Performance