-
Notifications
You must be signed in to change notification settings - Fork 3
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
Election rules implementation #15
Comments
It think it will be useful to have scripts executed directly in the cluster nodes, but the lang need to be chosen properly. It's related to the ticket #17 :
Overall the choose is not that hard - for example we can get just a simple script lang and after that add support for the other langs as needed. |
Compared the full go script systems as gomacro and yaegi with native and executable go:
|
Right now we defining the hard limit of the node slots in the configuration ( |
The election rules right now are quite simple:
This answers "yep" or "nope" to the Application. Based on those parameters and the "last resort" random number the cluster choose one node to execute the Application. Or if all the nodes are busy (answering "Nope") - than goes to the next election round and repeats the process.
But there is much more variables to consider - for example driver can check the images size to download from Artifactory and calculate how much time it will take to unpack them and actually run the VM - so pre-cached images will boost the startup time for sure and this node should be used in priority. Or the application wants to use some specific machine (with particular IP address) to serve some security needs.
So all of that could be defined as Rules engine inside the cluster, and cluster or the application can choose which kind of rules to use to detect the winner of the election. Go templates could be used here to define the logic.
The available resources (CPU, Mem, Disk) need to be considered during making decision and overcommit could be allowed or disallowed. Config "node_slots" need to be removed after that.
The text was updated successfully, but these errors were encountered: