Open seanlaii opened 1 week ago
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
You can disable the search capability by setting the component parameter disable-search
.
Got it. Thanks for the information!
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
vsMultiClusterCache
) and their respective use cases.Thank you for your clarification on this matter.
Environment: