Kafka客户端性能参数调优

调优方向:吞吐量

Producer:

• batch.size: increase to 100000--200000 (default 16384)

linger.ms: increase to 10--100 (default 0)

• compression.type=lz4 (default none, i.e., no compression)

• acks=1 (default 1)

• buffer.memory: increase if there are a lot of partitions (default 33554432)

Consumer:

• fetch.min.bytes: increase to ~100000 (default 1)
调优方向:低延迟

Producer:

• linger.ms=0 (default 0)

• compression.type=none (default none, i.e., no compression)

• acks=1 (default 1)

Consumer:

• fetch.min.bytes=1 (default 1)
调优方向:持久性(消息不丢失

replication.factor=3

• acks=all (default 1)

• enable.idempotence=true (default false), to prevent duplicate messages and out-of-order

messages

• max.in.flight.requests.per.connection=1 (default 5), to prevent out of order messages

when not using an idempotent producer

Consumer:

• enable.auto.commit=false (default true)

• isolation.level=read_committed (when using EOS transactions)

调优方向:可用性

Consumer:

session.timeout.ms: increase (default 10000)

max.poll.records减少

相关推荐
懂软件的胡子个哥4 小时前
微信工单系统如何基于 WechatApi 做消息分流和状态流转
运维·分布式·微信·架构·企业微信
九皇叔叔1 天前
从本地事务到分布式事务
java·分布式·分布式事务·cap·base
hey you~1 天前
云客服多渠道统一接入,消息队列技术实现方案
kafka·消息队列·rocketmq·系统集成·云客服·多渠道接入·接口对接
刃神太酷啦1 天前
Redis 核心进阶:哨兵、集群、缓存问题与分布式锁详解----《Hello Redis!》(6)
linux·c语言·数据库·c++·redis·分布式·缓存
海宇大数据1 天前
分布式网关架构实战:基于海宇数据公安二要素认证即时版构建自动化司机准入网关
人工智能·分布式·架构·自动化
雾隐隐o1 天前
Kafka 消费者消息丢失:Offset 原理与解决方案
kafka
木圭的AI时代指南2 天前
Spark-X2.5 长输入 Agent 实测:全量读取陷阱与解释器寻找死循环复盘,附可复现任务
大数据·分布式·spark
KANGBboy2 天前
doris+kafka安装部署(单机+集群)二时钟服务器 java_home
服务器·分布式
爱笑的k112 天前
分布式通信原语
分布式·ai infra
实战派K8S&DB2 天前
GaussDB 高可用演进:从流复制到 DCF 分布式共识
分布式·gaussdb