Java-Interview-Advanced/docs/distributed-system/zookeeper-distribute-lock-scheme.md
2020-04-25 19:55:58 +08:00

12 lines
592 B
Markdown
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Redis和ZooKeeper哪种分布式锁更好
从分布式系统协调语义而言是ZooKeeper做分布式锁更好一些因为Redis本身其实是缓存但是Redis能抗高并发高并发场景下更好一些
zookeeper本身不适合部署大规模集群他本身适用的场景就是部署三五台机器不是承载高并发请求的仅仅是用作分布式系统的协调的
RedisZooKeeper
有redis集群没有zookeeper集群那你当然就选择redis了如果你们公司两个都有用哪种分布式锁都可以高并发场景redis