[ 
https://issues.apache.org/jira/browse/CASSANDRA-14361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17656109#comment-17656109
 ] 

Stefan Miklosovic edited comment on CASSANDRA-14361 at 1/9/23 2:03 PM:
-----------------------------------------------------------------------

I incorporated the feedback of [~adelapena] in my branch here (rebased + 
squashed what was there and added the changes on top in one commit).

I have added that parameter in seed provider and removed it from top-level 
cassandra.yaml.

[~adelapena] would you mind to review again?

PR: https://github.com/apache/cassandra/pull/2067/commits
the build is running here: 
https://ci-cassandra.apache.org/view/patches/job/Cassandra-devbranch/2167/

EDIT: btw I am not completely sure how to test this other than empirically. The 
problem I see, if I remember correctly, is that Mockito is not able to mock 
static methods and we are using such method in that logic. Ideally I would like 
to say what IPs so and so hostname returns and based on the configuration 
property in seed provider I would assert their length however I just see that 
mocking of static methods was not possible prior Mockito 3.4.0 and we are on 
4.7.0 so it should be possible. I ll try to do a test as well but I think it is 
good to review already.


was (Author: smiklosovic):
I incorporated the feedback of [~adelapena] in my branch here (rebased + 
squashed what was there and added the changes on top in one commit).

I have added that parameter in seed provider and removed it from top-level 
cassandra.yaml.

[~adelapena] would you mind to review again?

PR: https://github.com/apache/cassandra/pull/2067/commits
the build is running here: 
https://ci-cassandra.apache.org/view/patches/job/Cassandra-devbranch/2167/

> 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: Stefan Miklosovic
>            Priority: Low
>             Fix For: 4.x
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> 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.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to