CAP 定理是否暗示 ACID 对于分布式数据库是不可能的? [英] Does the CAP theorem imply that ACID is not possible for distributed databases?
问题描述
There are NoSQL ACID (distributed) databases, despite CAP theorem. How this is possible? What's the relation between CAP theorem and (possible/not possible of) being ACID?
Is impossible for a distributed computer system to simultaneously provide consistency, availability and partition tolerance.
CAP theorem is actually a bit misleading. The fact you can have a CA design is nonsense because when a partition occurs you necessarily have a problem regarding consistency (data synchronization issue for example) or availability (latency). That's why there is a more accurate theorem stating that :
During a partition in a distributed system, you must chose between consistency and availability.
Still in practice it is not that simple. You should note that the choice between consistency and availability isn't binary. You can even have some degree of both. For example regarding ACID, you can have atomic and durable transactions with NoSQL, but forfeit a degree of isolation and consistency for better availability. Availability can then be assimilated to latency because your response time will depend on several factors (is the nearest server available ?).
So, to answer your question, this is usually marketing bullshit. You need to actually scratch the surface to see what the solution is exactly gaining and forfeiting.
If you want deeper explanations you can look here, here or here.
这篇关于CAP 定理是否暗示 ACID 对于分布式数据库是不可能的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!