The Web App Deployment Wishlist

Long waiting times, lots of manual steps, constant worrying that something might break. Deployments come in many forms, and if done wrong they are quite the opposite of enjoyable.

The goal of any deployment method, is to get your carefully crafted project online. To share it with the world, and make it possible for people to use it.

That’s the bare minimum. Have you ever though about what else your production deployment could be doing for you?

If done right, your deployment can be more like a trustworthy, reliable helper. It can help you to get useful tasks done in a breeze, keeping you safe from trouble and nasty mistakes.

Let’s look at a wishlist, of what your deployment could be doing for you.

It’s Easy to Deploy a New Version

Have you ever procrastinated on shipping a new features, just because the deployment process required six manual steps and 10 minutes of your complete attention?

A good deployment method can make updating your application feel like crossing a finish line, instead of tedious work.

Deploy With Confidence

What if there’s a bug in my new code? What if I miss a step? Will everything go sideways?

A good deployment process can take the bad kind of excitement out of deploying your app. If something goes wrong, you can deploy a previous state of the application, which was known to work well. You might have a small downtime, but you will be able to restore your data with minimal hassle.

One way to make production deployments less exciting (which, once again, is a good thing) would be to try the new version in a non-production environment. Having a staging environment is part of a good deployment process after all.

Understand How It Works

It’s useful to have a mental model of how things work. This makes you more confident interacting with them, and can mean that you know what to expect and what is safe to do.

Some deployment method and architectures are easier to conceptualize than others. With a PaaS like Heroku, you can safely let the platform take care of things behind the scenes. If you want to use something like Kubernetes, you’ll need to know about way more moving parts.

Minimize Unwanted Downtime

For most sites, a tiny bit of downtime is not something to lose sleep over.

However, if your requirements warrant it, the right deployment method can give you zero-downtime deployments. Imagine being able to ship a new versions of your app, or to perform maintenance operations without bringing the site down even for a second.

Run in a Predictable, Stable Manner

Not going down is great, but what about staying in a working condition without requiring constant effort?

It’s not quite fire-and-forget, but rather a certainty that you can rely on things to go right while your attention is elsewhere for a while.

Make Maintenance Simple

You know that tension of being root on a production machine? Imagine running an important maintenance task without getting nervous over it. How easy is it to interact with your deployed application? How easy is it to run maintenance tasks like applying migrations to the database, creating backups or restoring from a snapshot?

In the best case, this will feel like operating in a good development environment. Everything you need is just one simple command away, and it’s really hard to break anything.

Available for Your Users

Your deployed site is there to be used.

With a good deployment, your users can interact with the site whenever they need, and there’s no chance of this failing. Downtimes are avoided. Deployments and similar routine operations happen without negatively impacting the deployed application.

Fast for Your Users

Being up is cool and all, but making a good impression is really important as well. People who access the app and interact with it don’t have to wait a lot, requests are processed quickly. Everything feels shiny, new and professional.

The right deployment architecture and tweaks can make your project feel blazing-fast. This responsibility is shared with your app of course, but the right environment can make all the difference.

Scales up and down According to Demand

Sometimes you want to react to increased demand, but you also don’t want to burn money by default.

Your deployment architecture can help to scale your infrastructure up when traffic increases, or down when it makes sense. For the sake of the company (or your wallet), your deployment helps to prevent excessive resource usage. All of that without negatively impacting your users and being blazing fast.

Surface Errors Sooner Rather Than Later

Your deployment method can help to find errors as soon as possible. Deployment pipelines can help to do so. They are designed to make the checks progressively more effortful, and find simple errors as early as possible, with the least amount of work and time.

Finding out a unit test is failing is better than noticing it in staging. Discovering that staging is behaving weirdly is better than doing so in the production environment. Your deployment can assist you in keeping production free from avoidable bugs.

Resilient to Failure

Sometimes things just go wrong. By random chance or an unlikely event, stuff out of your control will fail eventually.

A machine can go down because of a hardware defect, the network can go down or an external service can become unreachable.

If your deployment and app are well-structured, they should be able to react to failures, or at least handle them gracefully. Resilience isn’t enough sometimes. At the worst, your deployment can still help you to get back up instead of staying down – see “Plan B” below for more on that.

Observable and Monitored

You should be able to tell how your app is doing - now, since yesterday or over the last few weeks. By making the resource usage and many other things visible, you will be able to spot and investigate strange behavior and act. Alerts can make you aware of slowly-depleting resources before they become an issue. You can see at a glance how your app is doing instead of guessing and hoping.

If you have monitoring, you can investigate crashes and errors easier. If you have access to usable and useful logs you can prevent the same errors from happening again and again. Observability into your deployment and app is something you don’t want to miss after you had a taste of it once.

Less Manual Work

Time is precious. People make mistakes. A bit of automation can help you to save time, and prevent human error. Establishing repeatable processes, and being sure to follow them goes a long way. Just look at airplane pilots and their beloved checklists.

There are a lot of routine tasks which your deployment can take off your hands.

Plan B (It’s Not the End of the World)

Imagine if all your servers go poof one day. Can you recover from catastrophic failure? Do you have backups and a well-known procedure to recreate a complete production environment from scratch?

Most likely, this will never happen. But just in case it DOES, you want to be ready. Your deployment strategy can make this as simple as it gets. Infrastructure as code and proven-to-be-usable offsite backups can prepare you for the very unlikely and unwanted event of having to bring your app back to life from scratch.

How’s Your Deployment?

That’s been the deployment wishlist. I hope it has helped you to dream big, and see what a good deployment can do for you.

Don’t get discouraged if you are currently at the bare-minimum with your deployment method. You can always do better once you have something working! In fact, that’s the best way to go about it - start with small working system, and improve it step by step according to your needs.

If you want to learn more about web app deployment, make sure to sign up for the mailing list below to receive future articles and exclusive goodies, tips & tricks in the future.

Would you like to go over this list and find out which points your deployment is already good at, and which you want to have for yourself?