clusterpedia-io / clusterpedia

The Encyclopedia of Kubernetes clusters
https://clusterpedia.io
Apache License 2.0
789 stars 122 forks source link

Add message queue to implement multi-cluster watch interface When using the default storage layer #595

Open wuyingjun-lucky opened 10 months ago

wuyingjun-lucky commented 10 months ago

What would you like to be added?

Add message queue to implement multi-cluster watch interface When using the default storage layer

Why is this needed?

Improve Clusterpedia Query capability (dynamic query)

clusterpedia-bot commented 10 months ago

Hi @wuyingjun-lucky, Thanks for opening an issue! We will look into it as soon as possible.

Details Instructions for interacting with me using comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the [gh-ci-bot](https://github.com/clusterpedia-io/gh-ci-bot) repository.
zhouhaoA1 commented 10 months ago

image

hi, this is our solution for the multi-cluster watch feature.

zhouhaoA1 commented 10 months ago
  1. A message queue is used for transporting events from ClusterSynchroManager to ApiServer, before transporting, events must be persisted to the storage layer, and rv of events must be converted to multi-clusters-rv.
  2. EventCache is a buffer for newest events whose number is limit to 100 by default.
  3. we have defined a series of universal inferfaces for message queue middleware. And we have introduced RabbitMQ by implement the interfaces.