Created
April 21, 2021 03:27
-
-
Save luoqeng/7da10285197d37d8ae3d95f4c67ec174 to your computer and use it in GitHub Desktop.
consensus
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Designing Data-Intensive Applications | |
Streaming System | |
least expressiveness principle | |
Multi-Paradigm Programming | |
Domain Driven Design | |
Patterns, Principles, and Practices of Domain-Driven Design | |
Data and Reality | |
Distributed Systems An Algorithmic Approach | |
Principles of Distributed Database Systems | |
Transactional Information Systems | |
Fault-Tolerant Message-Passing Distributed Systems: An Algorithmic Approach | |
2PC是多obj的同时修改的atomic commit问题,consensus一般是同一个obj的不同replica的一致问题; | |
在事务的上下文中,一致性(Consistency)的概念是:对数据的一组特定陈述必须始终成立。即不变量(invariants)。具体到分布式事务的上下文中这个不变量是:所有参与事务的节点状态保持一致:要么全部成功提交,要么全部失败回滚,不会出现一些节点成功一些节点失败的情况。 | |
在分布式系统的上下文中,线性一致性(Linearizability)的概念是:多副本的系统能够对外表现地像只有单个副本一样(系统保证从任何副本读取到的值都是最新的),且所有操作都以原子的方式生效(一旦某个新值被任一客户端读取到,后续任意读取不会再返回旧值)。 | |
分布式事务一致性会因为协调者单点引入可用性问题 | |
为了解决可用性问题,分布式事务的节点需要在协调者故障时就新协调者选取达成共识 | |
解决共识问题等价于实现一个线性一致的存储 | |
解决共识问题等价于实现全序广播(total order boardcast) | |
Paxos/Raft 实现了全序广播 | |
分布式事务本身的一致性是通过协调者内部的原子操作与多阶段提交协议保证的,不需要共识;但解决分布式事务一致性带来的可用性问题需要用到共识。 | |
全序广播要求将消息按照相同的顺序,恰好传递一次,准确传送到所有节点。 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment