Sobes.tech
Junior — Middle

Is it possible to cancel or revert to a previous version of the application after deployment?

sobes.tech AI

Answer from AI

Yes, the ability to roll back to a previous version of the application after deployment depends on the deployment system and infrastructure used. Modern CI/CD pipelines often implement strategies that allow quick rollback to a stable previous version:

  • Blue-Green Deployment: two identical environments (blue and green) are maintained. The new version is deployed to the inactive environment, and after testing, traffic is switched to it. If issues arise, it can be quickly switched back.

  • Canary Releases: the new version is rolled out to a small percentage of users. If everything is fine, the rollout continues; otherwise, it is rolled back.

  • Rollback via artifact version control system: storing all application versions allows quick deployment of a previous version.

  • Using containers and orchestrators (e.g., Kubernetes): you can rollback a Deployment to a previous ReplicaSet.

Example in Kubernetes:

kubectl rollout undo deployment/my-app

Thus, to enable rollback, you need to pre-configure the appropriate deployment strategy and version storage.