Consider following Cassandra setup:
- ring of 6 nodes: A, B, D, E, F, G
- replication factor: 3
- partitioner: RandomPartitioner
- placement strategy: SimpleStrategy
My Test-Column is stored on node B and replicated to nodes D and E.
Now I have multiple java processes reading my Test-Column trough Hector API (Thrift) with read CL.ONE
There are two possibilities:
- Hector will forward all calls to node B, because B is the data
master - Hector will load balance read calls trough node B, D and E (master and replicates). In this case my test column would be loaded into cache on each Cassandra instance.
Which one is it 1) or 2) ?
Thanks and regards,
Maciej
I believe it is: 3) Cassandra forwards all calls to the closest node that is alive, where “closeness” is determined by the Snitch currently being used (set in cassandra.yaml).
If DynamicSnitch is enabled, it dynamically adjusts the node closeness returned by the underlying snitch, according to the nodes’ recent performance.
See Cassandra ArchitectureInternals under “Read Path” for more information.