3
votes

I read Tyler Hobbs's guide to basic modelling in cassandra, here https://www.datastax.com/dev/blog/basic-rules-of-cassandra-data-modeling and I notice the 1st footnote that said counter is exception to how cheap cassandra write is.

What's so inefficient about cassandra counter is ?

1

1 Answers

2
votes

check this and this to understand.

One statement regarding counter performance in above link:

The new implementation does come with a price. Because we perform a mutexed read-before-write now, latency for CL.ONE (or RF=1) to would suffer with a naive implementation, particularly for many updates contenting for few counter objects. To mitigate this, Cassandra 2.1 introduces a new form of cache, counter cache, to keep hot counter values performant. Counter cache size and save period can be configured in cassandra.yaml.