Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support automatic mirroring of super-hot items to multiple processes #194

Open
derekperkins opened this issue Dec 7, 2022 · 3 comments
Open
Assignees

Comments

@derekperkins
Copy link
Contributor

derekperkins commented Dec 7, 2022

supports automatic mirroring of super-hot items to multiple processes. This prevents memcached hot spotting where a machine's CPU and/or NIC are overloaded by very popular keys/values.

The readme for groupcache has this as one of the primary benefits. Our usage patterns are such that there will likely be rotating super hot keys as we process various groups of data. We would want to run this in embedded library mode, and there's no guarantee that subsequent requests will hit the same server. Is this something olric can/could support?

@buraksezer buraksezer self-assigned this Dec 7, 2022
@buraksezer
Copy link
Owner

If I understand your case correctly, this feature can be implemented as client-side caching. It is doable but it requires a significant amount of engineering time and should wait for a new release.

@derekperkins
Copy link
Contributor Author

Client-side caching is a cool feature, but I don't think it's specifically what I'm talking about here, it's more tied to the ReplicaCount. In our use case, we have a handful of very popular keys, basically a long-tail distribution. What groupcache does is detect which keys those are, and keeps those keys on every member to avoid needing to use the network and hot-spotting the member with those keys.

image

@derekperkins
Copy link
Contributor Author

We currently have handled this by just hardcoding a local Go map that deploys with each service and checking that before hitting olric. It would be nice to have olric handle it by default. The two ways I can see it happening, which could either happen separately or both at the same time:

  • automatically increase replica count for specific keys based on access patterns
  • allow for pre-seeding the cache with specific values known to be hot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants