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

相关推荐
Dobby_054 小时前
【Hadoop】分布式文件系统 HDFS
大数据·hadoop·分布式
哈哈很哈哈4 小时前
Spark 核心 RDD详解
大数据·分布式·spark·scala
项目題供诗4 小时前
Hadoop(十一)
大数据·hadoop·分布式
zru_96026 小时前
Kafka核心概念深入浅出:消费者组(Consumer Group)机制全解析
kafka
学习中的阿陈9 小时前
Hadoop伪分布式环境配置
大数据·hadoop·分布式
CesareCheung9 小时前
JMeter分布式压力测试
分布式·jmeter·压力测试
thginWalker10 小时前
面试鸭Java八股之Kafka
kafka
失散1311 小时前
分布式专题——10.5 ShardingSphere的CosID主键生成框架
java·分布式·架构·分库分表·shadingsphere
winfield82112 小时前
Kafka 线上问题排查完整手册
kafka
Cxzzzzzzzzzz15 小时前
RabbitMQ 在实际开发中的应用场景与实现方案
分布式·rabbitmq