问题
I have 3 nodes with number of partition data distributed across 3 nodes,
When I look for the end points with partition key like below,
./nodetool getendpoints keyspacename tablename partitionkeyvalue
172.30.56.63
172.30.56.62
172.30.56.61
I am also able to see from the ./nodetool ring
that the different partitions are distributed from -2 power 63 to +2 power 63 using virtual nodes
I am also able to see the queried hosts (using the response object) that It used the token aware policy to choose the co-ordinator node
Let's say the partition contains 1 billion entries with RF = 3. Will the data inside a single partition be distributed across nodes? Or a single cassandra node will have the complete partition data and the other two nodes will have the complete replica of it?
回答1:
The individual partition always resides on single node, with replicas on other nodes. That's why there are recommendations on the max size of partition: ~100Mb in 2.0 & below, or several hundred MBs in higher versions. The number of cells inside partition will depend on the average size of the values, etc. - in DS220 Data Modelling course there is a separate set of lectures on physical model.
来源:https://stackoverflow.com/questions/47793714/how-partition-read-is-chosen-in-cassandra