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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0.0, 1.1.0
    • 2.1.0
    • clients
    • 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

              ecomar Edoardo Comar
              ecomar Edoardo Comar
              Rajini Sivaram Rajini Sivaram
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: