HBase on CAP

With respect to CAP, HBase is decidedly CP. HBase makes strong consistency guarantees. If a client succeeds in writing a value, other clients will receive the updated value on the next request.

In HBase, data is only served by one region server (even if it resides on multiple data nodes). If region server dies, clients need to wait for a long time because the fact of the region reassignment and log replay.

HBase isn't designed that multiple region servers can simultaneously serve the same region, because that would be difficult or impossible to achieve otherwise features:single-row put atomicity, atomic check-and-set operations, atomic increment operations, etc. That are only possible if you know for sure exactly one machine is in control of the row.

HBase does trade some availability to achieve a stronger level of consistency.

Partition tolerance in CAP, in short, is the ability of a system to survive despite  message loss (due to server failure, network problem, etc.). HBase does this of course, a server failure or message loss does not damage the database. When that happens, we give up availability or give up consistency. In HBase's case we choose consistency, so we have to give up some availability.
 
 

 

你可能感兴趣的:(hbase,CAP,Consistency,Availability)