Cassandra [5e6d1746]
Tags: Databases, distributed systems
1. Internals
1. Internals
-
Seed nodes:
- No purpose other than bootstrapping the gossip process
- DO NOT MAKE ALL NODES SEED NODES
2. concurrent_compactors
2. 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_compactorsstring in yaml- can also use
nodetool setconcurrent_compactorsin C* > 3
- can also use
3. Counter Table TTL's
3. Counter Table TTL's
- issues.apache.org/jira/browse/CASSANDRA-2103
- blog.knoldus.com/cassandra-counter-column-and-table/
- docs.scylladb.com/using-scylla/counters/
- docs.scylladb.com/getting-started/time_to_live/
- stackoverflow.com/questions/29564744/data-modeling-with-counters-in-cassandra-expiring-columns
- github.com/Netflix/astyanax/wiki/Working-with-counter-columns
- dzone.com/articles/cassandra-counter-columns-and-tables
- stackoverflow.com/questions/24881957/what-is-the-way-for-counting-number-of-columns-in-row-in-cassandra
- www.ably.io/blog/cassandra-counter-columns-nice-in-theory-hazardous-in-practice
5. CQLSH
5. CQLSH
- cqlsh specifically checks for
python2.7, which may need to be aliased somewhere
6. Scylla
6. Scylla
- Xandra driver uses queue.acm.org/appendices/codel.html
- Whether tweaking
tombstone_compaction_intervalaffects things: github.com/PaytmLabs/cassandra/blob/master/src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java#L360
6.1. Tracing
6.1. Tracing
- 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
7. Cassandra Gossiper Protocol
7. 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