opensergo / opensergo-control-plane

Universal cloud-native microservice governance control plane (微服务治理控制面)
Apache License 2.0
35 stars 23 forks source link

Add debounce mechanism for CRD event handling in CRDWatcher #24

Open sczyh30 opened 2 years ago

sczyh30 commented 2 years ago

Add debounce mechanism for CRD event handling in CRDWatcher.


CRDWatcher 处理 CRD 变更事件时需要有 debounce 机制,避免同个 subscribeTarget(a, n, k) 短时间内多次变更导致频繁触发 push。在全量推送模型中,可以有一个简单的蓄水池机制,比如累积 100ms 的变更再合并推送。

debounce 的范围以及 timeout 需要做到可配置。欢迎社区针对这个机制进行讨论。

baiyutang commented 2 years ago

please assignee to me. I will finish it.