0

I tried to deploy an application for the first time in EC2. I had three instances of cassandra in the same region with an EC2 snitch. I used datastax java driver for application connectivity.

At keyspace level, i configured NetworkTopology Strategy. When i tried to do a read operation with Consistency of QUORUM, it failed for me. I had to degrade my consistency to ONE to use the application for reads.It again failed for me.

So I had to change the keyspace config to SimpleStrategy. To my surprise , it worked with consistency ONE . But why not for NetworkTopologyStrategy?

Can you please let me know what i am missing in this case?

Ananth
  • 971
  • 9
  • 23
  • Can you post your keyspace definition? – Aaron Nov 07 '14 at 15:31
  • A { 'class':'NetworkTopologyStrategy','us-east':3} – Ananth Nov 07 '14 at 17:33
  • When I tried to create and table and add a value, I get "one or more nodes unavailable". When I changed the topology to SimpleStrategy with RF 3 , it worked. Is NetworkTopologyStrategy not supported for EC2 snitch? – Ananth Nov 07 '14 at 17:35
  • No, NetworkTopology should definitely be used for EC2Snitch. Any chance you can post the output of `nodetool status`? – Aaron Nov 07 '14 at 17:49
  • Nodetool status was fine with zone name 2a,2b and 2c used up for RAC. I still don't understand why even cqlsh throw "one or more nodes unavailable " for inserts in a table that had keyspace configuration NetworkTopology. When I changed to SimpleStrategy,it inserts happened. Cassandra version is 2.0.3 – Ananth Nov 07 '14 at 18:14
  • I just configured the snitch to be EC2Snitch. as per the documentation, the it will automatically detect all configs to allocate RAC and DC config. All worked. But when I created a keyspace and tried to insert or read with Quorum consistency from driver, it failed. When I tried to insert in one node using cqlsh, I get the error "one or more nodes unavailable . – Ananth Nov 07 '14 at 18:16
  • Editing the main post stating the trial with another way – Ananth Nov 07 '14 at 18:24
  • From what you have stated, this should work. Is there a way you can post nodetool status, your keyspace definition and the precise tests you have tried from cqlsh? – phact Nov 11 '14 at 00:06

0 Answers0