Introduction
In a JS7 - Agent Cluster jobs in workflows are assigned a Subagent Cluster that includes a Selection and Scheduling Mode of Subagents:
- Subagent Clusters present a logical view of the way a given number of Subagents co-operate for job execution.
- The Selection makes use of one or more Subagents.
- The Scheduling Mode is one of:
- active-passive: execute jobs with the first Subagent and switch to the next Subagent only if the first Subagent becomes unavailable (fixed-priority clustering).
- active-active: execute each next job on the next Subagent (round-robin clustering).
- metrics-based: execute each next job on the Subagent that best matches metrics such as number of parallel tasks, CPU and memory consumption.
Active-Active Subagent Cluster
A Subagent Cluster can include a single Subagent, a number of Subagents or all Subagents. Each next task is executed on the next Subagent (round-robin) in the ordering defined by the Subagent Cluster.
Director Agents in a Subagent Cluster can take an active part in job execution. Users are free to add Director Agents to a given Subagent Cluster. A minimum active-active Subagent Cluster includes 2 Director Agents for job execution.
Error Handling
The following applies to unavailable Subagents:
- If a Subagent is unreachable (shutdown or crashed) then it is not considered for job execution. No error is raised, but the next Subagent will be assigned the job.
- On normal termination the jobs in a Subagent will complete normally, no further jobs are accepted for execution.
- If the Subagent is crashed then running jobs will fail and orders for running jobs will be set to the failed state. Such jobs are restarted when restarting the Subagent. Alternatively, jobs can be restarted from a next Subagent when the crashed Subagent is reset. For details see JS7 - FAQ - How does JobScheduler terminate Jobs.
The Subagent Cluster is considered functional as long as one Subagent remains for job execution.
Scalability
Subagents can be used for vertical and for horizonal scaling:
- A single Subagent can execute > 15 000 tasks in parallel. There is no hard limit for the max. number of parallel tasks. A soft limit for the number of tasks can be specified per Subagent Cluster.
- Users can shutdown and can restart Subagents at their will. When a Subagent is started then it is automatically considered for next job execution. For example, in a containerized environment 10 Subagents are configured for a Subagent Cluster with 2 Subagent containers running during normal hours and additional 8 Subagent containers being started at peak times.
Resources
- JS7 - Agent Cluster - Active-Passive Subagent Cluster
- JS7 - Agent Cluster - Metrics-based Subagent Cluster