-
I wonder why valkey doesn't have an admission policy. Some caches have an admission policy. For example, (caffeine, cachelib). I know that it is harder than examples because of primary-replicas, etc... Are there reasons or design decisions about absence of admission policy? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It is quite common for remote caching tiers to be over provisioned so that the eviction policy is less important. For example a 2017 talk from Twitter stated that their SLA requires a 99.9% hit rate. That is similar for other social sites like Reddit, or consumer sites like e-commerce or netflix streaming. When you require 95+ hit rates to meet response time requirements then the goal is primarily about capacity planning costs. That typically means to evict unused data, such as expired entries, rather than protect too aggressively against one-hit wonders. Memcached's redesign is an excellent case study. They use three queues so that cold data can be evicted earlier, but it takes quite a while. However it also allows them to scan the queues at different rates to more aggressively find expired entries rather than waiting for size eviction. This also benefits their on-disk storage to reduce costs since they can be more intelligent about the I/O operations. My perspective is that the hit rate matters most for a single process' cache, e.g. an webapp or database instance, since they have limited capacity and suffer from the miss penalties. A remote tier using a cache aside will serve many clients, and the most demanding will over provision to avoid competing for resources, so their influence on the developers is to lower the capacity costs or add features. I think the two can learn from each other but also shouldn't mistakenly assume that they have the same set of user requirements. |
Beta Was this translation helpful? Give feedback.
It is quite common for remote caching tiers to be over provisioned so that the eviction policy is less important. For example a 2017 talk from Twitter stated that their SLA requires a 99.9% hit rate. That is similar for other social sites like Reddit, or consumer sites like e-commerce or netflix streaming. When you require 95+ hit rates to meet response time requirements then the goal is primarily about capacity planning costs. That typically means to evict unused data, such as expired entries, rather than protect too aggressively against one-hit wonders.
Memcached's redesign is an excellent case study. They use three queues so that cold data can be evicted earlier, but it takes quite a w…