FerryDocs
ArchitectureDeploy pipeline

The service lock

The service lock lets one operation at a time change the containers of a service.

Edit on GitHub
DeployReconcilerService lockheld by the deployContainersof the service

Before it starts instances, the deploy takes the lock of the service.

1 / 4

Each service has one . A takes it at the start of the state deploying and keeps it until the deploy ends.

Why it exists

Many parts of the engine change containers: a deploy, the , a scale, a suspend. With the lock, they do not touch the containers of a deploy in progress.

The reconciler never waits for the lock. It skips a busy service until its next pass. Thus the reconciler never works against a deploy.

On this page