kafka/raft
Jason Gustafson f58c2acf26
KAFKA-12250; Add metadata record serde for KIP-631 (#9998)
This patch adds a `RecordSerde` implementation for the metadata record format expected by KIP-631. 

Reviewers: Colin McCabe <cmccabe@apache.org>, Ismael Juma <mlists@juma.me.uk>
2021-02-03 16:16:35 -08:00
..
bin KAFKA-10601; Add support for append linger to Raft implementation (#9418) 2020-10-27 12:10:13 -07:00
config KAFKA-12236; New meta.properties logic for KIP-500 (#9967) 2021-01-30 17:05:31 -08:00
src KAFKA-12250; Add metadata record serde for KIP-631 (#9998) 2021-02-03 16:16:35 -08:00
README.md KAFKA-12236; New meta.properties logic for KIP-500 (#9967) 2021-01-30 17:05:31 -08:00

README.md

Kafka Raft

Kafka Raft is a sub module of Apache Kafka which features a tailored version of Raft Consensus Protocol.

Eventually this module will be integrated into the Kafka server. For now, we have a standalone test server which can be used for performance testing. Below we describe the details to set this up.

Run Single Quorum

bin/test-raft-server-start.sh config/raft.properties

Run Multi Node Quorum

Create 3 separate raft quorum properties as the following:

cat << EOF >> config/raft-quorum-1.properties

node.id=1
listeners=PLAINTEXT://localhost:9092
controller.quorum.voters=1@localhost:9092,2@localhost:9093,3@localhost:9094
log.dirs=/tmp/raft-logs-1
EOF

cat << EOF >> config/raft-quorum-2.properties

node.id=2
listeners=PLAINTEXT://localhost:9093
controller.quorum.voters=1@localhost:9092,2@localhost:9093,3@localhost:9094
log.dirs=/tmp/raft-logs-2
EOF

cat << EOF >> config/raft-quorum-3.properties

node.id=3
listeners=PLAINTEXT://localhost:9094
controller.quorum.voters=1@localhost:9092,2@localhost:9093,3@localhost:9094
log.dirs=/tmp/raft-logs-3
EOF

Open up 3 separate terminals, and run individual commands:

bin/test-raft-server-start.sh --config config/raft-quorum-1.properties
bin/test-raft-server-start.sh --config config/raft-quorum-2.properties
bin/test-raft-server-start.sh --config config/raft-quorum-3.properties

Once a leader is elected, it will begin writing to an internal __cluster_metadata topic with a steady workload of random data. You can control the workload using the --throughput and --record-size arguments passed to test-raft-server-start.sh.