Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ran.lu
verify
Wiki
leader election 观察
leader election 观察
· Changes
Page history
Create leader election 观察
authored
Jan 28, 2023
by
ran.lu
Hide whitespace changes
Inline
Side-by-side
leader-election-观察.md
0 → 100644
View page @
53dc12de
# 问题场景
多个 pod 里有定时任务,怎么避免重复执行,才比较好?
# 解决方案
按照是否有一个单点进行协调,可以分出两类方法:一类有单点,一类没有单点。
如果有单点,那问题就变成,用什么单点,于是,容易得到答案:
1.
redis
2.
mysql
3.
etcd
4.
zookeeper
5.
k8s 的一些特性(这其实最后也是基于 etcd 的)
6.
……
如果没有单点,那么,解决问题所需要的通信,就落在 pod 身上,那就得考虑各种节点间的通信方式:
1.
raft
……