How *not* to put production apps on AWS

I’ve come across a lot of different ways of using AWS in the last 9 years or so of using it. It’s a complex platform, with some really simple basics that you should understand before you do anything.

There are two massive issues that I see when people use many cloud services (it’s not just AWS):

  1. Putting *everything* on a single instance and because it’s on a “cloud” environment, calling it a “cloud” solution
  2. Utilising auto scaling before you have done any real testing on stability

If you use a cloud environment, then putting a database and app on the same server is idiotic. You might as well just get a virtual server from somewhere like Digital Ocean and be done with it.

Also, it’s a terrible setup in terms of scalability, and basically it’s rubbish.

One of the great things about cloud is the ability to separate out apps, data, load balancing, security etc. If you don’t understand it then find someone that does, because the likelihood of you succeeding has just diminished significantly.

Autoscaling is what cloud is great for... except that autoscaling can be a real issue if you build a bad app in the first place. The fact that something stays online over a spike is a great thing, but auto scaling from the start requires a decent amount of load testing to be done prior to that.

Which is why I often start in a non-scaled environment. It’s far faster to see problems with code and fix them even in a production environment. When you’re site goes down in the first day or two for only 5 minutes because you forgot to make a call on something minor, in an autoscaled environment you might not have noticed this for days, or weeks. Testing is great, but things can sometimes be missed.

Scaling is useful once you have run a production workload for a time and it’s running a stable number of servers. It’s important to know how many servers are useful for your apps to run, because then you know when your autoscaling is working. If you have seen your app running on 3 servers comfortably for a week or two, then you can setup your autoscaled environment to run on 3 and scale up to X as required. Also, if your app starts running 6 server or 20 without significant increase in users, you are then aware of an issue.

The point about all this is that AWS and cloud is great.

However, if you just throw applications at it and expect the cloud to “do the scaling for you” then you can end up spending much more than you should and not recognising (often until it’s too late) whether your code is working or is constantly failing.

Learning the platform isn’t an optional extra.