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减少

相关推荐
小O的算法实验室25 分钟前
IEEE TAES,多无人机通信故障下的分布式任务分配与压制干扰
分布式
Deng桑16 小时前
分布式锁与幂等
分布式
Flynn Liang19 小时前
物联网时序数据乱序问题全链路治理:从设备到存储的五层实战(附 Flink/Kafka/IoTDB 配置级代码)
flink·kafka·iot·iotdb·emqx·乱序·时序数据
wifi___19 小时前
Redis分布式锁
数据库·redis·分布式
方方洛1 天前
ray教程-15-RayServe与LLM服务
人工智能·分布式·机器学习
m0_639906941 天前
MySQL 实现分布式锁:悲观锁、乐观锁、唯一索引锁
数据库·分布式·mysql
T量子永生1 天前
Android SISO 分布式编译集群配置方案
android·分布式·云计算·源代码管理
starzy19902 天前
Kafka响应发送:字节是怎么真正写回客户端的
大数据·kafka
KaiwuDB2 天前
KaiwuDB 分布式集群扩缩容,从原理到完整操作踩坑总结
运维·数据库·分布式
泡海椒2 天前
深度解析JQuick-SQL AST到逻辑计划转换机制|分布式SQL原理
数据库·分布式·sql