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

相关推荐
奔跑吧邓邓子3 小时前
大数据利器Hadoop:从基础到实战,一篇文章掌握大数据处理精髓!
大数据·hadoop·分布式
weixin_453965008 小时前
[单master节点k8s部署]30.ceph分布式存储(一)
分布式·ceph·kubernetes
weixin_453965008 小时前
[单master节点k8s部署]32.ceph分布式存储(三)
分布式·ceph·kubernetes
Dylanioucn10 小时前
【分布式微服务云原生】掌握分布式缓存:Redis与Memcached的深入解析与实战指南
分布式·缓存·云原生
weixin_4539650013 小时前
[单master节点k8s部署]31.ceph分布式存储(二)
分布式·ceph·kubernetes
坎坎坷坷.13 小时前
分布式理论:拜占庭将军问题
分布式
极客先躯19 小时前
高级java每日一道面试题-2024年10月3日-分布式篇-分布式系统中的容错策略都有哪些?
java·分布式·版本控制·共识算法·超时重试·心跳检测·容错策略
niu_sama20 小时前
仿RabbitMQ实现消息队列三种主题的调试及源码
分布式·rabbitmq
鸡c20 小时前
rabbitMq------客户端模块
分布式·rabbitmq·ruby
猿java21 小时前
使用 Kafka面临的挑战
java·后端·kafka