2

I'm running YCSB on a 6-node Cassandra cluster with default settings. Assuming that the client has built connection with the coordinator, and found sufficient replicas to meet its consistency level, what will happen if:

(1) the coordinator is down? Will the YCSB client contacts a different coordinator?

(2) some of the replicas are down? Will it retry or simply fail the request?

roymaztang
  • 65
  • 5

1 Answers1

1

Please only ask one question at a time. In answer to your questions:

  1. If the node chosen as the coordinator is down, then another node will be chosen as coordinator. Note, that the clients should be connecting with the TokenAwareLoadBalancingPolicy (is that configurable in YCSB?) which will negate the need for designating a coordinator node as long as a partition key is passed in the query (which all of your client-side queries should be doing).

  2. That depends on the consistency level designated on the client side. If the client is operating at QUORUM consistency, and your keyspace is defined with a replication factor (RF) of 3, then you only need to be able to hit two replicas. If the client operates at consistency of ONE, then you only need to find one. So if you have a RF of 3, and are querying at ONE or LOCAL_ONE two nodes could be down and you could still serve requests. YCSB should really have a way to configure that.

Aaron
  • 55,518
  • 11
  • 116
  • 132
  • Thanks for your comments! Regarding the second question, I am using a consistency level of ONE. Will cassandra fail or retry the request when the chosen replica becomes unavailable? (assuming the chosen replica fails before response.) – roymaztang Dec 16 '16 at 15:19
  • @roymaztang If your consistency requirements cannot be met (say if all 3 copies of the requested data become unavailable), Cassandra will fail the request. – Aaron Dec 16 '16 at 15:37
  • So it will fail if the available replicas are not enough to meet the consistency level. If the chosen replica becomes unavailable before response, and the rest of available replicas are still enough to meet the requirement, will Cassandra retry until timeout? – roymaztang Dec 16 '16 at 16:25
  • @roymaztang You can specify retry configuration on the client side. But yes, if the remaining available replicas can satisfy the request, it will succeed. – Aaron Dec 16 '16 at 16:39