we currently want to introduce a loadbalancing on the Jenkins server and our nodes. I have already created several nodes.

Currently it is also so that if a node is blocked accordingly, that the next free option is chosen. But only if a node is issued. Unfortunately, this is only part of what the whole task looks like.

Task to be solved:

  • If a node is under load, the next free option should be selected automatically.

  • If a node is issued, then the next inactive node should be taken.


For security reasons, you do not want us to use the loadbalancing plugin. So there has to be a solution that we have through a script or some other solution

  • Have you thought about using ephemeral agents to satisfy your builds?
    – casey vega
    Commented Apr 29, 2019 at 19:06
  • @Mornon, have you had a chance to review thw advice?
    – Ian W
    Commented Oct 22, 2020 at 10:39

1 Answer 1


This is similar to: https://stackoverflow.com/questions/55023570/how-to-run-a-job-on-first-available-node/55567958

Have you considered Least Load plugin?


By default Jenkins tries to allocate a jobs to the last node is was executed on. This can result in nodes being left idle while other nodes are overloaded. This plugin overrides the default behavior and assigns jobs to nodes with the least load.

Don't imagine there's a security issue there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.