DevOps

How to resolve Jenkins pipeline performance bottlenecks for large scale microservices?

DA Asked by David Miller · 14-03-2025
0 upvotes 14,264 views 0 comments
The question

We are currently scaling our microservices architecture, but our Jenkins CI/CD pipeline is hitting major performance bottlenecks. The build times have spiked to over 40 minutes, which is stalling our deployment frequency. We’ve tried increasing heap memory, but the latency persists during the artifact archiving phase. Does anyone have experience with optimizing agent nodes or using parallel execution to cut down this lead time? 

3 answers

0
SA
Answered on 18-05-2024

Optimizing Jenkins for high-velocity microservices requires a shift toward distributed architectures. From my experience managing large clusters in 2024, you should first look into "Parallel Stages" within your Declarative Pipeline. By running independent service tests simultaneously, you can cut total duration by 60%. Additionally, offloading your workspace to high-performance SSDs and utilizing the "Discard Old Builds" plugin helps prevent filesystem bloat. If archiving is the bottleneck, consider using an external repository like Nexus or Artifactory instead of storing artifacts directly on the Jenkins controller. 

0
M
Answered on 20-05-2024

Have you analyzed whether the delay is coming from the master-agent communication overhead or the actual build scripts? Sometimes the "Remoting" logic in Jenkins can cause significant lag if the network throughput between your controller and node is limited. 

DA 22-05-2024

That is an excellent point, Michael. In our case, it was actually the overhead. We switched to using the "Kubernetes Plugin" for Jenkins, which spins up ephemeral agents as pods. This ensures that the agents are geographically closer to the container registry, effectively reducing the data transfer time. It also solved our resource contention issues since each build gets its own isolated environment.

0
LI
Answered on 25-05-2024

I highly recommend checking your Docker layer caching. If your images are being rebuilt from scratch every time, it will drastically increase the archiving and push phase duration. 

SA 26-05-2024

I agree with Linda. Implementing a robust Docker cache strategy and using "Kaniko" for builds within Kubernetes saved our team nearly 15 minutes per pipeline run.

Share your thoughts

Your email address will not be published. Required fields are marked (*)

Professional Counselling Session

Still have questions?
Schedule a free counselling session

Our experts are ready to help you with any questions about courses, admissions, or career paths. Get personalized guidance from industry professionals.

Request a Call Back

Search Online

We Accept

We Accept

Follow Us

"PMI®", "PMBOK®", "PMP®", "CAPM®" and "PMI-ACP®" are registered marks of the Project Management Institute, Inc. | "CSM", "CST" are Registered Trade Marks of The Scrum Alliance, USA. | COBIT® is a trademark of ISACA® registered in the United States and other countries.

Book Free Session