Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-14361

Allow SimpleSeedProvider to resolve multiple IPs per DNS name

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 5.0-alpha1, 5.0
    • Local/Config
    • None

    Description

      Currently SimpleSeedProvider can accept a comma separated string of IPs or hostnames as the set of Cassandra seeds. hostnames are resolved via InetAddress.getByName, which will only return the first IP associated with an A, AAAA or CNAME record.

      By changing to InetAddress.getAllByName, existing behavior is preserved, but now Cassandra can discover multiple IP address per record, allowing seed discovery by DNS to be a little easier.

      Some examples of improved workflows with this change include: 

      • specify the DNS name of a headless service in Kubernetes which will resolve to all IP addresses of pods within that service. 
      • seed discovery for multi-region clusters via AWS route53, AzureDNS etc
      • Other common DNS service discovery mechanisms.

      The only behavior this is likely to impact would be where users are relying on the fact that getByName only returns a single IP address.

      I can't imagine any scenario where that is a sane choice. Even when that choice has been made, it only impacts the first startup of Cassandra and would not be on any critical path.

      Attachments

        Issue Links

          Activity

            People

              smiklosovic Stefan Miklosovic
              benbromhead Ben Bromhead
              Stefan Miklosovic
              Andres de la Peña
              Votes:
              3 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 40m
                  1h 40m