Blue/Green Deployments

Learn how blue/green deployments work in WorkClaw for zero-downtime agent updates with instant rollback capability.

What is a blue/green deployment?

A blue/green deployment maintains two identical environments -- blue (current) and green (new). WorkClaw deploys the new build to the green environment, verifies it is healthy, and then shifts all traffic from blue to green in a single cutover. The blue environment remains warm so you can roll back instantly if something goes wrong.

This is the default deploy strategy for WorkClaw because it offers the safest combination of zero downtime and fast rollback.

How does the blue/green process work?

The deployment follows these phases:

  1. Provision green -- WorkClaw spins up a new set of containers running the latest build on the green runtime environment.
  2. Health check -- the green environment receives synthetic health probes to verify the agent responds correctly, skills load properly, and connections are active.
  3. Traffic shift -- once green passes health checks, WorkClaw redirects all traffic from blue to green. This happens atomically, so users experience no interruption.
  4. Drain blue -- the blue environment continues to handle any in-flight requests until they complete, then its containers are drained and stopped.
  5. Cleanup -- orphaned containers and pre-existing orphans are cleaned up in parallel to free resources.

When should I use blue/green?

Blue/green is ideal when:

  • You want instant rollback -- the previous environment is always one click away.
  • You have a small runtime fleet -- the overhead of running two environments simultaneously is manageable.
  • You value simplicity -- there is no partial rollout state to manage.

What are the tradeoffs?

The main tradeoff is resource cost. During deployment, you run double the number of containers. For teams with large fleets or tight resource budgets, rolling or batched strategies may be more efficient.

How do I trigger a rollback?

From the deployment detail page, click Rollback. WorkClaw shifts traffic back to the blue environment immediately. Because blue was kept warm, the rollback completes in seconds rather than requiring a full redeployment.

Related documentation