redis is the easiest-to-host lock server and that's worth the risk in some applications (depending on consequence of errors obv) inspiring + slightly terrifying that rather than a single server-side implementation, every client is responsible for its own implementation if postgres provided fast kv cache and a lock primitive it would own
Redis is a very bad store for a distributed lock but Postgres is only slightly better. What you truly need is something like ZooKeeper and etcd that are designed to achieve distributed consensus using algorithms like Paxos or Raft. This ensures strong consistency and reliability in a distributed system, making them ideal for tasks like leader election, configuration management, and lease management where consistency…
Re: Distributed Locks with Redis (2014)
#41a single redis instance has better consistency + partition tolerance than any raft implementation