On Mon, Sep 23, 2019 at 1:48 PM dormando <dorma...@rydia.net> wrote:

> Gotcha. Thanks a ton for reaching out and putting up with my questions :)
>

Not at all :) - thank you for all your work on memcached.
mget/mset/mdelete will certainly be a great addition.


> One other thing mget might get you here is an easy probabilistic hot
>
cache. I really like probabilistic algorithms since they require low or
> zero coordination :)
>
> With mget, you could:
>
> `mget foo slhvfc` etc
>
> s = size, required kind of :)
> l = last access time (fixing this in the PR today)
> h = if the item's been hit before (also being fixed today)
> v = value
> f = client flags (if you need them)
> c = cas value, for your later comparison/check
>
> Then for your hot cache:
>
> if (hit && "last access is < 5 seconds" && random(1000) == 1) {
>   insert_into_localcache(obj);
> }
>
> to autotune, that 1000 becomes a variable you sync out periodically (or
> simply stick in the local cache for 60 seconds unconditionally),
> decreasing or increasing to match a target hit ratio on the local cache.
>

That is a really nice idea - I'll definitely have to explore it.  An
effective hot cache like this may reduce or eliminate the need for
mitigating specific keys.  We could incorporate size into it so that larger
values get a higher weighting.

Thanks,
John

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"memcached" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to memcached+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/memcached/CAJ__CS-adkKOTf8%3Du3qX0RW_4zSeH%2B6ZusGiYgLex8-5y9wgcA%40mail.gmail.com.

Reply via email to