Back to Activepieces

Scale-down: a worker drains in under a second

docs/resources/diagrams/autoscaling-drain.html

0.86.2657 B
Original Source

Scale-down: a worker drains in under a second

A worker pod deleted in the middle of a load test. On SIGTERM the poll loop stops, the in-flight flow finishes, and the process exits — no run is dropped.

0

0.5s

1.0s

1.5s

2.0s

Drain

pod deleted
under load

Finish in-flight run

0.42 s

Kubernetes removes the pod

worker exits — 0.49 s

gone in 1.7 s

In-flight flow completes

Teardown + "Worker stopped"

Pod object cleanup

Verified under load: 747/747 requests returned 200 and the flow-runs API showed zero failed runs. Queued runs stay in Redis and are picked up by the remaining fleet — aggressive scale-down policies are safe.