My change away from self hosting everything
I've been a holdout when it comes to adopting cloud services as a place for hosting web apps. I mostly saw it as something enterprises might need and that is also successfully marketed beyond that to business that don't.
The thinking I had can be summarized like this: "they are trying to sell me that if I'm suddenly famous tomorrow my app or website can scale with that and that it can handle massive amounts of data and load - except I know I won't be famous tomorrow". It's true: probably I won't be famous tomorrow, if I will then maybe I'll write another post here. Also there are the stories of surprise high bills: this too can be a totally valid concern if you're not confident in having configured everything to prevent it (or a provider is making it difficult).
The main shift in my view on this has come by separating private vs. business use of hosting things on the web.
Private use: hosting things to rely on yourself and for learning
Private use is often having two goals, at least in my experience:
- A frugal way to have access to versions of a bunch of web based services.
- Learning about how to reliably provide those services.
Both of those are really valid and an amazing thing to do: running webservers and database servers teaches about how to run those, back them up properly, about deploying to this infrastructure and a lot more. Running your own mailserver will teach you a lot about how email works, especially when you look through mail logs and try to figure out why some message did not go through. Also it can be a really affordable way to have a lot of services available: just consider how a VM for less than 10€ per month may give you hosting for multiple websites, emails and maybe something like nextcloud.
On the learning angle alone I would in fact encourage everyone to do at least some of this somewhere along the line. There is one important caveat I will give: if you or others depend on the service being available, when downtimes or other issues become unacceptable, that's when a service is better not self hosted - at least in my mind. Let me give you an example: Last year I still had my emails hosted on a VPS I set up years earlier - and then this came along: https://www.heise.de/en/news/Web-host-Contabo-Server-outage-due-to-cooling-problems-9855587.html Sure you can say I didn't choose the best provider back when I didn't know much about anything (almost 10 years before), but the idea here is that ideally something like my emails just should not be a thing where I know have to fight with topics like this.
Business use: optimizing for reliability and focus
Here is where my thinking changed. When running things as part of a business the use "the cloud" (managed services, even just VMs with a disk that is replicated multiple times by the provider) is not about scaling, at least not primarily. It's about outsourcing work and getting it done at a level where your small team in a startup or small to mid-sized business won't be able to do it themselves.
Think about this example: a major value of your business is likely in the data that's in your databases and the ability - for you and your clients - to access it at all times. So you want this to be absolutely robust and always available. Might we as developers be able to figure out mysql setups with replication and failovers? Yes, probably. The thing is this: if we stay in this example then a small setup with RDS will cost us less in a year, maybe several years, than working on this even a moderate amount of time. And chances are it's a lot more robust because it has been set up by people who learned from running thousands of these and get to take lessons from every issue.
Another factor to take into account: in the private use case any downtime is mostly an annoyance. In the business case the downtime will cost you money, reputation, customer loyalty.
Conclusions
In short: what you're buying from the cloud vendors is the ability to focus on what matters - and that's usually less tech itself but building a product and what you need to make it successful. For my own situation the realization is that self hosting services wasn't so much "wrong", I was simply optimizing for different things than I'd optimize for now.
There will be a second part of this where we'll go through some examples of different services and how I'm thinking about the difference it makes running those yourself vs. using managed services.