Pipeline builds and High Availability (active/active)

2 minute read

Using High Availability (active/active) in your controllers has several implications about how your builds behave, how they are scheduled across your controller replicas and some build-related plugins work.

This page contains a collection of important considerations about this topic.

Running builds

CloudBees has tested a range of builds and triggers in High Availability (active/active) mode to clarify use cases for CloudBees CI High Availability. Pipeline projects are the focus of using HA (High Availability) mode, and are thus expected to work without limitations. Some exceptions are documented below.

Build scheduling and explicit load balancing

Starting with version 2.426.1.2, CloudBees CI provides explicit load balancing for controllers running in HA (High Availability) mode.

Explicit load balancing redirects new builds to the the controller replica with the least load.

CloudBees CI calculates the load using a simple metric that considers the following factors:

  • Running builds.

  • Already scheduled queue items.

  • Online agents.

CloudBees CI provides explicit load balancing in most cases. The table below summarizes supported and unsupported cases:

Table 1. Build Scheduling and explicit load balancing
Job type Scheduling strategy

Interactive trigger (Build Now)

Replica with the least work load

Scheduled build (Cron job)

Replica with the least work load

Branch Indexing (Multibranch and Organization folder jobs)

Replica with the least work load

Webhooks (including multibranch events)

Replica with the least work load

REST API Triggers

Replica with the least work load

Replica with the least work load

Always the same replica as the upstream build.

If the replica running the upstream build fails and another replica adopts the build, notifications from downstream jobs don’t reach the upstream job, which, if configured to wait until completion, keeps waiting for the downstream job to finish until finished manually.

Replica with the least work load

Any other trigger type

Same replica that processed the trigger

Pipeline policies for pipeline idioms incompatible with HA (active/active)

The following pipeline idioms or steps are incompatible with HA (active/active):

  • build

  • lock

  • milestone

If you plan to use controllers running in HA mode, you can define Pipeline policies to warn developers about those incompatible steps (Warning policy), or to prevent developers from using them (Fail policy). The rule used for this kind of policy is Pipeline idioms incompatible with Cloudbees High Availability (active/active), as displayed in the image below:

Pipeline policy rule for pipeline idioms or steps incompatible with HA(active/active)
Figure 1. Pipeline policy rule for pipeline idioms or steps incompatible with HA(active/active)

Refer to Pipeline policies for more information about how to define and apply pipeline policies to your controller.