hashicorp / raft-autopilot

Raft Autopilot
Mozilla Public License 2.0
21 stars 5 forks source link

Initial Module Extracted from Consul #1

Closed mkeeler closed 3 years ago

mkeeler commented 4 years ago

This is a fully functional autopilot module extracted from Consul with a few extra improvements.

Autopilot at its core is automating raft given external knowledge of the state of the system. The automation will promote or demote servers as necessary and generally just keep the raft configuration correct as servers come and go and fail/get restored. Given that there are multiple inputs to Autopilot

  1. The Delegate interface provides information about the applications view of known servers as well as a method for fetching server stats via some out of band mechanism.
  2. The Raft interface (which should almost always be a Raft instance) provides the current raft configuration.
  3. The Promoter interface abstracts away the algorithms to take the current state and determine what Raft changes should be made to bring the current state closer to the desired state.

Some follow on work for this PR: