虽说cassandra是dynamo的开源版本,但两者还是有很大区别的。
coordinator的选取:
在dynamo论文中,一般是preference list中N个副本的第一个
- 为什么叫“一般”是因为请求有可能是通过一个load balancer到达系统中的某个节点,而该节点又不属于N个副本中的一个,则该节点会把该请求转发到preference list中N个副本的第一个;如果load balancer恰好将该请求分配到N个副本中的一个,则coordinator就不是N个副本的第一个了
cassandra系统中的实现比较简单,client向哪个节点发出请求,则该节点担任coordinator的角色。
hinted handoff:
在dynamo论文中:"all read and write operations are performed on the first N healthy nodes from the preference list, which may not always be the first N nodes encountered while walking the consistent hashing ring"
对Cassandra来说,hinted handoff对ONE, QUORUM, or ALL是不起作用的:“A hinted write does not count towards ConsistencyLevel requirements of ONE, QUORUM, or ALL. The coordinator node stores hints for dead replicas regardless of consistency level unless hinted handoff is disabled.If insufficient replica targets are alive to sastisfy a requested ConsistencyLevel, an UnavailableException is thrown with or without hinted handoff”