Database Reference
In-Depth Information
Like other ZooKeeper clients, Kafka allows for the control of the connection
and session timeout values. These are controlled by the zookeeper
.connection.timeout.ms and zookeeper.session.timeout.ms
settings, respectively, and both are set to 6,000 milliseconds (6 seconds) by
default.
# Timeout in ms for connecting to zookeeper
zookeeper.connection.timeout.ms=1000000
# Timeout in ms for the zookeeper session heartbeat.
#zookeeper.session.timeout.ms=6000
With the introduction of replication, Kafka 0.8 also introduces a controlled
shutdown behavior for the broker. The setting
controlled.shutdown.enabled , which is active by default, controls
this behavior. When active, when a leader receives a shutdown command
it attempts to reassign control of each of the topic partitions it leads to
another broker in the ISR. It attempts to do this
controlled.shutdown.max.retries times, backing off by
controlled .shutdown.retry.backoff.ms milliseconds between
each attempt. After the last retry it shuts down, possibly uncleanly.
This feature allows for maintenance to be more easily performed on the
cluster. Assuming that consumers and producers are aware of changes to
the metadata, moving the leadership position to another broker can allow
the entire cluster to be upgraded without any perceptible downtime.
Unfortunately, most clients do not have good recovery facilities, so this is
presently not possible.
#controlled.shutdown.enabled=true
#controlled.shutdown.max.retries=3
#controlled.shutdown.retry.backoff.ms=5000
You can find most of the settings shown in this section in the config/
server .properties file of the Kafka installation. This properties file
is mostly intended for development purposes. In production, most of the
defaults can be used, except for perhaps the socket buffering options. The
broker.id , log.dirs and zookeeper.connect properties must be set
in all cases.
Search WWH ::




Custom Search