0

I have configuration 5 nodes, 4 broker+controller and 1 controller. Create topic with replication factor 5, and it is created, and describe show that topic partition have 5 replicas.

/opt/kafka/latest/bin/kafka-topics.sh --create --bootstrap-server=dc1-prod-kafka-001-vs:9092 --replication-factor 5 --partitions 1 --topic test5
/opt/kafka/latest/bin/kafka-topics.sh --describe --topic test5 --bootstrap-server=dc1-prod-kafka-001-vs:9092
Topic: test5 TopicId: amuqr8EgRmqeKryUHZwsMA PartitionCount: 1 ReplicationFactor: 5 Configs: segment.bytes=1073741824
Topic: test5 Partition: 0 Leader: 3 Replicas: 3,4,1,2,5 Isr: 3,4,1,2

Replicas 5 and ISR 4. Why does kafka initially allow you to create a replica on the controller node, although in reality the replica is not created on the controller node and there are no topic files in the log directory.

Is this expected behavior or not? Thanks.

I want to understand whether such behavior is the norm for Kafka

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
  • You'll need to share `process.roles` of your brokers. Are they both brokers and controllers? How do you know which one is a controller just based on the ids? – OneCricketeer Aug 29 '23 at 12:43
  • The bootstrap server argument isn't telling where to create anything, only how to reach one or more nodes in the cluster – OneCricketeer Aug 29 '23 at 12:46
  • 4 process.roles=broker,controller 1 process.roles=controller my config from first node – Андрій Висоцький Aug 29 '23 at 14:01
  • listeners=PLAINTEXT://:9092,CONTROLLER://:9093 inter.broker.listener.name=PLAINTEXT advertised.listeners=PLAINTEXT://dc1-prod-kafka:9092 controller.listener.names=CONTROLLER listener.security.protocol.map=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,SSL:SSL,SASL_PLAINTEXT:SASL_PLAINTEXT,SASL_SSL:SASL_SSL 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=/opt/kafka/kafka_2.13-3.5.1/logs/kraft-combined-logs – Андрій Висоцький Aug 29 '23 at 14:05
  • num.partitions=1 num.recovery.threads.per.data.dir=1 offsets.topic.replication.factor=4 transaction.state.log.replication.factor=4 transaction.state.log.min.isr=3 default.replication.factor=4 min.insync.replicas=3 log.retention.hours=168 log.segment.bytes=1073741824 log.retention.check.interval.ms=300000 – Андрій Висоцький Aug 29 '23 at 14:05
  • node id from 1 up to 5 , controller id=5 – Андрій Висоцький Aug 29 '23 at 14:06
  • Thanks. In the future, please [edit] your question to include formatted code blocks rather than comments – OneCricketeer Aug 30 '23 at 12:34

0 Answers0