Details
-
Feature
-
Status: Resolved (View Workflow)
-
High
-
Resolution: Fixed
-
None
Description
Current Situation
- Subagent Clusters can be configured for fixed-priority (active-passive) execution and for round-robin (active-active) execution of jobs.
- Users would like to add to this scheme selection of Subagents based on metrics.
Desired Behavior
- Basically, all available Subagents are candidates for execution of the next job.
- Subagent Plugin
- A plugin mechanism allows implementation of a Java class that is executed by the Subgent
- to collect metrics at an ongoing basis that remain with the plugin:
- CPU consumption,
- memory consumption.
- to provide indicators from existing metrics, for example 80 to indicate 80% average CPU consumption during the last 2 minutes. The plugin returns indicators when requested by the Subagent.
- to collect metrics at an ongoing basis that remain with the plugin:
- Later versions of JS7 will offer an internal interface for Plugins.
- A plugin mechanism allows implementation of a Java class that is executed by the Subgent
- Director Agent
- The Director Agent asks Subagents for indicators when needed.
- Additional indicators are provided by the Director Agent:
- number of running jobs,
- number of jobs running per Subagent in a Subagent Cluster
- The Director Agent will check indicators provided by Subagents to decide which Subagent should execute the next job. If a Subagent does not respond within 0.5s then it is not considered for execution of the next job.
- Subagent Cluster
- The Subagent Cluster configuration is improved to allow specification of an expression for the priority attribute of each Subagent:
- An expression language is added that offers algebraic functions to be used for the priority.
- Examples
- Example to consider the Subagent with the least number of tasks running for the given Subagent Cluster
$subagentClusterTasks
- Example to consider Subagents only that do not run a task in the given Subagent Cluster
-( $subagentClusterTasks )
- Example for least consumption of CPU (weighted by 2) & Memory and least overall number of tasks running in the Subagent (weighted by 3):
-1 / ( $cpu*2 + $memory + $tasks*3 )
- Example to consider the Subagent with the least number of tasks running for the given Subagent Cluster
- The Subagent with the lowest priority value will be used for the next task. If the expression evaluates to a value below 0 then the Subagent is not considered for execution of the next job.
- The Subagent Cluster configuration is improved to allow specification of an expression for the priority attribute of each Subagent: