redis分布式锁解决什么问题?
What problem does the redis distributed lock solve?
所以我刚刚阅读了有关 redlock 的内容。我的理解是它需要3台独立的机器才能工作。所谓独立,是指所有机器都是主机,它们之间没有复制,这意味着它们服务于不同类型的数据。那么,为什么我需要锁定三个独立的 redis 实例中作为主实例的密钥?我需要使用 redlock 的用例是什么?
So why would I need to lock a key present in three independent redis instances acting as masters?
这并不是说您要锁定 Redis 中的密钥。相反,钥匙 是 锁,用于控制对其他资源的访问。其他资源可以是任何东西,通常是 Redis 之外的东西,因为 Redis 有自己的机制来允许对其数据结构进行原子访问。
What are the use cases where I would need to use redlock?
当分布式系统一次只希望一个成员做某事时,可以使用分布式锁。
随便从网上拿个例子,here's Coinbase跟"ensure that multiple processes do not concurrently generate and broadcast separate transactions to the network"说他们使用分布式锁。
所以我刚刚阅读了有关 redlock 的内容。我的理解是它需要3台独立的机器才能工作。所谓独立,是指所有机器都是主机,它们之间没有复制,这意味着它们服务于不同类型的数据。那么,为什么我需要锁定三个独立的 redis 实例中作为主实例的密钥?我需要使用 redlock 的用例是什么?
So why would I need to lock a key present in three independent redis instances acting as masters?
这并不是说您要锁定 Redis 中的密钥。相反,钥匙 是 锁,用于控制对其他资源的访问。其他资源可以是任何东西,通常是 Redis 之外的东西,因为 Redis 有自己的机制来允许对其数据结构进行原子访问。
What are the use cases where I would need to use redlock?
当分布式系统一次只希望一个成员做某事时,可以使用分布式锁。
随便从网上拿个例子,here's Coinbase跟"ensure that multiple processes do not concurrently generate and broadcast separate transactions to the network"说他们使用分布式锁。