Course contentsShow
← Cloud and Infrastructure
Lesson 1771 of 2,98937. JenkinsFree lesson

Jenkins Architecture: Master and Agents

Learn the master-agent architecture, how Jenkins distributes workloads, and the role of controllers in orchestrating builds.

Jenkins Architecture: Master and Agents

You'll learn how Jenkins distributes build workloads across a master-agent architecture to orchestrate and scale CI/CD operations.

The Master-Agent Model

Jenkins uses a controller-worker architecture (formerly called master-slave). Think of it like a construction site: the Jenkins Master (controller) is the project manager who assigns tasks, while Agents (workers) are the crews who actually build things.

The Jenkins Master (Controller)

The controller is the central brain of Jenkins. It:

  • Hosts the Jenkins web UI and API
  • Stores pipeline configurations and job definitions
  • Schedules builds and decides which agent runs each job
  • Monitors agent health and availability
  • Stores build results and logs

The master orchestrates but ideally doesn't execute heavy builds itself—that's inefficient and risky for production systems.

Jenkins Agents (Nodes)

Agents are separate machines (physical, virtual, containers) that:

  • Connect to the master via SSH, JNLP, or other protocols
  • Execute build jobs assigned by the controller
  • Report status and results back to the master
  • Can be labeled (e.g., linux, docker, python3.9) for targeted job routing

How Workload Distribution Works

When a build triggers:

  1. The master schedules the job based on agent availability and labels
  2. The job is dispatched to a matching agent
  3. The agent executes the build steps in isolation
  4. Results stream back to the master for storage and display

This architecture enables horizontal scaling—add more agents to handle more concurrent builds without overloading the controller.

Why This Design Matters

Separating orchestration from execution prevents the master from becoming a bottleneck. You can run Windows builds on Windows agents, Linux builds on Linux agents, and resource-intensive tasks on powerful machines—all coordinated by one master.

Key Takeaway: Jenkins master-agent architecture separates orchestration (master schedules and monitors) from execution (agents run builds), enabling scalable, distributed CI/CD workloads across diverse environments.