[
https://issues.apache.org/jira/browse/CASSANDRA-15337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17067948#comment-17067948
]
Serban Teodorescu commented on CASSANDRA-15337:
-----------------------------------------------
[~stefan.genov] I think I encountered the same problem, and it has nothing to
do with the snitch. It's probably due to how you connect to the cluster. In the
3.x version of the Java driver the example for DCAwareRoundRobinPolicy uses
withUsedHostsPerRemoteDc(2) at
[https://github.com/datastax/java-driver/blob/3.2.x/manual/load_balancing/README.md#dcawareroundrobinpolicy.|https://github.com/datastax/java-driver/blob/3.2.x/manual/load_balancing/README.md#dcawareroundrobinpolicy]
If you use something like that, try ".withUsedHostsPerRemoteDc(0)". With a
larger than zero argument some requests (not many) will slip through to the
remote DC, even with LOCAL_. I think the intention was to use this as an
automatic recovery mechanism in case of a datacenter failure. In the latest
version of the Java driver this was dropped. See
[https://github.com/datastax/java-driver/blob/4.x/manual/core/load_balancing/README.md]
> Document usage of Ec2Snitch for multiple regions cluster
> --------------------------------------------------------
>
> Key: CASSANDRA-15337
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15337
> Project: Cassandra
> Issue Type: Improvement
> Components: Documentation/Website
> Reporter: Serban Teodorescu
> Assignee: Serban Teodorescu
> Priority: Normal
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Ec2MultiRegionSnitch was (probably) done because it was not possible in AWS
> to have intra-region VPC peering. This changed pin 2017, see [AWS
> announcement|https://aws.amazon.com/about-aws/whats-new/2017/11/announcing-support-for-inter-region-vpc-peering/]
> (and extended with 9 more regions in 2018, see
> [link|https://aws.amazon.com/about-aws/whats-new/2018/02/inter-region-vpc-peering-is-now-available-in-nine-additional-aws-regions/]):
> {quote}Inter-Region VPC Peering allows VPC resources like EC2 instances[...]
> running in different AWS regions to communicate with each other using private
> IP addresses, without requiring gateways, VPN connections or separate network
> appliances.
> {quote}
> Since the datacenter/rack names are loaded in Ec2Snitch using AWS API there
> is no reason why this snitch would not work in a multi-datacenter setup. I
> tested and used this in a production environment. So the documentation should
> be changed to include this usage.
> Proposed change:
> [https://github.com/apache/cassandra/compare/trunk...serban21:15337-trunk]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]