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

Tick based balancing instead of time #88

Open
schmichael opened this issue Dec 26, 2014 · 2 comments
Open

Tick based balancing instead of time #88

schmichael opened this issue Dec 26, 2014 · 2 comments

Comments

@schmichael
Copy link
Contributor

Currently Metafora rebalances every 15 minutes ±10 seconds.

The main loop serializes all events via ticks, so we could switch to rebalancing every N ticks.

The theoretical advantage of tick-based balancing is that Metafora would only rebalance when the cluster's state actually changes.

Pros

Could reduce needless task juggling (or at least needless Balance() calls) in stable clusters.

Cons

However, the following cluster events don't cause main loop events and therefore wouldn't trigger tick-based rebalancing:

  • Remote node finishes a task
  • New node joins cluster

We could handle those two events by:

  • Also doing time based balancing
  • Having the Coordinator inform the main loop of these events (could probably create a synthetic noop ClusterEvent command).
@epsniff
Copy link
Contributor

epsniff commented Dec 26, 2014

Is rebalancing an issue currently? A time based method seems more KISS, because it doesn't rely on the event loop and balance calls being as tightly coupled.

@schmichael
Copy link
Contributor Author

@epsniff Not currently. This is just me getting ahead of myself. :) Definitely not going to work on this without some proof it's an issue.

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

No branches or pull requests

2 participants