Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cassandra writes - How many nodes?

Tags:

cassandra

I'm probably just missing something here, but my search terms have all been to general to get meaningful results.

Assume RF = Replication Factor

When I write a value to the database, does it write the value to RF nodes or does it write it to one node and replicate it RF nodes?

like image 525
Hayley Guillou Avatar asked Dec 21 '25 13:12

Hayley Guillou


1 Answers

That depends on the request you send. In the write request you can specify the consistency level:

  • ALL: it will write to all RF nodes before returning
  • QUORUM: it will write to a quorum of nodes before returning
  • ONE: it writes to one node before returning. After returning it waits response from RF-1 nodes.
  • LOCAL_QUORUM

...

See other possible values here: http://docs.datastax.com/en/cassandra/2.0/cassandra/dml/dml_config_consistency_c.html

Eventually all RF nodes will have the written data.

like image 85
rodolk Avatar answered Dec 24 '25 01:12

rodolk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!