TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

CAP Theorem Explained

37 pointsby rg81almost 11 years ago

6 comments

room271almost 11 years ago
Unfortunately, this guy doesn&#x27;t understand the CAP theorem at all.<p>Once you are distributed, P is not an optional. Rather, in the case of network failure, consistency or availability is what suffers. A system cannot be both CA and distributed.<p>So, for example, Elasticsearch is not a &#x27;CA&#x27; solution despite the diagram in the article, but is actually closer to PC (although, in practice it is far more subtle than even that as it is not perfectly consistent, and configuration options allow for some trade-offs between availability and consistency in the case of communication errors.
评论 #7916458 未加载
评论 #7916231 未加载
评论 #7916919 未加载
评论 #7916488 未加载
评论 #7915908 未加载
mjbalmost 11 years ago
As others have said, that article is very misleading. Some better ones:<p>* <a href="http://research.microsoft.com/apps/pubs/default.aspx?id=192621" rel="nofollow">http:&#x2F;&#x2F;research.microsoft.com&#x2F;apps&#x2F;pubs&#x2F;default.aspx?id=1926...</a> - including a very nice way of thinking about CAP and tradeoffs)<p>* <a href="http://www.infoq.com/articles/cap-twelve-years-later-how-the-rules-have-changed" rel="nofollow">http:&#x2F;&#x2F;www.infoq.com&#x2F;articles&#x2F;cap-twelve-years-later-how-the...</a> - a good perspective on CAP, and why many people still don&#x27;t understand it clearly.<p>* <a href="http://lpd.epfl.ch/sgilbert/pubs/BrewersConjecture-SigAct.pdf" rel="nofollow">http:&#x2F;&#x2F;lpd.epfl.ch&#x2F;sgilbert&#x2F;pubs&#x2F;BrewersConjecture-SigAct.pd...</a> - don&#x27;t get put off by the formal language. Gilbert and Lynch is still (IMO) the best explanation of what CAP means, and what it implies.<p>* <a href="http://blog.cloudera.com/blog/2010/04/cap-confusion-problems-with-partition-tolerance/" rel="nofollow">http:&#x2F;&#x2F;blog.cloudera.com&#x2F;blog&#x2F;2010&#x2F;04&#x2F;cap-confusion-problems...</a> - Some good criticism of the way CAP is frequently explained.<p>* <a href="http://codahale.com/you-cant-sacrifice-partition-tolerance/" rel="nofollow">http:&#x2F;&#x2F;codahale.com&#x2F;you-cant-sacrifice-partition-tolerance&#x2F;</a> - Why CA systems don&#x27;t actually exist.<p>* <a href="http://cs-www.cs.yale.edu/homes/dna/papers/abadi-pacelc.pdf" rel="nofollow">http:&#x2F;&#x2F;cs-www.cs.yale.edu&#x2F;homes&#x2F;dna&#x2F;papers&#x2F;abadi-pacelc.pdf</a> - PACELC, maybe a better model.<p>* <a href="http://dbmsmusings.blogspot.com/2010/04/problems-with-cap-and-yahoos-little.html" rel="nofollow">http:&#x2F;&#x2F;dbmsmusings.blogspot.com&#x2F;2010&#x2F;04&#x2F;problems-with-cap-an...</a> - Another look at PACELC, with some examples.
SEJeffalmost 11 years ago
For those who want to read about real tests of how various common software fares under network partitions, here is some amazing work done by aphyr and his infamous Jepesen tests:<p><a href="http://aphyr.com/tags/jepsen" rel="nofollow">http:&#x2F;&#x2F;aphyr.com&#x2F;tags&#x2F;jepsen</a><p>This post has some info on elastic, but nothing in excruciating detail: <a href="http://aphyr.com/posts/288-the-network-is-reliable" rel="nofollow">http:&#x2F;&#x2F;aphyr.com&#x2F;posts&#x2F;288-the-network-is-reliable</a>
评论 #7917516 未加载
nwjsmithalmost 11 years ago
You can&#x27;t sacrifice partition tolerance: <a href="http://codahale.com/you-cant-sacrifice-partition-tolerance/" rel="nofollow">http:&#x2F;&#x2F;codahale.com&#x2F;you-cant-sacrifice-partition-tolerance&#x2F;</a>
评论 #7916590 未加载
mycodebreaksalmost 11 years ago
In many talks and presentations, I have heard that only eventual consistency was possible in a distributed system. since, A and P are already needed, you can only compromise on C.<p>Therefore, I am curious in knowing. Here&#x27;s my question: how do they configure production systems in order to get reasonable or 100% maybe consistency? In other words, the reads must factor latest write into account. No, stale reads.
dovertonalmost 11 years ago
&quot;Consistency around CAP is similar to what you find in a typical ACID model - except that, now, we&#x27;re in a distributed model.&quot;<p>I thought that consistency in ACID meant that data was always consistent with the rules of the database, whereas in CAP it means that the same data held in different locations is the same? Is that not right?
评论 #7916631 未加载
评论 #7916604 未加载