47

zookeeper 实现分布式锁安全用法-王清培

 5 years ago
source link: http://blog.51cto.com/wangqingpei557/2346830
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
背景ConnectionLoss链接丢失SessionExpired会话过期绕开zookeeperbroker进行状态通知leader选举与zkNode断开做好幂等静态扩容、动态扩容背景分布式锁现在用的越来越多,通常用来协调多个并发任务。在一般的应用场景中存在一定的不安全用法,不安全用法会带来多个master在并行执行,业务或数据可能存在重复计算带来的副作用,在没有拿到lock的情况下扮演者mas

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK