Assume that Jenkins has three agents (Agent_1,Agent_2,Agent_3)
Both of them are labeled Linux_Server

Question:
When I select Linux_server to run a job, by default which agent will Jenkins choose to actually run the job for me?

Jenkins will do it totally randomly ? Or choose a different agent ? Or choose a agent with least number of job? Or anything else ...

1 Answers

1
Marvin On Best Solutions

This is what their wiki says:

Some agents are faster, while others are slow. Some agents are closer (network wise) to a master, others are far away. So doing a good build distribution is a challenge. Currently, Jenkins employs the following strategy:

  1. If a project is configured to stick to one computer, that's always honored.
  2. Jenkins tries to build a project on the same computer that it was previously built.

See this question for a few more sophisticated approaches. Especially the Least Load Plugin might sound interesting.