Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] IPv6

When the routing issue is fixed, the connection will restore itself.

The problem is not that I need a backup link, it's that mosquitto will always retry the same address.

For example:
    root@OpenWrt:~# nslookup broker.domain.com
    Server:    127.0.0.1
    Address 1: 127.0.0.1 localhost

    Name:      broker.iot.broker.com
    Address 1: 1234:1234:3::1234:1234  --> IPv6 not reachable
    Address 2: 123.123.123.1 broker1.domain.com --> IPv4 reachable
    Address 3: 123.123.123.2 broker2.domain.com --> IPv4 reachable
    Address 4: 123.123.123.3 broker3.domain.com --> IPv4 reachable

If I try to connect to broker.domain.com, mosquitto will always try to connect to the first in the list of resolved ip-addresses.
If it thinks it has a valid route, it will try and connect. However if this connection times out, on the next attempt it will again select the same address instead of choosing a different one.
The order in which the resolved ip-addresses are returned is random, however the IPv6 addresses are returned first.

For my use-case, I cannot always guarantee that the IPv6 route is valid, so in some cases this connection will keep timing out.
Just disabling IPv6 on my device is not an option because if it's available, I want to use it.

My patch will make sure that if an attempt was made to an IPv6 address, and it fails, the next time it will skip IPv6 and try over IPv4.

This problem is not uncommon as IPv6 networks around the world are not always known for their reliability.
Other applications (eg. cUrl) use the previously mentioned 'Happy Eyeballs' algorithm to get around this issue.


On Tue, Oct 3, 2017 at 1:02 PM, Tatsuzo Osawa <tatsuzo.osawa@xxxxxxxxx> wrote:
Did you improve bridge connections originated from mosquitto toward AWS IoT?
Any particular reason not using round_robin directive to maintain
backup bridge uplink?
Sorry if I misunderstood due to unconfirmed your patch.
_______________________________________________
mosquitto-dev mailing list
mosquitto-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/mosquitto-dev


Back to the top