Skip to content

Dynamic hot spares based on running pipelines #1998

@sgleske-ias

Description

@sgleske-ias

What feature do you want to see added?

In general, I may know exactly how many hot spares are required based on currently running pipelines. It would be nice to have a dynamic hot spare logic which is based on actual running pipelines instead of a static value.

Feature behavior:

  • per running pipeline hot spares gets 1 * <running pipelines> * <user configurable multiplier>
  • Configurable hot spares maximum to prevent spares getting larger than a specified value.
  • Configurable hot spare idle timeout where hot spares is re-evaluated. e.g. if no running pipelines in 5 minutes I want hot spares to be 0.

Example: I would like 2 hot spares per running Jenkins pipeline. However, I do not want hot spares to go above 10 hot spares as its absolute max.

Benefits:

  • My Jenkins infrastructure would be able to scale down to 0 ec2 instances when no work needs to be done.
  • Reasonable hot spare capacity can be determined by Jenkins administrator based on self-designed architecture or data from APM monitoring Jenkins.

Upstream changes

Unsure

Are you interested in contributing this feature?

I am willing to fully implement this feature. My open source handle is @samrocketman where I maintain some plugins and have contributed patches across the Jenkins project since 2011.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Enhancement.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions