It's pretty straightforward - there is documentation here
<http://docs.datastax.com/en/cassandra/2.0/cassandra/architecture/architectureSnitchEC2_t.html>.
Simply set endpoint_snitch: Ec2Snitch in cassandra.yaml when creating the
cluster and create keyspaces with the necessary NetworkTopologyStrategy.
The only real gotcha that I've run into is that the "datacenter"
(cassandra) and "regions" (AWS) match up 1:1 except for us-east-1 (it's
just "us-east " in the Ec2Snitch.)

Below are some examples that specify that data for that keyspace will be
present on 3 nodes. See consistency documentation
<http://docs.datastax.com/en/cassandra/2.0/cassandra/dml/dml_config_consistency_c.html>
for
how to tune your clients to meet certain consistency guarantees.

CREATE KEYSPACE ExampleKeyspace WITH REPLICATION = { 'class' :
'NetworkTopologyStrategy', 'us-east' : 3 };

CREATE KEYSPACE ExampleKeyspace WITH REPLICATION = { 'class' :
'NetworkTopologyStrategy', 'us-west-2' : 3 };


Jared Biel | Bolder Thinking | 701-205-3153 | jared.b...@bolderthinking.com

On 27 May 2015 at 16:31, Kaushal Shriyan <kaushalshri...@gmail.com> wrote:

> Hi,
>
> Can somebody please share me details about setting up of EC2snitch in AWS
> single region which has availability zone 1a and 1b? I am using Cassandra
> version 1.2.19 in the setup.
>
> I would appreciate your help.
>
> Regards,
>
> Kaushal
>

Reply via email to