digitalocean / go-workers2

better-go-workers
MIT License
133 stars 35 forks source link

[WIP] Active/passive failover support by worker manager clusters #77

Open keitabyte opened 2 years ago

keitabyte commented 2 years ago

[WIP] Active/passive failover support by worker manager clusters

Summary This PR adds explicit failover strategy, with an initial support for active/passive failover based on clusters of managers that are assigned a priority by cluster. The highest priority cluster is then determined to be the currently active cluster of managers. Given active/passive failover is configured, a heart beat is initialized in each manager. This heart beat registers a given manager's cluster as active, evicts outdated active cluster, and if a given manager belongs to the highest priority active cluster, it will process queued work.