Cassandra
Tags: Databases, distributed systems
Internals
- Seed nodes:
- No purpose other than bootstrapping the gossip process
- DO NOT MAKE ALL NODES SEED NODES
concurrent_compactors
- Sets the number of IO threads dedicated to compaction
- If too high, can cause IO starvation and not servicing requests
- Depends on NVME drives
- set by the
concurrenct_compactors
string in yaml- can also use
nodetool setconcurrent_compactors
in C* > 3
- can also use
Counter Table TTL’s
- https://issues.apache.org/jira/browse/CASSANDRA-2103
- https://blog.knoldus.com/cassandra-counter-column-and-table/
- https://docs.scylladb.com/using-scylla/counters/
- https://docs.scylladb.com/getting-started/time_to_live/
- https://stackoverflow.com/questions/29564744/data-modeling-with-counters-in-cassandra-expiring-columns
- https://github.com/Netflix/astyanax/wiki/Working-with-counter-columns
- https://dzone.com/articles/cassandra-counter-columns-and-tables
- https://stackoverflow.com/questions/24881957/what-is-the-way-for-counting-number-of-columns-in-row-in-cassandra
- https://www.ably.io/blog/cassandra-counter-columns-nice-in-theory-hazardous-in-practice
Jolokia Agent
- https://stackoverflow.com/questions/35318593/jolokia-agent-for-cassandra
- https://stackoverflow.com/questions/35318593/jolokia-agent-for-cassandra
CQLSH
- cqlsh specifically checks for
python2.7
, which may need to be aliased somewhere
Scylla
- Xandra driver uses https://queue.acm.org/appendices/codel.html
- Whether tweaking
tombstone_compaction_interval
affects things: https://github.com/PaytmLabs/cassandra/blob/master/src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java#L360
Tracing
-
https://opensource.docs.scylladb.com/stable/using-scylla/tracing.html#probabilistic-tracing
-
normally you can turn on CQL tracing with
cqlsh> TRACING ON
-
also can set
nodetool settraceprobability 0.0001
Cassandra Gossiper Protocol
- Gossiper chooses a random node in the cluster and initializes a session with it
- each gossip require 3 messages
- Sends its friend a Gossip Disget Syn Message
- Followed by a GossipDigestAck message
- Th eoriginal ack is returned with a gossip digestack2 message