摘要:Redis Cluster的模型 Redis Cluster 以hash slot的方式分片 There are 16384 hash slots in Redis Cluster, and to compute what is the hash slot of a given key, we si
阅读全文
摘要:安装所需软件包sudo yum install -y yum-utils \device-mapper-persistent-data \lvm2 设定仓库 sudo yum-config-manager \ --add-repo \ https://download.docker.com/linu
阅读全文
摘要:key不可太长 key的格式最好保持良好的可读性,例如:user:1000:followers(object-type:id) 用.或者-分隔key中的词,例如:"comment:1234:reply.to" or "comment:1234:reply-to". key的最大值为512MB
阅读全文
摘要:lua代码:-- checkandset.lua local current = redis.call('GET', KEYS[1]) if current == ARGV[1] then redis.call('SET', KEYS[1], ARGV[2]) return true end ret
阅读全文