How to create a distributed lock with Redis?

前端 未结 5 1216
广开言路
广开言路 2020-12-28 17:37

On the redis documentation, I found a primitive lock can be implemented via SETNX:

http://redis.io/commands/setnx

  • C4 sends SETNX lo

5条回答
  •  有刺的猬
    2020-12-28 18:23

    follow the link
    nice project explaining locking
    http://redis.io/topics/distlock
    https://github.com/mrniko/redisson

提交回复
热议问题