Batched Blue/Green Deployments

Deploy WorkClaw agents in staged batches with blue/green cutover per batch. Ideal for large fleets requiring canary-style validation.

What is a batched blue/green deployment?

Batched blue/green combines the safety of blue/green deployments with the staged approach of rolling deployments. Instead of updating all runtime hosts at once or one at a time, WorkClaw groups hosts into batches and performs a blue/green cutover for each batch sequentially.

This is the recommended strategy for teams operating large fleets where validating a new build on a subset of hosts before proceeding reduces risk.

How does the batched process work?

  1. Define batches -- WorkClaw divides your runtime hosts into batches based on your configured batch size. For example, a 10-host fleet with a batch size of 2 produces 5 batches.
  2. Deploy batch -- for each batch, WorkClaw performs a full blue/green deployment: provisioning green containers, health-checking them, shifting traffic, and draining the old containers.
  3. Validate -- after each batch completes, WorkClaw waits for a configurable validation window. During this window, you can check monitoring dashboards and confirm the batch is healthy.
  4. Proceed or halt -- if the batch is healthy, the next batch begins. If issues are detected, the deployment pauses. You can roll back just the affected batch or all completed batches.
  5. Cleanup -- orphaned containers from all batches are cleaned up in parallel once the deployment completes or is rolled back.

When should I use batched deployments?

Batched deployments are ideal when:

  • You manage a large fleet of runtime hosts and want canary-style validation.
  • You need the instant rollback of blue/green but want to limit how many hosts are affected if the new build has a problem.
  • Your team follows a staged validation process where each batch is reviewed before proceeding.

How do I configure batch size?

Navigate to Admin > Settings > Deploy Strategy > Batched > Batch Size. The batch size determines how many hosts are updated in each phase. Smaller batches provide more validation checkpoints but extend the total deployment time.

How does rollback work for batched deployments?

Each batch retains its blue environment until the entire deployment is finalized. This means you can roll back any individual batch instantly, or roll back all completed batches in reverse order. Once the deployment is finalized and all batches are confirmed healthy, the old blue environments are decommissioned.

Related documentation