jrasell / sherpa

Sherpa is a highly available, fast, and flexible horizontal job scaling for HashiCorp Nomad. It is capable of running in a number of different modes to suit different requirements, and can scale based on Nomad resource metrics or external sources.
Mozilla Public License 2.0
163 stars 8 forks source link

Support highly available deployments #42

Closed jrasell closed 4 years ago

jrasell commented 4 years ago

Is your feature request related to a problem? Please describe. In its current state Sherpa has no awareness of other potential Sherpa servers running on the same Nomad cluster. This can result in both servers performing scaling actions which is problematic.

Describe the solution you'd like. Sherpa should have a way to perform clustering or leadership locking of some kind. This would mean only one server at a time can be responsible for performing scaling requests. Seeing as Consul can be used as a persistence layer; initial thoughts are to use this in a manner similar to Vault to perform clustering and leadership activities.

Initially, mutual exclusion is the highest priority feature to achieve and having some form of identifying which instances have the lock, and which do not. Stretch or additional tasks could include request forwarding from a "follower" instance to the "active" instance.