Here’s what you’ll need to setup and run a single database :-
- Installation script and infra provisioning. You need a repeatable way to do this with as little manual intervention as possible and I can swear it never just works.
- Backup and recovery scripts and associated monitoring
- Replication setup, monitoring and debugging. It will break often.
- Monitoring for infra - CPU, memory, network. There’ll be unforeseen spikes and random slow downs and a whole bunch of slow queries you’ll debug on a regular basis.
- Security - users, permissions, auditing. Both machine and database. Regular password rotation and firewall rules. Ability to off-board users.
- If you survive all this, being able to scale up. And I mean just vertical scale up will take you far but you cross that limit, you now suddenly have to deal with sharding or partitioning.
So when I joined a new startup and we were building it all from scratch it was a very easy decision to go with the cloud. We spent $3500 a month. Not a lot but nothing compared to the salaries and marketing spend.
The underlying point I made that is being ignored is that 99.9% of start ups never need any of the stuff you are talking about. And hundreds of dollars a month is a large amount of money for them.
The bigger question mark than the money, I think, is whether this scale up approach actually works, or whether you end up fundamentally changing everything anyway. In my experience it's a mixed bag. There are some advantages, but it also isn't a panacea, and certainly isn't as easy as turning that dynos knob on heroku was. But at the end of the day, I land on it being worth it for a business (though not for a hobby). But it isn't a no-brainer.