1
+ <!--
2
+ Licensed to the Apache Software Foundation (ASF) under one or more
3
+ contributor license agreements. See the NOTICE file distributed with
4
+ this work for additional information regarding copyright ownership.
5
+ The ASF licenses this file to You under the Apache License, Version 2.0
6
+ (the "License"); you may not use this file except in compliance with
7
+ the License. You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ -->
17
+
18
+ < script > <!--#include virtual="js/templateData.js" --></ script >
19
+
20
+ < script id ="zk2kraft-template " type ="text/x-handlebars-template "> </ script >
21
+
22
+ < div class ="p-zk2kraft ">
23
+ < h4 class ="anchor-heading "> Significant Changes in Kafka 4.0 Release</ h4 >
24
+ < p > The following are some of the updates in Kafka 4.0 release:</ p >
25
+ < h5 class ="anchor-heading "> Removal Zookeeper configs</ h5 >
26
+ < ul >
27
+ < li >
28
+ < p >
29
+ The password encoder-related configurations have been removed. These configurations were used in
30
+ ZooKeeper mode to define the key and backup key for encrypting sensitive data (e.g., passwords),
31
+ specify the algorithm and key generation method for password encryption (e.g., AES, RSA), and control
32
+ the key length and encryption strength.
33
+ </ p >
34
+ < ul >
35
+ < li > < code > password.encoder.secret</ code > </ li >
36
+ < li > < code > password.encoder.old.secret</ code > </ li >
37
+ < li > < code > password.encoder.keyfactory.algorithm</ code > </ li >
38
+ < li > < code > password.encoder.cipher.algorithm</ code > </ li >
39
+ < li > < code > password.encoder.key.length</ code > </ li >
40
+ < li > < code > password.encoder.iterations</ code > </ li >
41
+ </ ul >
42
+ < p >
43
+ In Kraft mode, Kafka stores sensitive data in records, and the data is not encrypted in Kafka.
44
+ </ p >
45
+ </ li >
46
+ < li >
47
+ < p >
48
+ Removed < code > control.plane.listener.name</ code > . Kafka relies on ZooKeeper to manage metadata, but some
49
+ internal operations (e.g., communication between controllers (a.k.a., broker controller) and brokers)
50
+ still require Kafka’s internal control plane for coordination.
51
+ </ p >
52
+ < p >
53
+ In KRaft mode, Kafka eliminates its dependency on ZooKeeper, and the control plane functionality is
54
+ fully integrated into Kafka itself. The process roles are clearly separated: brokers handle data-related
55
+ requests, while the controllers (a.k.a., quorum controller) manages metadata-related requests. The controllers
56
+ use the Raft protocol for internal communication, which operates differently from the ZooKeeper model. Use the
57
+ following parameters to configure the control plane listener:
58
+ </ p >
59
+ < ul >
60
+ < li > < code > controller.listener.names</ code > </ li >
61
+ < li > < code > listeners</ code > </ li >
62
+ < li > < code > listener.security.protocol.map</ code > </ li >
63
+ </ ul >
64
+ </ li >
65
+ < li >
66
+ < p >
67
+ Removed graceful broker shutdowns-related configurations. These configurations were used in ZooKeeper mode
68
+ to define the maximum number of retries and the retry backoff time for controlled shutdowns. It can
69
+ reduce the risk of unplanned leader changes and data inconsistencies.
70
+ </ p >
71
+ < ul >
72
+ < li > < code > controlled.shutdown.max.retries</ code > </ li >
73
+ < li > < code > controlled.shutdown.retry.backoff.ms</ code > </ li >
74
+ </ ul >
75
+ < p >
76
+ In KRaft mode, Kafka uses the Raft protocol to manage metadata. The broker shutdown process differs from
77
+ ZooKeeper mode as it is managed by the quorum-based controller. The shutdown process is more reliable
78
+ and efficient due to automated leader transfers and metadata updates handled by the controller.
79
+ </ p >
80
+ </ li >
81
+ < li >
82
+ < p >
83
+ Remove the broker id generation-related configurations. These configurations were used in ZooKeeper mode
84
+ to define the broker id, specify the broker id auto generation, and control the broker id generation process.
85
+ </ p >
86
+ < ul >
87
+ < li > < code > reserved.broker.max.id</ code > </ li >
88
+ < li > < code > broker.id.generation.enable</ code > </ li >
89
+ < li > < code > broker.id</ code > </ li >
90
+ </ ul >
91
+ < p >
92
+ Kafka use the node id in Kraft mode to identify servers.
93
+ </ p >
94
+ < ul >
95
+ < li > < code > node.id</ code > </ li >
96
+ </ ul >
97
+ </ li >
98
+ < li >
99
+ < p >
100
+ Removed Zookeeper related configurations.
101
+ </ p >
102
+ < ul >
103
+ < li > < code > zookeeper.connect</ code > </ li >
104
+ < li > < code > zookeeper.session.timeout.ms</ code > </ li >
105
+ < li > < code > zookeeper.connection.timeout.ms</ code > </ li >
106
+ < li > < code > zookeeper.set.acl</ code > </ li >
107
+ < li > < code > zookeeper.max.in.flight.requests</ code > </ li >
108
+ < li > < code > zookeeper.ssl.client.enable</ code > </ li >
109
+ < li > < code > zookeeper.clientCnxnSocket</ code > </ li >
110
+ < li > < code > zookeeper.ssl.keystore.location</ code > </ li >
111
+ < li > < code > zookeeper.ssl.keystore.password</ code > </ li >
112
+ < li > < code > zookeeper.ssl.keystore.type</ code > </ li >
113
+ < li > < code > zookeeper.ssl.truststore.location</ code > </ li >
114
+ < li > < code > zookeeper.ssl.truststore.password</ code > </ li >
115
+ < li > < code > zookeeper.ssl.truststore.type</ code > </ li >
116
+ < li > < code > zookeeper.ssl.protocol</ code > </ li >
117
+ < li > < code > zookeeper.ssl.enabled.protocols</ code > </ li >
118
+ < li > < code > zookeeper.ssl.cipher.suites</ code > </ li >
119
+ < li > < code > zookeeper.ssl.endpoint.identification.algorithm</ code > </ li >
120
+ < li > < code > zookeeper.ssl.crl.enable</ code > </ li >
121
+ < li > < code > zookeeper.ssl.ocsp.enable</ code > </ li >
122
+ </ ul >
123
+ </ li >
124
+ </ ul >
125
+ < h5 class ="anchor-heading "> Removal metrics</ h5 >
126
+ < ul >
127
+ < li >
128
+ < p >
129
+ Remove the following metrics related to ZooKeeper.
130
+ < code > ControlPlaneNetworkProcessorAvgIdlePercent</ code >
131
+ is to monitor the average fraction of time the network processors are idle. The other < code > ControlPlaneExpiredConnectionsKilledCount</ code >
132
+ is to monitor the total number of connections disconnected, across all processors.
133
+ </ p >
134
+ < ul >
135
+ < li > < code > ControlPlaneNetworkProcessorAvgIdlePercent</ code > </ li >
136
+ < li > < code > ControlPlaneExpiredConnectionsKilledCount</ code > </ li >
137
+ </ ul >
138
+ < p >
139
+ In Kraft mode, Kafka also provides metrics to monitor the network processors and expired connections.
140
+ Use the following metrics to monitor the network processors and expired connections:
141
+ </ p >
142
+ < ul >
143
+ < li > < code > NetworkProcessorAvgIdlePercent</ code > </ li >
144
+ < li > < code > ExpiredConnectionsKilledCount</ code > </ li >
145
+ </ ul >
146
+ </ li >
147
+ < li >
148
+ < p >
149
+ Remove the metrics which is monitoring the latency in milliseconds for ZooKeeper requests from broker.
150
+ </ p >
151
+ < ul >
152
+ < li > < code > kafka.server:type=ZooKeeperClientMetrics,name=ZooKeeperRequestLatencyMs</ code > </ li >
153
+ </ ul >
154
+ < p >
155
+ In Kraft mode, Zookeeper is not used, so the metrics is removed.
156
+ </ p >
157
+ </ li >
158
+ </ ul >
159
+ </ div >
0 commit comments