You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Bob Barrett (Jira)" <ji...@apache.org> on 2023/11/13 21:42:00 UTC

[jira] [Created] (KAFKA-15817) Avoid reconnecting to the same IP address if multiple addresses are available

Bob Barrett created KAFKA-15817:
-----------------------------------

             Summary: Avoid reconnecting to the same IP address if multiple addresses are available
                 Key: KAFKA-15817
                 URL: https://issues.apache.org/jira/browse/KAFKA-15817
             Project: Kafka
          Issue Type: Bug
    Affects Versions: 3.5.1, 3.6.0, 3.4.1, 3.3.2
            Reporter: Bob Barrett


In https://issues.apache.org/jira/browse/KAFKA-12193, we changed the DNS resolution behavior for clients to re-resolve DNS after disconnecting from a broker, rather than wait until we iterated over all addresses from a given resolution. This is useful when the IP addresses have changed between the connection and disconnection.

However, with the behavior change, this does mean that clients could potentially reconnect immediately to the same IP they just disconnected from, if the IPs have not changed. In cases where the disconnection happened because that IP was unhealthy (such as a case where a load balancer has instances in multiple availability zones and one zone is unhealthy, or a case where an intermediate component in the network path is going through a rolling restart), this will delay the client successfully reconnecting. To address this, clients should remember the IP they just disconnected from and skip that IP when reconnecting, as long as the address resolved to multiple addresses.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)