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

Add ability to control process redistribution during operation. #197

Open
veedo opened this issue Mar 5, 2020 · 0 comments
Open

Add ability to control process redistribution during operation. #197

veedo opened this issue Mar 5, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@veedo
Copy link

veedo commented Mar 5, 2020

Problem

During Node-Up and Node-Down events there is a lot of activity.
For example, I have :syn running as my registry and as an event bus, and on node change there is a flurry of activity where it syncs the process groups and registry. Unfortunately this is also when Horde decides to redistribute processes.
The result is that some calls time out.

Solution

I am adding a feature to control the redistribution during operation and would like some opinions on which direction to go.

Options

Option 1:

Added a "force_redistribute" function which sends messages to all the nodes to trigger redistribution
Added an optional argument to:
defp handoff_processes(state, force_redistribution \\ false) do
Downside: May need to call it multiple times since it isn't using the crdt

Option 2:

Add Application.get_env call to "handoff_processes" that is checked in addition to :process_redistribution
Downside: The env variable is global and affects all supervisors

Option 3:

Add function/message to modify the :process_redistribution or add a new flag to the state that gets checked in addition to :process_redistribution
Downside: One more flag to keep track of

Option 4:

Add :manual to :process_redistribution flag
Add entry to the CRDT mirrors a state.redistribute_children flag
Trigger "handoff_processes" on a CRDT diff message for the flag
"handoff_processes" checks state.redistribute_children when set to :manual
Downside: ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants