Home:ALL Converter>Is the CAP theorem a red herring?

Is the CAP theorem a red herring?

Ask Time:2011-11-02T00:50:23         Author:Aaron Watters

Json Formatter

I am told that I have to give up transactional guarantees in large distributed systems because the CAP theorem says I can't have it.

I think this is wrong for the following reasons:

  • Internet routing is amazingly reliable.
  • The CAP theorem only applies to network partitions where two groups of live machines can't communicate.
  • Almost all real network partitions consist of catastrophic failures or cases where one of the partitions is very small and the other is very large and the small one can just shut down.
  • Machine failures by themselves do not constitute a network partition.

Therefore, I can assume that for practical purposes I can have transactional behavior provided I attempt to guarantee that small partitions detect that they are disconnected and shut down or operate in some sort of degraded mode until the connection is repaired.

Corrections? Comments? Flames?


References:

  • For an overview of CAP Theorem see this article by Julian Browne here
  • CAP Theorem on wikipedia

Author:Aaron Watters,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/7969874/is-the-cap-theorem-a-red-herring
DarthVader :

The CAP theorem has been proven by Nancy Lynch et al. at MIT labs. \n\nYour assumptions are not good. Yes, you can have transactions at a distributed system, but then you have to wait for all your transactions. That's when you suffer from availability. So you can have consistency and partial tolerance, but not availability.\n\nIn the other case, you can have availability and partial tolerance, but no consistency, such as MongoDB or Cassandra (with eventual consistency configured). In this case, you can have multiple DB servers, but your your data won't be available across all the servers right away. You suffer from consistency, but you gain with availability and partial tolerance.\n\nThe Last case is the easiest one: You have consistency and availability, but no partial tolerance. Think of a single database server.\n\nIn regard to your points:\n\n\n \n Internet routing is amazingly reliable.\n \n\n\nSeamlessly reliable.\n\n\n \n The CAP theorem only applies to network partitions where two groups of live machines can't communicate.\n \n\n\nThe CAP theorem applies to any distributed system.\n\nThe other two points are really not making too much sense.\n\nThere are some other professors who claim that CAP is incomplete, and that there is more to it, such as latency. But the CAP theorem makes perfect sense.\n\nThere is also the \"BASE\" theorem (Basically Available, Soft state, and Eventual consistency). Many NoSQL databases are favoring this theorem.\n\nCheck out my blog on the CAP theorem and NoSQL.",
2011-11-01T16:56:01
yy