I have read many articles introducing the primary key failure mechanism, mainly by configuring the failure elimination strategy (LRU/TTL/RADMON for volatile and global keys) and failure strategy (negative method and positive method).
I have a question. When the official introduced the expire method of key (you can click here), it said that the delay of 0-1 millisecond can be achieved after version 2.6.
But when the invalidation policy is the most efficient (configuration: volatile-ttl), when all invalid keys are placed in the dict to handle timeout destruction, the execution of the invalidation policy is once every 1/10 second (100 milliseconds) , how can we achieve the official 0-1 millisecond? Did I understand it wrong somewhere?
Introduction to the failure mechanism:
http://blog.nosqlfan.com/html...
https://yq.aliyun.com/article...
Introduction expire:
http://redis.cn/commands/expi...
怪我咯2017-05-31 10:33:26
It’s very simple, “expire”! = “delete”.
I estimate that the improvement in expiration accuracy is mainly due to the introduction of the pexpire command. The previously recorded ttl should only have second-level accuracy, so the expiration accuracy is the same.
Redis definitely has no way to guarantee that all expired keys will be deleted within 1ms, but it can guarantee that you will not seekeys that have expired for more than 1ms.