Skip to content

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

Open
k8abyte wants to merge 1 commit intomasterfrom
ksumikawa/active-passive-failover
Open

[WIP] Active/passive failover support by worker manager clusters#77
k8abyte wants to merge 1 commit intomasterfrom
ksumikawa/active-passive-failover

Conversation

@k8abyte
Copy link
Collaborator

@k8abyte k8abyte commented Oct 12, 2022

[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.

f.lock.Unlock()
return
}
f.lock.Unlock()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not defer the unlock?

func (f *simpleFetcher) inprogressMessages() []string {
f.lock.Lock()
if !f.active {
f.lock.Unlock()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments