You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Arun Sandu <ar...@gmail.com> on 2016/03/01 21:12:04 UTC

Snitch for AWS EC2 nondefaultVPC

Hi all,

All our nodes are launched in AWS EC2 VPC (private). We have 2
datacenters(1 us-east , 1- asiapacific) and all communication is through
private IP's and don't have any public IPs. What is the recommended snitch
to be used? We currently have GossipingPropertyFileSnitch.

1. If Ec2MultiRegionSnitch, then what would be the broadcast_address?
2. If not Ec2MultiRegionSnitch, which snitch better fits this environment?

*Ref:*
As per the document Ec2MultiRegionSnitch
<http://docs.datastax.com/en/cassandra/2.1/cassandra/architecture/architectureSnitchEC2MultiRegion_c.html>,set
the listen_address
<http://docs.datastax.com/en/cassandra/2.1/cassandra/configuration/configCassandra_yaml_r.html#reference_ds_qfg_n1r_1k__listen_address>
to the *private* IP address of the node, and the broadcast_address
<http://docs.datastax.com/en/cassandra/2.1/cassandra/configuration/configCassandra_yaml_r.html#reference_ds_qfg_n1r_1k__broadcast_address>
to the *public* IP address of the node.

-- 
Thanks
Arun

Re: Snitch for AWS EC2 nondefaultVPC

Posted by Arun Sandu <ar...@gmail.com>.
Thanks Asher.

Yes, I agree. It would be better if someone can help us with clear
documentation about this.

As the cross data communication is through private IP, I would consider
updating braodcast_address to private IP and use Ec2MultiRegionSnitch.

On Tue, Mar 1, 2016 at 3:26 PM, Asher Newcomer <as...@gmail.com> wrote:

> Hi Arun,
>
> This distinction has been a can of worms for me also - and I'm not sure my
> understanding is entirely correct.
>
> I use GossipingPropertyFileSnitch for my multi-region setup, which seems
> to be more flexible than the Ec2 snitches. The Ec2 snitches should work
> also, but their behavior is more opaque from my perspective.
>
> AFAIK - if all of your nodes can reach each other via private IP, and your
> anticipated clients can reach all nodes via their private IP, then using
> the private IP address as the broadcast_address is fine.
>
> If there will ever be a situation where a client or node will need to
> reach some part of the cluster using public IPs, then public IPs should be
> used as the broadcast_address.
>
> A simple flow-chart / diagram of how these various settings are used by
> Cassandra would be very helpful for people new to the project.
>
> Regards,
>
> Asher
>
> On Tue, Mar 1, 2016 at 3:12 PM, Arun Sandu <ar...@gmail.com> wrote:
>
>> Hi all,
>>
>> All our nodes are launched in AWS EC2 VPC (private). We have 2
>> datacenters(1 us-east , 1- asiapacific) and all communication is through
>> private IP's and don't have any public IPs. What is the recommended snitch
>> to be used? We currently have GossipingPropertyFileSnitch.
>>
>> 1. If Ec2MultiRegionSnitch, then what would be the broadcast_address?
>> 2. If not Ec2MultiRegionSnitch, which snitch better fits this environment?
>>
>> *Ref:*
>> As per the document Ec2MultiRegionSnitch
>> <http://docs.datastax.com/en/cassandra/2.1/cassandra/architecture/architectureSnitchEC2MultiRegion_c.html>,set
>> the listen_address
>> <http://docs.datastax.com/en/cassandra/2.1/cassandra/configuration/configCassandra_yaml_r.html#reference_ds_qfg_n1r_1k__listen_address>
>> to the *private* IP address of the node, and the broadcast_address
>> <http://docs.datastax.com/en/cassandra/2.1/cassandra/configuration/configCassandra_yaml_r.html#reference_ds_qfg_n1r_1k__broadcast_address>
>> to the *public* IP address of the node.
>>
>> --
>> Thanks
>> Arun
>>
>
>


-- 
Thanks
Arun

Re: Snitch for AWS EC2 nondefaultVPC

Posted by Asher Newcomer <as...@gmail.com>.
Hi Arun,

This distinction has been a can of worms for me also - and I'm not sure my
understanding is entirely correct.

I use GossipingPropertyFileSnitch for my multi-region setup, which seems to
be more flexible than the Ec2 snitches. The Ec2 snitches should work also,
but their behavior is more opaque from my perspective.

AFAIK - if all of your nodes can reach each other via private IP, and your
anticipated clients can reach all nodes via their private IP, then using
the private IP address as the broadcast_address is fine.

If there will ever be a situation where a client or node will need to reach
some part of the cluster using public IPs, then public IPs should be used
as the broadcast_address.

A simple flow-chart / diagram of how these various settings are used by
Cassandra would be very helpful for people new to the project.

Regards,

Asher

On Tue, Mar 1, 2016 at 3:12 PM, Arun Sandu <ar...@gmail.com> wrote:

