> The cloud has made otherwise smart people into unthinking drones. The cloud has allowed smart people to focus their time on unsolved problems, not waste hours/days setting up linux for the upteenth time.
I’ve worked at big companies with smart people who burn days and weeks trying to get IAM, gateways, vpcs, firewalls and lambda to play together. Let alone the ongoing nightmare of ops/dev interaction.
Complete cloud fiction.
The worst problem is the giant pile of cloud spaghetti you end up with and no one has any idea what connects to what and what depends on what. Easier to just accumulate more and more resources which cloud companies love.
Just run a computer, it’s easier.
We're arguing opinions and trying to apply logic.
Some people find lambda easier and it must be true that lambda fits certain workloads better. Some people prefer VMs or on-prem or other long-running services. I prefer both in different cases.
> The worst problem is the giant pile of cloud spaghetti you end up with and no one has any idea what connects to what and what depends on what.
Yes, it takes discipline to use the best tool for the job. "You should do X for everyting" is not the right approach, however. This argument is moot.
Right now I support:
* Lambdas for some very expensive infrequent number crunching
* Lambda-like on edge for fast response services that require low latency
* VMs for always-on services
* Computer in a closet for backups, logging, metrics, etc.
At the end of the day you still need to configure the instances for things like auto scaling, security patches, logging and so on. IAM & VPC still come into the mix when running on EC2, so you've avoided nothing.
You haven't avoided much of you replace lambdas with ec2. You do if you replace it with a rented managed server or even a colo.
> Just run a computer, it’s easier.
Statements made confidently while also being totally untrue.
> I’ve worked at big companies with smart people who burn days and weeks trying to get IAM, gateways, vpcs, firewalls and lambda to play together
Working with incompetent people is not an excuse.
Did they use the CDK or even SAM?
Both suck real bad.
Infrastrucure is hard, thankless work. Complexity blows up whatever you do.
table.grantReadWrite(lambda function)
Just as an experiment, I’ve thrown Lambda code I’ve written from scratch into ChatGPT and asked it what permissions it needed. It got it right.ChatGPT is well trained on everything AWS related. It can transform CloudFormation to idiomatically correct CDK or Terraform.
I hate to say this because it sounds like an appeal to authority. But I really want to set context. I used ChatGPT for projects while I was working at AWS ProServe and since I left. They were generic utility scripts with no proprietary business related code.
Cost in time to setup a bare metal, production quality k8s cluster with all the bells and whistles from the cloud: 2 weeks and a skill I will have forever. In fact, the second cluster took 4 hours.
Monthly cost: $240 per month.
Time to spin up a new worker, using cloud compute for elastic load beyond base load: 5 minutes.
Base load capabilities: 120ish cores, 1tb ram, ridiculous terabytes of storage.
Cost to run on managed k8s in the cloud: $5-20k per month.
I had to run a authenticated webhook forwarder outside of the out firewall. Yes, I could have made a real machine, but I've made a lambda instead. It's costing us less than $2/month and I spend zero energy on maintenance, security checks, etc. And all config is in a single git repo that anyone can read and understand - there is zero chance of someone ssh'ing into server for a quick fix, then forgetting to record what they did.
Real machines are great for heavy loads, but you just cannot beat lambdas for the lightweight stuff.
It's my company so I think I'd know :)
Also what exactly are your estimates here? Where are you getting that kind of capacity for $240 a month?
By flat out refusing to consider it, you become as much of a "drone" as the people you call out.
Such as?
If it’s regional latency then run a machine in the region.
That's all. The rest goes in VMs.
When people go home, the dev Lambda cost instantly becomes zero.
You can't do that with (virtual) servers, the cost is exactly the same 24/7. In some cases it's a good thing, some not.
You can't also trivially handle Hug Of Death level load spikes.
Not to mention Lambda uptime vs everything else.
I use Cloudflare Workers on hobby projects to provide server side work for things that have low volume, because the price is so low per user.
It's true that Lambdas will become pricier with consistent high volume usage, but for extremely variable usage or low usage, lambdas are a great option.
I am pretty sure this is way more expansive to spend engineering time making it possible for server(s) to scale using kubernetes and stuff, than just using serverless.
And later with many users, we estimate what better be implemented manually to save money, because at this point it would actually save us money to employ a new engineer than continue paying serverless due to number of users.
Don't you think serverless makes sense?
For example you can write your portable app in Node.js (with or without containerization) and push it to a "serverless" PaaS, without running your own linux machine or worrying about k8s.
e.g Fly.io, Render, Railway...
Do you really feel that serverless is somehow faster than a reasonably modern computer?
Nodejs on a single machine can manage tens of thousands of connections if not hundreds of thousands.
The vast, vast majority of sites would never be able to consume 50% of the computing power in a modern gaming OC.
I would still do it in AWS, as it is like golden garden, don't need to deep dive into security measures, to manage authorizations manually, to handle database sharding and optimizations, you get notifications systems, ML, data streams and everything just connects together.
From there using lambda is way faster than to develop your own api with caching and making sure it is 100% optimized so that 10 thousands ppl can connect, while in fact you might change it tmrw.
If each of these services was 1 server, and each server cost around $20, we'd have to spend $600/month. I know for a fact that there are times where each service request can consume 80% of the memory. For safety we'd want at least twice the memory or number of units, which are functionally doubling the cost. That $600 can easily balloon to 12 or 2400 per month if I were to host the services. Now add another $600 per month for the test environment. So we'd be looking at $1200 - $3000 a month if we kept things really lean.
Now here's the lambda side. Most are about $3 per month (KMS is the lion's share of the cost) for the test & prod. So $90 in service hosting. Yearly lambda is $1080. Yearly self hosting/EC2/droplets is $14,000-36,000. Now repeat this pattern across 5 teams with similar approaches.
The savings add up for us. Now is this a universally true statement? Nope. But there are valid reasons.
Fun fact, if we ever needed to move off of lambdas, we can because NestJS sits on Express. As long as we can access the datastores there is minimal work to move.
I hate managing a server, unless it's running a DB, relay, or other long-running service.
For most my backend work, it's "Please calculate this", and that fits so well into a lambda I don't understand why people hate it so much.
Zero maintenance, zero costs until used, much less security to manage, etc. It all works very well for me.
I still run all kinds of stuff on a linux server, but the comment seems a little gatekeepy. There's nothing strictly better (or even simpler) about running on a server.
> Learn how to, you know, run software on a Linux computer.
I know how to, I run NixOS at home. If you own the VM, you own the maintenance on the VM. Optimizing for the cost of setup is usually wrong, most people are better off optimizing for running costs and maintenance.
Main benefit I see to Linux machine is not having to deal with deprecated run times. With lambda every few years, I have to redeploy my Lambdas when their runtime gets deprecated.
Just run nodejs.
The cloud has made otherwise smart people into unthinking drones.
You don’t need any of the cloud stuff, except a Linux virtual machine. Stop drinking the cloud kook aid, it’s making things much more complex and expensive for questionable gain.
Learn how to, you know, run software on a Linux computer.