Open Iceber opened 1 year ago
Hi @Iceber, Thanks for opening an issue! We will look into it as soon as possible.
hi, iceber, this is my solution for the new Watch feature.
What do you think of it. @Iceber
With the addition of the new component, I think one issue we can't ignore is the behavior of the Synchor and Apiserver after the message queue
hangs
What would you like to be added?
We currently have Watch capability in memory storage, but it requires the binding-apiserver command to run both Clusterpedia APIServer and Clusterpedia Clustersynchro Manager, which prevents us from scaling the service horizontally
We wanted to find a generic Watch mechanism that could be reused on most storage tiers and that would not affect the horizontal scaling of the Clusterpedia APIServer.
For the Watch feature, there are roughly three ways to implement it:
Customized to a specific storage layer, using a storage layer with its own event notifications, such as memory, etcd-based Watch, or redis publish-and-subscribe for Watch But these specific storage layers may not be good for resource retrieval, and we will lose some performance or functionality for complex resource retrieval
A middleware-based subscription publishing for messages, decoupling Query/Watch(APIServer) and collecting resources through a message middleware. But the introduction of middleware will increase the complexity of the architecture and may be troublesome for Watch handling when the middleware is down
Forwarding Watch requests to the collection of resources -- ClusterSynchroManager But the ClusterSynchroManager may need to increase the cache of some events, which inadvertently brings uncontrollable memory pressure In addition, the future Agent mode will add a resource collector component that can be scaled horizontally, which will not be able to forward Watch requests correctly
Why is this needed?
https://github.com/clusterpedia-io/clusterpedia/issues/452