My company is using Cassandra (2.1.8), running on debian servers.
Without setting a consistency on my queries/preparedStatements, I would sometimes get "null" back from a "SELECT * FROM table_name WHERE key = ?"
. After adding:
statementGet.setConsistencyLevel(ConsistencyLevel.ONE);
I get an answer every time. But from the article below: Read/Write Strategy For Consistency Level
If you don't care about consistency, then this discussion is moot; read/write with whatever Consistency Level and let Cassandra's asynchronous replication and anti-entropy features do their work. That said, though your goal is minimizing network traffic/cost, if your workload is mostly reads then the added cost of doing writes at CL QUORUM or ALL may not actually be that much.
it is said that my consistency levels do not matter, if I don't care about consistency. And I don't. It doesn't not matter much to me if the data is hours or days old. But I do care about getting data everytime.
What I need to know is: Do I need to put a consistency level on my Writes as well, to ensure that they are actually written, and that my Read will always retrieve a value, if I have previously written anything.
And what might that consistency level be, given the above criteria?