Scaling the infrastructure
After spending some time researching infrastructure options, here’s what I learned in a cloud vs self-hosted debate.
Start on the cloud
At the start, focus on getting to the market fast. The big cloud providers make configuration and deployment easy.
Yes, it can get expensive, but you don’t need to prematurely optimize just because you expect to get a lot of traffic.
Simplicity and time to production are key.
Avoid vendor lock-in
If you build your services on top of Docker and don’t use cloud provider-specific services, you are free to hop around.
Cloud providers compete with each other with free credits. I’ve heard that some companies cloud-hop and eat all the free credits everywhere.
It’s probably not for me, but it can work for some.
Have an exit strategy
Let’s say you start with serverless. When that gets too expensive, a few dedicated reserved instances are cheaper.
Once even that gets too expensive, you can still decide to invest into your own infrastructure and go to fully or partially to a VPS or bare-metal provider.
Tradeoffs
The more custom you go with your infrastructure, the more you’ll need to invest in your own tooling, setup and people. The savings need to be calculated.
If you spend $5k per month, but need to hire 3 full-time engineers to maintain your self-hosted setup, that’s probably a bad trade.
Architecture
It’s better to prepare things to be scalable from the get go. You don’t want to be in a situation where you need to rewrite a substantial part of your code, because you need to introduce caching later.
Plan for scale and start cheap with a growth plan.
Yours,
Taj