> Hi all,
>
> All our nodes are launched in AWS EC2 VPC (private). We have 2
> datacenters(1 us-east , 1- asiapacific) and all communication is through
> private IP's and don't have any public IPs. What is the recommended snitch
> to be used? We currently have GossipingPropertyFileSnitch.
>
> 1. If Ec2MultiRegionSnitch, then what would be the broadcast_address?
> 2. If not Ec2MultiRegionSnitch, which snitch better fits this environment?
>
> *Ref:*
> As per the document Ec2MultiRegionSnitch
> <http://docs.datastax.com/en/cassandra/2.1/cassandra/architecture/architectureSnitchEC2MultiRegion_c.html>,set
> the listen_address
> <http://docs.datastax.com/en/cassandra/2.1/cassandra/configuration/configCassandra_yaml_r.html#reference_ds_qfg_n1r_1k__listen_address>
> to the *private* IP address of the node, and the broadcast_address
> <http://docs.datastax.com/en/cassandra/2.1/cassandra/configuration/configCassandra_yaml_r.html#reference_ds_qfg_n1r_1k__broadcast_address>
> to the *public* IP address of the node.
>
> --
> Thanks
> Arun
>

RE: Snitch for AWS EC2 nondefaultVPC

Posted by Jun Wu <wu...@hotmail.com>.
I've worked on some experiments with AWS EC2. According to the doc you provided and from my own experience, EC2Multiregionsnitich should be the right setting as you have 2 different datacenters.
In cassandra.yaml: change seeds to public address list, change listen and rpc address to private address, change broadcast address to public address, use Ec2MultiRegionSnitch.
Hope it works!

Date: Tue, 1 Mar 2016 15:12:04 -0500
Subject: Snitch for AWS EC2 nondefaultVPC
From: arunsandu666@gmail.com
To: user@cassandra.apache.org

Hi all,

All our nodes are launched in AWS EC2 VPC (private). We have 2 datacenters(1 us-east , 1- asiapacific) and all communication is through private IP's and don't have any public IPs. What is the recommended snitch to be used? We currently have GossipingPropertyFileSnitch.

1. If Ec2MultiRegionSnitch, then what would be the broadcast_address?
2. If not Ec2MultiRegionSnitch, which snitch better fits this environment?

Ref:
As per the document Ec2MultiRegionSnitch,set  the listen_address to the private
          IP address of the node, and the broadcast_address to the public IP address of the node. 
-- 
Thanks
Arun

 		 	   		  

Re: Snitch for AWS EC2 nondefaultVPC

Posted by Robert Coli <rc...@eventbrite.com>.
On Wed, Mar 2, 2016 at 7:21 AM, Arun Sandu <ar...@gmail.com> wrote:
>
> All the nodes in both datacenters are in DSE Search Mode(Solr). We may
> have analytics datacenter as well in future. Will this have any impact in
> using Ec2MultiRegionSnitch?
>

This list does not support DSE, but as I understand it, they create a faux
DC for use for analytics.

EC2MRSnitch forces your DC to be what amazon says for host region. It
stands to reason that if it's forced to host region, it can't be set to the
value of "faux DC for analytics".

=Rob

Re: Snitch for AWS EC2 nondefaultVPC

Posted by Arun Sandu <ar...@gmail.com>.
Thanks Robert,

All the nodes in both datacenters are in DSE Search Mode(Solr). We may have
analytics datacenter as well in future. Will this have any impact in using
Ec2MultiRegionSnitch?

On Tue, Mar 1, 2016 at 7:10 PM, Robert Coli <rc...@eventbrite.com> wrote:

> On Tue, Mar 1, 2016 at 12:12 PM, Arun Sandu <ar...@gmail.com>
> wrote:
>
>> All our nodes are launched in AWS EC2 VPC (private). We have 2
>> datacenters(1 us-east , 1- asiapacific) and all communication is through
>> private IP's and don't have any public IPs. What is the recommended snitch
>> to be used? We currently have GossipingPropertyFileSnitch.
>>
>
> I recommend using GPFS unless you're absolutely certain you will never
> want to rely on any host but Amazon, and you will never want to (for
> example) have an analytics pseudo-datacenter within AWS.
>
> =Rob
>
>


-- 
Arun

Re: Snitch for AWS EC2 nondefaultVPC

Posted by Robert Coli <rc...@eventbrite.com>.
On Tue, Mar 1, 2016 at 12:12 PM, Arun Sandu <ar...@gmail.com> wrote:

> All our nodes are launched in AWS EC2 VPC (private). We have 2
> datacenters(1 us-east , 1- asiapacific) and all communication is through
> private IP's and don't have any public IPs. What is the recommended snitch
> to be used? We currently have GossipingPropertyFileSnitch.
>

I recommend using GPFS unless you're absolutely certain you will never want
to rely on any host but Amazon, and you will never want to (for example)
have an analytics pseudo-datacenter within AWS.

=Rob