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

Redesign the cloud function scheduler to support distributed multi-instances. #6

Closed
maslow opened this issue Aug 26, 2021 · 0 comments
Labels
feature New feature or request wont fix This will not be worked on

Comments

@maslow
Copy link
Member

maslow commented Aug 26, 2021

Is your feature request related to a problem? Please describe.
当前触发器调度是内存队列中维护的,则 app-server 有状态依赖,不可横向绅缩实现;只能跑单例;
主要分为定时器和事件触发器,一个触发事件应只由一个实例运行。

Describe the solution you'd like
有两种思路:

  1. 将触发器队列放到 mongodb 中维护
  2. 将触发器队列放到 redis 中维护
  3. 选择一个 app-server 实例运行触发器队列

Describe alternatives you've considered
暂不考虑 引入 redis,当前未有 cache 设计;
mongodb 队例,可处理定时触发器,但事件触发器是 app-server 代码层面调用的,不适宜用队列改造;
至于第3种方案,考虑伸缩环境为 kubernetes,要调研 kubernetes 绅缩策略是否支持 「标记指定实例」不释放。

大概率还是需要在应用层实现这个选举逻辑的。不能用 kubernetes 自带的伸缩能力。
那么 app-server 当前的调度器就无需 重新设计,只需要增加一个参数来控制 开关 调度器即可。
Additional context

@maslow maslow added this to the v1.0-refactor milestone Sep 27, 2021
@maslow maslow added the feature label Dec 22, 2021
@maslow maslow modified the milestones: v0.7, v0.8 Dec 22, 2021
@maslow maslow removed the feature label Dec 28, 2021
@maslow maslow changed the title feat: 重新设计云函数调度器,使之支持分布式多实例。 Redesign the cloud function scheduler to support distributed multi-instances. Dec 28, 2021
@maslow maslow added feature New feature or request wont fix This will not be worked on labels Dec 28, 2021
@maslow maslow closed this as completed May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request wont fix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant