Just launched: Instant deployment rollbacks

Sebastian Kippe ·

We’ve all been there before: you just deployed an update of your app to thousands of users, but then you realize something is wrong. Perhaps exception notifications start piling up, or you even see an outright blank page due to some nasty bug. In any case, finding the cause, fixing it, and deploying a new version, is oftentimes not a good option in emergency situations.

So we just launched a new feature for Deploy, which we had been testing and improving with some of our own apps for a while. You can now instantly rollback your deployments to earlier versions from your project’s deployments panel:

Screenshot of deployment rollbacks

Within seconds of pressing that button, your app or site will be delivered in exactly the state it was after that specific deployment.

How does it work?

The buttons are fairly self-explanatory, but here’s what happens behind the scenes: We’ll keep the last 5 builds of your app in our storage backend, where assets are delivered from.

The build number of the active version of your app is then stored in our Redis cache, which our load balancers also use for determining if your app has History API enabled for example (i.e. direct all URLs to index.html).

When you rollback or forward your project to a different version, we just switch the version key in that cache, and the load balancers then immediately start delivering the assets for that specific version.

Caveat

If you’re using AppCache (e.g. via our automatic AppCache manifest generation), then depending on how much time passed between the deployment and your rolling it back, users might have cached the latest version of your app, of course.

In that case, they’ll either have to wait until their next visit (default with AppCache), or you can always prompt them to reload, whenever a new version has been downloaded and cached in the background. For the latter, we also offer an automated deployment strategy, which you can enable by just flipping a switch on your app’s deployment settings page.

Questions?

If you have any questions or feedback, just leave a comment below. You can also ping us on Twitter, drop us an email, or visit our support site.