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

Clarification on caching mechanism in search and proxy components #4900

Open
seanlaii opened this issue May 5, 2024 · 3 comments
Open

Clarification on caching mechanism in search and proxy components #4900

seanlaii opened this issue May 5, 2024 · 3 comments
Labels
kind/question Indicates an issue that is a support question.

Comments

@seanlaii
Copy link
Contributor

seanlaii commented May 5, 2024

Please provide an in-depth description of the question you have:
In the current Karmada search component, there are two sub-components: search and proxy. Both sub-components cache the resources defined in the ResourceRegistry.

My question is: Do these two sub-components use the same cache, or do they maintain separate caches for storing data?

The reason I'm asking is that currently, both sub-components are controlled through the resource registry. I only want to use the proxy functionality to read pod logs, and I don't need to use the search/cache functionality to cache pods. If these two sub-components create separate caches, it could potentially lead to resource wastage.

From reviewing the source code, my current understanding is that the search component's cache is managed through the InformerManager, while the proxy component has a MultiClusterCache for managing its cache.

If possible, I would also appreciate an explanation of the differences between these two caching mechanisms (InformerManager vs MultiClusterCache) and their respective use cases.

Thank you for your clarification on this matter.

Environment:

  • Karmada version: 1.9
@seanlaii seanlaii added the kind/question Indicates an issue that is a support question. label May 5, 2024
@XiShanYongYe-Chang
Copy link
Member

My question is: Do these two sub-components use the same cache, or do they maintain separate caches for storing data?

They use two sets of caches.

For Search, the informer is directly used to build cache. For Proxy, it is equivalent to self-built cache. See proposal for reference: https://github.com/karmada-io/karmada/tree/master/docs/proposals/resource-aggregation-proxy

@XiShanYongYe-Chang
Copy link
Member

You can disable the search capability by setting the component parameter disable-search.

@seanlaii
Copy link
Contributor Author

seanlaii commented May 7, 2024

Got it. Thanks for the information!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Indicates an issue that is a support question.
Projects
None yet
Development

No branches or pull requests

2 participants