[
https://issues.apache.org/jira/browse/CASSANDRA-14361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17116318#comment-17116318
]
Ben Bromhead commented on CASSANDRA-14361:
------------------------------------------
Rebased (I think, my git foo is weak).
I'll look to move the threshold property into cassandra.yaml as well.
I'm not sure if we want to revert to the old behaviour as the old behavior is
probably less deterministic that people realise.
For example if you get entries in an A records for a single query most Java
implementations will maintain the order of those records, but some OSs will do
ordering differently (e.g. Windows Vista will order records based on which
address shares the most number of significant bits with the network adapters
IP??... which broke a lot of round robin implementations back in the day).
On top of this, the DNS resolver also doesn't provide ordering guarantees and
most by default will round robin the order of the entries in an A record. Plus
this is all ignoring DNS caching behaviour, which on the other hand, is
probably masking a lot of the above.
So any reliance on old behavior is potentially non-deterministic anyway!
Plus its 4.0 and I would guess the majority of people are using IP addresses or
single entries A records anyway?
> Allow SimpleSeedProvider to resolve multiple IPs per DNS name
> -------------------------------------------------------------
>
> Key: CASSANDRA-14361
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14361
> Project: Cassandra
> Issue Type: Improvement
> Components: Local/Config
> Reporter: Ben Bromhead
> Assignee: Ben Bromhead
> Priority: Low
> Fix For: 4.0
>
>
> 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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]