-
Notifications
You must be signed in to change notification settings - Fork 137
[FEATURE] Support multiple listeners of one protocol #574
Comments
Please don't use the phrase "define your own protocol", use "define your own listener". The description in KIP-103 is:
|
Another important point in KIP-103 is that the Kafka metadata response varies depending on which listener received the traffic:
The broker creates a socket server per listener, with the corresponding bind address. Earlier I said that I thought the broker compared the incoming host header against the advertised addresses, but that was incorrect. |
I am working on a related enhancement for the Pulsar broker, and would like to help with this aspect too. Here's some relevant information in a related design doc: Expose Brokers via Istio Gateway, and Implementation Details. |
Fixes #669 Fixes #574 To support multiple listeners with multiple protocols, we need to set follow configration, and deprecated `kafkaAdvertisedListeners` and `kafkaListenerName`. > kafkaListeners=internal://0.0.0.0:9092,internal_ssl://0.0.0.0:9093,external://0.0.0.0:19002,external_ssl:0.0.0.0:19003 > kafkaProtocalMap=internal:PLAINTEXT,internal_ssl:SSL,external:PLAINTEXT,external_ssl:SSL > advertisedListeners={pulsar's listeners},internal:pulsar//192.168.1.10:9092,internal_ssl:pulsar//192.168.1.10:9093,external:pulsar//172.16.1.10:19002,external_ssl:pulsar://172.16.1.10:19003 1. Define the listenerNames and port of each listenerName in `kafkaListeners` 2. Define the listenerNames and protocol of each listenerName in `kafkaProtocalMap` 3. Add listenerNames and advertised address of each listenerName into `advertisedListeners` Kafka client should connect to the port of the listenerName according to KIP-103. Co-authored-by: wangjialing <wangjialing@cmss.chinamobile.com>
Fixes #669 Fixes #574 To support multiple listeners with multiple protocols, we need to set follow configration, and deprecated `kafkaAdvertisedListeners` and `kafkaListenerName`. > kafkaListeners=internal://0.0.0.0:9092,internal_ssl://0.0.0.0:9093,external://0.0.0.0:19002,external_ssl:0.0.0.0:19003 > kafkaProtocalMap=internal:PLAINTEXT,internal_ssl:SSL,external:PLAINTEXT,external_ssl:SSL > advertisedListeners={pulsar's listeners},internal:pulsar//192.168.1.10:9092,internal_ssl:pulsar//192.168.1.10:9093,external:pulsar//172.16.1.10:19002,external_ssl:pulsar://172.16.1.10:19003 1. Define the listenerNames and port of each listenerName in `kafkaListeners` 2. Define the listenerNames and protocol of each listenerName in `kafkaProtocalMap` 3. Add listenerNames and advertised address of each listenerName into `advertisedListeners` Kafka client should connect to the port of the listenerName according to KIP-103. Co-authored-by: wangjialing <wangjialing@cmss.chinamobile.com>
Is your feature request related to a problem? Please describe.
Currently for KoP we can configure
kafkaListeners
as what interfaces KoP binds to andkafkaAdvertisedListeners
as how clients connect. However, currently KoP can only bind to one interface for each protocol.For example, if KoP was configured with
kafkaListeners=PLAINTEXT://127.0.0.1:9092,SSL://127.0.0.1:9093
it would work well.
But if KoP was configured with
kafkaListeners=PLAINTEXT://127.0.0.1:9092,SSL://127.0.0.1:9093,SSL://127.0.0.1:9094
KoP would fail to start with following logs.
Describe the solution you'd like
Kafka (as of KIP-103) has the listener.security.protocol.map config to
map your own protocoldefine a set of listeners, each with a name and a security protocol (PLAINTEXT
,SSL
), so that a protocol like SSL could bind multiple ports or IPs.We can also see more details in this blog. Here's an example to advertise multiple ports of PLAINTEXT protocol:
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: