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

When possible, bail out early when quorum achieved #286

Merged
merged 2 commits into from
Dec 6, 2020
Merged

Conversation

brainix
Copy link
Owner

@brainix brainix commented Dec 5, 2020

The beating heart of all consensus based distributed algorithms is to
scatter a computation across multiple nodes, then to gather their
results, then to evaluate whether quorum is achieved.

In some cases, quorum requires gathering all of the nodes' results
(e.g., interrogating all nodes for a maximum value for a variable).

But in other cases, quorum requires gathering only n // 2 + 1 nodes'
results (e.g., figuring out if > 50% of nodes believe that I'm the owner
of a lock).

This commit implements the logic to "bail out" early when possible, in
the latter case.

The beating heart of all consensus based distributed algorithms is to
scatter a computation across multiple nodes, then to gather their
results, then to evaluate whether quorum is achieved.

In some cases, _quorum_ requires gathering all of the nodes' results
(e.g., interrogating all nodes for a maximum value for a variable).

But in other cases, _quorum_ requires gathering only `n // 2 + 1` nodes'
results (e.g., figuring out if > 50% of nodes believe that I'm the owner
of a lock).

This commit implements the logic to "bail out" early when possible, in
the latter case.
@brainix brainix force-pushed the early-bail-out branch 3 times, most recently from 1bf7f19 to 0380a77 Compare December 5, 2020 17:56
@brainix
Copy link
Owner Author

brainix commented Dec 6, 2020

🐟

@brainix brainix merged commit 228d978 into master Dec 6, 2020
@brainix brainix deleted the early-bail-out branch December 6, 2020 04:58
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.

None yet

1 participant