Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-6863

Kafka clients should try to use multiple DNS resolved IP addresses if the first one fails

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0, 1.1.0
    • Fix Version/s: 2.1.0
    • Component/s: clients
    • Labels:
      None

      Description

      Currently Kafka clients resolve a symbolic hostname using
       new InetSocketAddress(String hostname, int port)

      which only picks one IP address even if the DNS has multiple records for the hostname, as it calls
      InetAddress.getAllByName(host)[0]

      For some environments where the hostnames are mapped by the DNS to multiple IPs, e.g. in clouds where the IPs point to the external load balancers, it would be preferable that the client, on failing to connect to one of the IPs, would try the other ones before giving up the connection.

       

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ecomar Edoardo Comar
                Reporter:
                ecomar Edoardo Comar
                Reviewer:
                Rajini Sivaram
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: