Controller, Nodes, Agents, and Executors
Scenario: A production controller becomes unavailable because compilation ran beside controller services and exhausted memory.
Pipeline example
pipeline { agent { label 'linux && nodejs' }; stages { stage('Test') { steps { sh 'npm test' } } } }
Scheduling and execution are separate
The controller stores configuration and records, evaluates Pipeline orchestration, maintains the queue, and assigns work. Nodes are configured compute resources; agent processes connect them; executors are concurrency slots. Labels describe capabilities such as operating system, architecture, tools, network zone, or specialized hardware. A label expression is a scheduling API, so changes to labels must be reviewed like changes to build requirements.
General builds should not run on the built-in node. Compilation, browsers, and image builds can exhaust controller memory, disk, file descriptors, or processes. Agents need least-privilege identities and constrained networks. Ephemeral agents provide clean reproducibility and elastic capacity, but introduce provisioning and download latency. Static agents support warm caches or scarce hardware, but require patching and protection from cross-build contamination.
Capacity has several dimensions
Adding executors helps only when CPU, memory, disk I/O, ports, licenses, and downstream systems tolerate more concurrency. An idle fleet can still have a long queue if jobs request an unavailable label. Track oldest queue item by label, executor utilization, agent provisioning failures, remoting disconnects, workspace disk, and task resource use rather than one fleet-wide utilization percentage.
If an agent disappears mid-step, decide whether repeating that step is safe before wrapping it in retry. Compilation and isolated tests usually are; a partially completed release or migration may not be. Diagnose the last durable Pipeline step, node log, channel termination, and external operation state. The objective is not merely reconnecting an agent, but knowing whether the numbered build can resume without duplicating effects.
Goal: Practice the concrete behavior in jenkins-labeled-parallel-tests. Learn sections have no Jenkins terminal; the Jenkins lab opens the real shared service in a new full-screen tab inside your private folder.