设为首页 加入收藏

TOP

redis文档翻译_key设置过期时间(三)
2015-07-24 09:25:42 来源: 作者: 【 】 浏览:2
Tags:redis 文档 翻译 _key 设置 过期 时间
m, basically the assumption is that our sample is representative of the whole key space, and we continue to expire until the percentage of keys that are likely to be expired is under 25%
这个概率算法是不重要的,主体上就是假设我们的样品代表了整个key空间,并且继续使key过期,直到有25%以上的key过期,然后开始第一步。
This means that at any given moment the maximum amount of keys already expired that are using memory is at max equal to max amount of write operations per second divided by 4.
意思是任何时刻,给出已经过期的最大数量key,这些过期key使用的最大内存等于每秒最大数量写操作除以4倍。

How expires are handled in the replication link and AOF file

在AOF文件和复制连接中过期是如何处理的

In order to obtain a correct behavior without sacrificing consistency, when a key expires, a DEL operation is synthesized in both the AOF file and gains all the attached slaves. This way the expiration process is centralized in the master instance, and there is no chance of consistency errors.

为了获得不牺牲一致性的正确做法,当一个key过期时,DEL操作将在AOF文件和所有的 slaves中同步。这种方式中,过期在master实例集中处理,并且避免产生改变一致性错误。

However while the slaves connected to a master will not expire keys independently (but will wait for the DEL coming from the master), they'll still take the full state of the expires existing in the dataset, so when a slave is elected to a master it will be able to expire the keys independently, fully acting as a master.

然而,当slaves连接到master上时,就不会独立地使key过期(但是会等待master DEL的到来),他们将使用所有在数据设置中有过期状态的key,因此当一个slave被推选成为master时,它将开始独立地去过期key,充当maste的角色。
首页 上一页 1 2 3 下一页 尾页 3/3/3
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇redis内存优化、持久化以及主从复.. 下一篇一起写redis脚本

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·Redis on AWS:Elast (2025-12-27 04:19:30)
·在 Spring Boot 项目 (2025-12-27 04:19:27)
·使用华为开发者空间 (2025-12-27 04:19:24)
·Getting Started wit (2025-12-27 03:49:24)
·Ubuntu 上最好用的中 (2025-12-27 03:49:20)