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

[FEATURE] 周期任务同步进程状态 #380

Closed
zhangzhw8 opened this issue Dec 20, 2021 · 0 comments
Closed

[FEATURE] 周期任务同步进程状态 #380

zhangzhw8 opened this issue Dec 20, 2021 · 0 comments
Assignees
Labels

Comments

@zhangzhw8
Copy link
Member

你想要什么功能
周期任务同步进程状态

为什么需要

背景

【上云GSE】gse_procmgr sync_proc_status接口返回异常

原因分析

  1. 因为 nodeman 注册任务的时候 统一采用的 namespace 为 nodeman。
  2. 查询数据时也用的是 namespace=nodeman 因此查询数据时 相当于对全量数据做了查询。
  3. 基于上述 1,2 的背景在执行mongo 查询的性能满足不了使用的需求。

建议如何实现
apps/node_man/periodic_tasks/sync_proc_status_task.py 周期任务中进行改造

  1. sync_proc_list 需要查询的插件从 GlobalSettings -> HEAD_PLUGINS 中获取
  2. sync_proc_status接口 替换为 get_proc_status接口(请求参数需要改造,接口每次请求500台主机,避免量太大导致接口性能问题)
  3. 注意通过 countdown 削峰执行
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants