spirit-labs / tektite

Tektite DB
http://www.tektitedb.com
Other
163 stars 22 forks source link

Create config listeners abstraction and support advertised listeners #81

Open purplefox opened 3 months ago

purplefox commented 3 months ago

List of server listen addresses and corresponding TLS config are currently configured for:

Each one of these needs:

We should create a ListenerConfig struct and use that as type for configuring kafka server, http api etc, in conf.Config.

Advertised listeners is new. Advertised listeners is important for the case where, e.g. there's a proxy or some other routing between the address the server actually listens at and the address the client needs to connect at. (advertised listener being the address the client would try to connect to).

We will need to make sure the value of advertised listeners not the value of listeners is passed to the client for connecting.

E.g. for kafka advertised listeners, if specified those addresses should be sent to the client in the BrokerInfo.

For intra cluster advertised listeners those values should be used, if specified to make a remoting connection from one node to another.

For web console and http api advertised listeners would not be used as we do not send any addresses to the client.

We should also disallow wildcard addresses e.g. 0.0.0.0:8880 or :8880 being used for advertised listeners, or for listeners if no advertised listener is provided.

devguyio commented 2 months ago

I'm picking this up