You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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: ?
The text was updated successfully, but these errors were encountered:
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: ?
The text was updated successfully, but these errors were encountered: