Cloud infrastructure is great when organizations actually need it. But I think most startups would save money and time by keeping it simple until they really need more.
Cloud infrastructure is great when organizations actually need it. But I think most startups would save money and time by keeping it simple until they really need more.
Having done this several times I can definitively say given my experience it's best to start in the cloud with a cloud native architecture. I can run a fully containerized application in ECS or EKS for a few hundred bucks a month. Why would I incur all the costs and limitations of a VPS or even worse a server I have to look after myself? How much can I really save? $50 a month maybe less?
A long time ago when I was working a major telecomm provider I had the privilege of working with a great software mentor. He instilled in me the lesson of knowing approximately where you are going to land and not do anything now that would jeopardize that landing.
If I was a CTO at a greenfield startup. I would insist we deploy on a PaaS that supports serverless, object storage, and container orchestration. We would recognize and enforce well accepted patterns that will not impair our ability to scale later. There is plenty I can do to keep the costs low(most importantly turning things off) then when I need to scale up its as easy as turning a knob.
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.
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.
And when your product does take off, scaling is often trivial.
I consider the latter to be far more complex.
Thanks for sharing that.
> object storage
Is this like S3 or more like DynamoDB, or something else?
Like, I assume I'm the one missing something because people swear up and down that it's the other way around, but I haven't found the happy path for managing hosts (virtual or physical) that delivers on the promise of simpler-than-cloud. There's a disconnect somewhere because I'm sure there are a lot of people who can't find the happy cloud path that delivers on the simpler-than-diy approach.
This is where I feel like I'm doing stuff wrong. If we're comparing Terraform, it means we probably care about reproducibility (rather than an "AWS console vs SSH into pet hosts" scenario), so the like-for-like comparison involves bringing in something like Ansible. On top of that, you need to pick, install, and configure logging exfiltrators, monitoring agents, process managers, etc and you need to operate systems that let you explore those logs and metrics. You also need to configure SSH access and manage keys. You may also need a custom base image, so maybe you're doing packer stuff as well? On top of that, you need to run some database which means managing backups and running replicas with failover (or maybe we/re a small business and we don't care that much about reliability?). And again, we care about reproducibility, so we need to encode all of this stuff in Ansible playbooks or similar. You probably also need something like security groups to restrict which things are allowed to talk to which other things, and encoding this in Ansible or similar is maybe impossible if you don't have software-defined-networks.
It seems like a lot to get to parity with what someone could throw together with API Gateway, Lambda, S3/DynamoDB in a couple reasonably-sized Terraform files in a few hours for a pretty marginal cloud spend (most small businesses would probably stay pretty close to the free tier--these services are extremely inexpensive).
I think one place that I disagree is while you could do that in a few hours, your average developer couldn’t. You’re now talking about everyone to learn lambda and terraform and whatnot, whereas with a “standard” web server, that people are familiar with, a lot of that is more easily centralized. just throw some annotations and routes are done, vs the arcane api gateway config. The tools and frameworks for lambda just didn’t seem to be there yet.
Fwiw I’m all in on aws, cost was one of the easiest arguments to deflect. Ultimately we needed to show developer velocity increases as that’s the cost that mattered. And security isn’t compromised, which the bigger the company the more roadblocks I’ve seen to just give devs terraform.
Yeah, big companies don’t like giving devs raw Terraform. My company has sandbox environments where devs can do iteration with permissive Terraform access. That works pretty well for stuff like this.
Also, I use AWS for hobbyist stuff and you can easily use this serverless stack for <$5/month.
This is because I have to factor all the costs. This includes electricity, maintenance, incident response, networking, renting the cage, vendored software for backups, threat detection, fire suppression, equipment upgrades, licensing, alerting, and it goes on and on and on...
I'd challenge you to break down the full cost of owning a server as you see it. I bet you will miss 75% of the actual costs involved. I promise short of seizing a colo like its Nakatomi Plaza and running it at gunpoint you will never in a million years come close to the total ownership cost of cloud instance. You can't compete with the economies of scale and the caliber of the engineering.
I don’t have a horse in this race, but it’s interesting that your experiences are so different. Would love to hear your take on their numbers.
The most recent article, with lots of hard numbers, is here:
https://dev.37signals.com/our-cloud-spend-in-2022/
There was a recent article that made the HN in front page that broke down the savings they expected, but I’m on mobile and can’t find it now. Something about “two datacenter racks.”
I don't understand how they are going to achieve that. Does it include routers, switches, IPS's? What about the costs associated with having a physically wired network instead of a software defined network.
Also they state they are region redundant which is probably way overboard. Will they be protected if they lose their entire datacenter? Will they flop over to another geo? If not then you must consider not their current spend but their spend if they were single region. That would further eat into proposed savings.
Don't get me wrong, I do believe you can achieve cost parity in a Datacenter but you need a certain level of scale. I am skeptical that it can be done at $3 million in spend.
https://world.hey.com/dhh/we-stand-to-save-7m-over-five-year...
Yep read that guys blog history and the agenda just pops right out. It's not just about cost for Basecamp its ideological. I can't help but imagine this bias leaks into the financial and operational calculations.
We had a similar situation. We had a team did not want to move to the cloud, the business forced them, so they built the system in a way that fought the cloud. Then the self fulfilling prophecy kicked into high gear. "See we told you it was a bad idea, look at all the problems we have!". The problems were created through half baked attempts to be "agnostic" to the cloud. Once we removed those elements we were able to reduce the cost of the system by over 90%. It was far cheaper than when it was running in the Colo. These folks had no interest in optimizing for cloud native execution they were already planning their move back into the Colo.
But this is a fairly narrow use case and until hitting limitations of a couple of VPSes, moving to the cloud does not make sense for most startups. My 2c.
And even right now today, ChatGPT regularly displays "too busy" messages.
i.e. this is absolute tosh.
And if you know what you're doing you can take something down overnight and put it on a dedicated server.
ChatGPT scaled from 0 users to 100 million in 2 months. Probably millions online at any given second.
Its too busy, because it literally exhausted all the GPUs Azure has as its disposal.
Without the Cloud, scaling ChatGPT would have been impossible. It would have been nowhere near its current success. Remember that GPT3 was released to the public in Mid 2022, had no public reaction, because it was put behind a paywall. ChatGPT had to be free, and able to cope with the load, to be successful.
Therefore, it did not have to be able to cope with the load to be successful.
All you did is illustrate my point.
Looking at Supabase, I think it would be a good choice for most startups[0] and it will scale as the business does, but it removes most of the overhead of getting started. It has Auth, A database, Lambda Support, CDN and File Storage. Baked in are REST APIs and GraphQL APIs out of the box.
Its reasonably well priced and there's little friction on setting up and far, far less to worry about hosting wise. No need to setup a box and maintain updates etc, and it can scale if the business really does scale.
I don't think all cloud propositions are the same. AWS, GCP (maybe sans Firebase?) and Azure definitely have their place but I don't think they're great for the average startup.
[0]: Even medium sized and enterprise businesses could leverage it. Its all powered by Postgres at the end of the day