Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

ranjeet_ranjee avatar image
ranjeet_ranjee asked ·

Why do writes fail when one node is down?

Hi,

I have 2 Node cluster. If any one node is down the then even the active node did not save data.

My Exiting setup

CREATE KEYSPACE xyz WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '2'}  AND durable_writes = true;
cassandra
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Erick Ramirez avatar image
Erick Ramirez answered ·

With a replication factor of 2, writes failing when one node is down indicates that you are writing with a consistency level higher than ONE or LOCAL_ONE (for example LOCAL_QUORUM, QUORUM, TWO).

A quorum of two replicas is two (50% + 1). This means that a replication factor of 2 cannot tolerate a node outage for operations with a strong consistency.

For this reason we recommend a minimum of three nodes per DC in production so you can configure 3 replicas per DC. This configuration can tolerate a node outage and still achieve a strong consistency. Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

on_wisdom_181819 avatar image
on_wisdom_181819 answered ·

Hello , as i know it depends on type of your write consistency, the default value is ONE and it means if during your action respective coordinator goes down then your write will fail .

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.