分布式一致性算法

 

paxos算法

http://www.docin.com/p-251511734.html

原汁原味论文

http://research.microsoft.com/en-us/um/people/lamport/pubs/paxos-simple.pdf

http://www.docin.com/p-251511734.html

http://blog.sina.com.cn/s/blog_6d677b680100uyv3.html

 

保证了在分布式系统中,在一组被提议的值中,只会有一个被选择。在分布式网络失败存在的情况下,非拜占庭模式(指消息不会被篡改、损坏,但是会丢失、重发)稳定进行。

 

Assume a collection of processes that can propose values. A consensus algorithm ensures that a single one among the proposed values is chosen. If no value is proposed, then no value should be chosen. If a value has been chosen, then processes should be able to learn the chosen value. The safety requirements for consensus are:

2 Only a value that has been proposed may be chosen,

2 Only a single value is chosen, and

2 A process never learns that a value has been chosen unless it actually has been

 

例子比较容易看懂

http://m.udpwork.com/item/6367.html

http://blog.csdn.net/baiduforum/article/details/7007741

最好的例子

http://fanlb.blogbus.com/logs/65407973.html

 

 多个客户端如何获取分布式锁,如果只有一个锁服务只有一个server,那么先到先得即可;但是为了避免单点问题,需要有一个集群。当多个客户端向这个集群请求锁时,如果保证锁分发的一致性呢。这个时候就需要分布式一致性算法paxos。

可以把客户端理解为proposal,集群机器理解为acceptor

你可能感兴趣的:(分布式)