Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
allamiro authored Jan 27, 2024
1 parent cb4f672 commit b28e4e0
Showing 1 changed file with 234 additions and 0 deletions.
234 changes: 234 additions & 0 deletions KAFKA/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,84 @@ Update KAFKA properties file on every server

```
cat <<EOF | sudo tee /etc/kafka/config/server.properties
# Kafka server.properties configuration
# Template generated by Ansible
# The id of the broker. This must be set to a unique integer for each broker.
broker.id=1
############################# Socket Server Settings #############################
# The address the socket server listens on.
listeners=PLAINTEXT://kafka1.example.com:9092
# Hostname and port the broker will advertise to producers and consumers.
#advertised.listeners=PLAINTEXT://kafka1.example.com.local.domain:9092
# Number of threads for network requests
num.network.threads=3
# Number of threads for I/O
num.io.threads=8
# Send buffer (SO_SNDBUF) size
socket.send.buffer.bytes=102400
# Receive buffer (SO_RCVBUF) size
socket.receive.buffer.bytes=102400
# Maximum size of request that the socket server will accept
socket.request.max.bytes=104857600
############################# Log Basics #############################
# Directories to store log files
log.dirs=/var/log/kafka-logs
# Number of log partitions per topic
num.partitions=3
# Number of threads per data directory for log recovery and flushing
num.recovery.threads.per.data.dir=1
############################# Internal Topic Settings #############################
# Replication factors for internal topics
offsets.topic.replication.factor=1
transaction.state.log.replication.factor=1
transaction.state.log.min.isr=1
############################# Log Flush Policy #############################
# Interval at which to force a flush of data to disk
#log.flush.interval.messages=10000
#log.flush.interval.ms=1000
############################# Log Retention Policy #############################
# Log retention hours
log.retention.hours=168
# Size-based log retention
#log.retention.bytes=1073741824
# Maximum size of a log segment file
log.segment.bytes=1073741824
# Check interval for log retention
log.retention.check.interval.ms=300000
############################# Zookeeper #############################
# Zookeeper connection string
zookeeper.connect=kafka1.example.com:2181,kafka2.example.com:2181,kafka3.example.com:2181
# Zookeeper connection timeout
zookeeper.connection.timeout.ms=6000
############################# Group Coordinator Settings #############################
# Initial rebalance delay
group.initial.rebalance.delay.ms=0
EOF
Expand All @@ -171,6 +249,84 @@ EOF
```
cat <<EOF | sudo tee /etc/kafka/config/server.properties
# Kafka server.properties configuration
# Template generated by Ansible
# The id of the broker. This must be set to a unique integer for each broker.
broker.id=1
############################# Socket Server Settings #############################
# The address the socket server listens on.
listeners=PLAINTEXT://kafka2.example.com:9092
# Hostname and port the broker will advertise to producers and consumers.
#advertised.listeners=PLAINTEXT://kafka2.example.com.local.domain:9092
# Number of threads for network requests
num.network.threads=3
# Number of threads for I/O
num.io.threads=8
# Send buffer (SO_SNDBUF) size
socket.send.buffer.bytes=102400
# Receive buffer (SO_RCVBUF) size
socket.receive.buffer.bytes=102400
# Maximum size of request that the socket server will accept
socket.request.max.bytes=104857600
############################# Log Basics #############################
# Directories to store log files
log.dirs=/var/log/kafka-logs
# Number of log partitions per topic
num.partitions=3
# Number of threads per data directory for log recovery and flushing
num.recovery.threads.per.data.dir=1
############################# Internal Topic Settings #############################
# Replication factors for internal topics
offsets.topic.replication.factor=1
transaction.state.log.replication.factor=1
transaction.state.log.min.isr=1
############################# Log Flush Policy #############################
# Interval at which to force a flush of data to disk
#log.flush.interval.messages=10000
#log.flush.interval.ms=1000
############################# Log Retention Policy #############################
# Log retention hours
log.retention.hours=168
# Size-based log retention
#log.retention.bytes=1073741824
# Maximum size of a log segment file
log.segment.bytes=1073741824
# Check interval for log retention
log.retention.check.interval.ms=300000
############################# Zookeeper #############################
# Zookeeper connection string
zookeeper.connect=kafka1.example.com:2181,kafka2.example.com:2181,kafka3.example.com:2181
# Zookeeper connection timeout
zookeeper.connection.timeout.ms=6000
############################# Group Coordinator Settings #############################
# Initial rebalance delay
group.initial.rebalance.delay.ms=0
EOF
```
Expand All @@ -181,6 +337,84 @@ EOF

```
cat <<EOF | sudo tee /etc/kafka/config/server.properties
# Kafka server.properties configuration
# Template generated by Ansible
# The id of the broker. This must be set to a unique integer for each broker.
broker.id=1
############################# Socket Server Settings #############################
# The address the socket server listens on.
listeners=PLAINTEXT://kafka3.example.com:9092
# Hostname and port the broker will advertise to producers and consumers.
#advertised.listeners=PLAINTEXT://kafka3.example.com.local.domain:9092
# Number of threads for network requests
num.network.threads=3
# Number of threads for I/O
num.io.threads=8
# Send buffer (SO_SNDBUF) size
socket.send.buffer.bytes=102400
# Receive buffer (SO_RCVBUF) size
socket.receive.buffer.bytes=102400
# Maximum size of request that the socket server will accept
socket.request.max.bytes=104857600
############################# Log Basics #############################
# Directories to store log files
log.dirs=/var/log/kafka-logs
# Number of log partitions per topic
num.partitions=3
# Number of threads per data directory for log recovery and flushing
num.recovery.threads.per.data.dir=1
############################# Internal Topic Settings #############################
# Replication factors for internal topics
offsets.topic.replication.factor=1
transaction.state.log.replication.factor=1
transaction.state.log.min.isr=1
############################# Log Flush Policy #############################
# Interval at which to force a flush of data to disk
#log.flush.interval.messages=10000
#log.flush.interval.ms=1000
############################# Log Retention Policy #############################
# Log retention hours
log.retention.hours=168
# Size-based log retention
#log.retention.bytes=1073741824
# Maximum size of a log segment file
log.segment.bytes=1073741824
# Check interval for log retention
log.retention.check.interval.ms=300000
############################# Zookeeper #############################
# Zookeeper connection string
zookeeper.connect=kafka1.example.com:2181,kafka2.example.com:2181,kafka3.example.com:2181
# Zookeeper connection timeout
zookeeper.connection.timeout.ms=6000
############################# Group Coordinator Settings #############################
# Initial rebalance delay
group.initial.rebalance.delay.ms=0
EOF
Expand Down

0 comments on commit b28e4e0

Please sign in to comment.