Learn how to connect a second AWS EC2 instance as a Jenkins agent, run pipelines in parallel, and keep your Jenkins controller fast.
tags: aws, jenkins, devops, cicd
When I first set up Jenkins on an AWS EC2 instance, everything ran on that one server: pulling code, building Docker images, running tests, and deploying. It worked for small labs, but as soon as I ran two or three jobs together, the server became slow and builds started waiting in the queue.
The fix is simple and very common in real DevOps teams: use Jenkins agents . In this article I explain what agents are, why they help, and how to connect a second EC2 instance as a Jenkins agent step by step.
What is a Jenkins Controller and an Agent?
Jenkins has two types of machines:
Controller (formerly "master"): the main Jenkins server. It hosts the web UI, stores job configuration, manages credentials, and schedules builds.
Agent (formerly "slave"): a separate machine that actually runs the build steps.β¦