The Go Programming Language
http://golang.org/
Go Playground
Go Projects
Revel Web Framework
Achilless

单机定时任务如何实现高可用

  •  
  •   Achilless · Jul 12, 2021 · 1118 views
    This topic created in 1859 days ago, the information mentioned may be changed or developed.
    现在有一个定时任务只需单机运行,想至少可以部署三台实现高可用。另外两台监听跑任务的机器状态,如果挂了选举出主接管任务。

    有没有优雅简单一些的实现方法呢?
    SorcererXW
        1
    SorcererXW  
       Jul 14, 2021
    用分布式锁来控制吧,另外两台机器定期尝试抢占锁就好了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2549 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 15:40 · PVG 23:40 · LAX 08:40 · JFK 11:40
    ♥ Do have faith in what you're doing.