Skip to content

Rollbacks

Rollbacks enable you to quickly pin all traffic to a recent deployment in case something goes wrong. This can be particularly helpful if your latest deployment’s code or configuration introduces runtime bugs.

To manually roll back traffic to a specific deployment:

  1. Navigate to your app in the dashboard
  2. Open the Actions menu of the specific deployment
  3. Select the Rollback action
  4. Confirm the action

Rollbacks pin all app traffic to the target deployment. After a rollback, traffic no longer automatically routes to the latest ready deployment. This prevents automation and teammates from immediately deploying the problematic code or configuration again.

To automatically route traffic to the latest ready deployment again, unpin traffic from all pinned deployments:

  1. Navigate to your app in the dashboard
  2. Look for the 📌-icon to find pinned deployments
  3. Open the Actions menu of a pinned deployment
  4. Select the Unpin action
  5. Confirm the action

Rollbacks use the container image build and most configuration from the target deployment (🎯), while custom domain settings are based on the app’s current configuration (🆕), as shown in the following overview:

ConfigurationSourceExplanation
Container image build🎯The build from the target deployment is reused
Environment variables🎯The environment variables from the target deployment are reused
Autoscaling settings🎯The autoscaling settings from the target deployment are reused
Instance size🎯The instance size from the target deployment is reused
Custom domains🆕The app’s current custom domains setup is used
Traffic🎯The app’s traffic is pinned to the rollback target

Only deployments in the Ready state are valid rollback targets. FastAPI Cloud keeps at least the previous 5 ready app deployments around for rollbacks.