You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by Colin McCabe <cm...@apache.org> on 2021/11/01 22:08:27 UTC

Re: Allowing both IPv4 and IPv6 connections on the same port

Hi Matthew,

I think you should create a KIP for this proposal, since it is a change to our public interfaces. Also, there are some subtle questions that we need to answer, like do the ipv4 and ipv6 interfaces that share the same port also have to share the same security protocol?

best,
Colin


On Fri, Sep 24, 2021, at 01:44, Matthew de Detrich wrote:
> Hello everyone,
>
> I wanted to ask if anyone has any thoughts/objections regarding Kafka
> allowing multiple listeners of the same port as long as one is IPv4 and the
> other is IPv6, i.e.
>
> listeners=PLAINTEXT://127.0.0.1:9092,PLAINTEXTV6://[::1]:9092
> listener.security.protocol.map=PLAINTEXT:PLAINTEXT,PLAINTEXTV6:PLAINTEXT
>
> Currently Kafka enforces that every listener has to have a unique port
> which doesn't allow such a configuration.
>
> Disabling this check and allowing such a configuration doesn't seem to
> cause any issues but I may be missing potential problems with allowing both
> IPv4 and IPv6 on the same port, does anyone have comments on this?
>
> Relevant Ticket: https://issues.apache.org/jira/browse/KAFKA-13299
>
> -- 
>
> Matthew de Detrich
>
> *Aiven Deutschland GmbH*
>
> Immanuelkirchstraße 26, 10405 Berlin
>
> Amtsgericht Charlottenburg, HRB 209739 B
>
> Geschäftsführer: Oskari Saarenmaa & Hannu Valtonen
>
> *m:* +491603708037
>
> *w:* aiven.io *e:* matthew.dedetrich@aiven.io

Re: Allowing both IPv4 and IPv6 connections on the same port

Posted by Matthew de Detrich <ma...@aiven.io.INVALID>.
So I have just created a PR implementation this that does not require
adding a new SecurityProtocol as originally suggested, i.e. you can use
PLAINTEXT://127.0.0.1:9092,PLAINTEXT://[::1]:9092 but it only passes the
validation in the specific case of having 2 addresses on the same port with
one being IPv4 and the other being IPv6 otherwise the original validation
still applies.

PR is open at https://github.com/apache/kafka/pull/11478, feel free to
review/comment on it.

On Mon, Nov 1, 2021 at 11:09 PM Colin McCabe <cm...@apache.org> wrote:

> Hi Matthew,
>
> I think you should create a KIP for this proposal, since it is a change to
> our public interfaces. Also, there are some subtle questions that we need
> to answer, like do the ipv4 and ipv6 interfaces that share the same port
> also have to share the same security protocol?
>
> best,
> Colin
>
>
> On Fri, Sep 24, 2021, at 01:44, Matthew de Detrich wrote:
> > Hello everyone,
> >
> > I wanted to ask if anyone has any thoughts/objections regarding Kafka
> > allowing multiple listeners of the same port as long as one is IPv4 and
> the
> > other is IPv6, i.e.
> >
> > listeners=PLAINTEXT://127.0.0.1:9092,PLAINTEXTV6://[::1]:9092
> > listener.security.protocol.map=PLAINTEXT:PLAINTEXT,PLAINTEXTV6:PLAINTEXT
> >
> > Currently Kafka enforces that every listener has to have a unique port
> > which doesn't allow such a configuration.
> >
> > Disabling this check and allowing such a configuration doesn't seem to
> > cause any issues but I may be missing potential problems with allowing
> both
> > IPv4 and IPv6 on the same port, does anyone have comments on this?
> >
> > Relevant Ticket: https://issues.apache.org/jira/browse/KAFKA-13299
> >
> > --
> >
> > Matthew de Detrich
> >
> > *Aiven Deutschland GmbH*
> >
> > Immanuelkirchstraße 26, 10405 Berlin
> >
> > Amtsgericht Charlottenburg, HRB 209739 B
> >
> > Geschäftsführer: Oskari Saarenmaa & Hannu Valtonen
> >
> > *m:* +491603708037
> >
> > *w:* aiven.io *e:* matthew.dedetrich@aiven.io
>


-- 

Matthew de Detrich

*Aiven Deutschland GmbH*

Immanuelkirchstraße 26, 10405 Berlin

Amtsgericht Charlottenburg, HRB 209739 B

Geschäftsführer: Oskari Saarenmaa & Hannu Valtonen

*m:* +491603708037

*w:* aiven.io *e:* matthew.dedetrich@aiven.io

Re: Allowing both IPv4 and IPv6 connections on the same port

Posted by Matthew de Detrich <ma...@aiven.io.INVALID>.
Hi Colin,

Would you be able to describe how the change would affect public
interfaces? As far as I understand this would have only required loosening
the current validation within Kafka which shouldn't create any public
facing breaking changes, or maybe I am missing something.

On Mon, Nov 1, 2021 at 11:09 PM Colin McCabe <cm...@apache.org> wrote:

> Hi Matthew,
>
> I think you should create a KIP for this proposal, since it is a change to
> our public interfaces. Also, there are some subtle questions that we need
> to answer, like do the ipv4 and ipv6 interfaces that share the same port
> also have to share the same security protocol?
>
> best,
> Colin
>
>
> On Fri, Sep 24, 2021, at 01:44, Matthew de Detrich wrote:
> > Hello everyone,
> >
> > I wanted to ask if anyone has any thoughts/objections regarding Kafka
> > allowing multiple listeners of the same port as long as one is IPv4 and
> the
> > other is IPv6, i.e.
> >
> > listeners=PLAINTEXT://127.0.0.1:9092,PLAINTEXTV6://[::1]:9092
> > listener.security.protocol.map=PLAINTEXT:PLAINTEXT,PLAINTEXTV6:PLAINTEXT
> >
> > Currently Kafka enforces that every listener has to have a unique port
> > which doesn't allow such a configuration.
> >
> > Disabling this check and allowing such a configuration doesn't seem to
> > cause any issues but I may be missing potential problems with allowing
> both
> > IPv4 and IPv6 on the same port, does anyone have comments on this?
> >
> > Relevant Ticket: https://issues.apache.org/jira/browse/KAFKA-13299
> >
> > --
> >
> > Matthew de Detrich
> >
> > *Aiven Deutschland GmbH*
> >
> > Immanuelkirchstraße 26, 10405 Berlin
> >
> > Amtsgericht Charlottenburg, HRB 209739 B
> >
> > Geschäftsführer: Oskari Saarenmaa & Hannu Valtonen
> >
> > *m:* +491603708037
> >
> > *w:* aiven.io *e:* matthew.dedetrich@aiven.io
>


-- 

Matthew de Detrich

*Aiven Deutschland GmbH*

Immanuelkirchstraße 26, 10405 Berlin

Amtsgericht Charlottenburg, HRB 209739 B

Geschäftsführer: Oskari Saarenmaa & Hannu Valtonen

*m:* +491603708037

*w:* aiven.io *e:* matthew.dedetrich@aiven.io