kolla-ansible/ansible/roles/kafka/templates/kafka.server.properties.j2
Doug Szumski 2b34f6d2fd Improve scalability of Kafka
Set sensible defaults for replica counts and minimum insync replicas
as a function of the number of nodes in the Kafka cluster.

Partially-Implements: blueprint monasca-roles
Change-Id: Icf1dddb7dd6a64f4e5efb7dffa5ffdf0880f891f
2018-09-25 11:41:00 +00:00

19 lines
832 B
Django/Jinja

listeners=PLAINTEXT://{{ api_interface_address }}:{{ kafka_port }}
num.network.threads=3
num.io.threads=8
socket.send.buffer.bytes=102400
socket.receive.buffer.bytes=102400
socket.request.max.bytes=104857600
log.dirs=/var/lib/kafka/data
min.insync.replicas={{ kafka_broker_count if kafka_broker_count|int < 3 else 2 }}
num.partitions=30
num.recovery.threads.per.data.dir=1
offsets.topic.replication.factor={{ kafka_broker_count if kafka_broker_count|int < 3 else 3 }}
transaction.state.log.replication.factor={{ kafka_broker_count if kafka_broker_count|int < 3 else 3 }}
transaction.state.log.min.isr={{ kafka_broker_count if kafka_broker_count|int < 3 else 2 }}
log.retention.hours=168
log.segment.bytes=1073741824
log.retention.check.interval.ms=300000
zookeeper.connect={{ kafka_zookeeper }}
zookeeper.connection.timeout.ms=6000