1. 程式人生 > >dynamo與cassandra區別

dynamo與cassandra區別

ffi out thrown ive for enc coord towards ren

雖說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”

dynamo與cassandra區別