When changes apply
A saved change applies at the next deploy or restart, because each deploy keeps a snapshot of its environment.
Save. Ferry saves the new value. The instances that run keep the old value.
Ferry freezes the environment of a deploy when the deploy starts its instances. This is the snapshot.
All that starts containers for that deploy later uses the snapshot: crash replacements, scaling, a resume, and jobs. Thus a saved change applies only at the next deploy or restart.
What Ferry does after a change
ferry env set, ferry env unset and the API with restart=true restart the service only if it has something to restart.
| State of the service | Result |
|---|---|
| Live | Ferry puts a restart in the queue (trigger env_change). |
| A deploy in progress | The restart waits in the queue behind it. Thus you do not lose the new values. |
| Never deployed | Nothing restarts. The first deploy uses the new values. |
| Suspended | Nothing restarts. After ferry resume, run ferry restart NAME to apply the change. |
A restart can fail, for example because a reference does not resolve. Then the previous deploy continues to answer. See If a reference does not resolve.
A restart is a new deploy that uses the live image again with the current settings and environment. See Restart a service and Settings and the live deploy.