News for hackers. Stuff that matters.
Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by andrewstuart on Tuesday October 31, 2023 @07:59AM (#38083429)
Why lambda?

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.

Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by diesal11 on Tuesday October 31, 2023 @08:37AM (#38083848)
My company doesn't make more $$$ because i decided to spend a day setting up an EC2 over Lambda or a similar PaaS solution. If anything i've lost valuable time that could be spent elsewhere. Especially when stuff starts going wrong or i have to schedule time to manually apply OS/Runtime security updates.

> 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.

Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by andrewstuart on Tuesday October 31, 2023 @08:41AM (#38083887)
It’s fiction that configuring the cloud is easier than configuring a computer.

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.

Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by jvanderbot on Tuesday October 31, 2023 @09:09AM (#38084269)
> It’s fiction that configuring the cloud is easier than configuring a computer.

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.

Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by diesal11 on Tuesday October 31, 2023 @08:52AM (#38084039)
To be blunt that sounds like operator inexperience. Throw someone who's spent their life setting up Windows servers on a Linux box and you'd hear similar resentments.

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.

Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by vidarh on Wednesday November 01, 2023 @11:44AM (#38099842)
Having made money supporting both on prem, managed servers and cloud instances, my billable hours for cloud setups always ended up far higher, because the setups were invariable more complex.

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.

Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by alex_lav on Tuesday October 31, 2023 @08:50AM (#38084015)
> It’s fiction that configuring the cloud is easier than configuring a computer.

> 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.

Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by scarface_74 on Tuesday October 31, 2023 @10:16AM (#38085199)
Your people may be “smart”. But they aren’t “experienced”.

Did they use the CDK or even SAM?

Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by baq on Tuesday October 31, 2023 @02:23PM (#38089183)
I've experienced ansible for managing a fleet of multiple hundred on-prem servers and now I'm experiencing CDK for managing a large infrastructure.

Both suck real bad.

Infrastrucure is hard, thankless work. Complexity blows up whatever you do.

Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by scarface_74 on Tuesday October 31, 2023 @02:32PM (#38089318)
You literally can tell ChatGPT to create a CDK typescript app that deploys a lambda + API Gateway where the lambda works with Get request and a dynamodb table. The lambda should have permission to read and write to the Table and it will get you 95% there.
Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by icedchai on Tuesday October 31, 2023 @03:19PM (#38090031)
I've found that "permissions" are what bites most developers. It's always either IAM or security groups...
Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by scarface_74 on Tuesday October 31, 2023 @03:39PM (#38090328)
Using the ChatGPT prompt I said above, it did the permissions correctly

    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.

Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by icedchai on Tuesday October 31, 2023 @06:59PM (#38092543)
Neat! I personally hate writing Terraform (Does anyone like it?)
Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by withinboredom on Tuesday October 31, 2023 @08:51AM (#38084029)
They probably do make more money… actually. At least in net profit.

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.

Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by theamk on Tuesday October 31, 2023 @09:28AM (#38084487)
We are talking lambdas here, not 1TB ram workers.

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.

Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by diesal11 on Tuesday October 31, 2023 @09:09AM (#38084270)
> They probably do make more money… actually. At least in net profit.

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?

Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by HyprMusic on Tuesday October 31, 2023 @08:11AM (#38083551)
There are plenty of cases where lambda is a better fit than hosting a server. Just like there are plenty of cases where it's not an appropriate fit.

By flat out refusing to consider it, you become as much of a "drone" as the people you call out.

Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by andrewstuart on Tuesday October 31, 2023 @08:13AM (#38083569)
>> There are plenty of cases where lambda is a better fit than hosting a server.

Such as?

If it’s regional latency then run a machine in the region.

Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by diesal11 on Tuesday October 31, 2023 @08:32AM (#38083768)
Out of the box lambda costs $0 when not in use, built in autoscaling, automatic runtime security updates, stdout straight into Cloudwatch, docker support...the list goes on.
Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by jddj on Tuesday October 31, 2023 @08:43AM (#38083906)
Uncomplicated image conversion / thumbnailing / pdf report generation / whatever that you don't want to keep a whole container or separate long running task around for.

That's all. The rest goes in VMs.

Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by theshrike79 on Tuesday October 31, 2023 @09:17AM (#38084377)
You can have a dev team of 20, everyone has their own Lambda function running at all times so they can run their own branch without affecting others.

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.

Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by ezfe on Tuesday October 31, 2023 @02:07PM (#38088938)
Simple endpoints that have extremely low-volume traffic. If I have a project that has low usage and requires basic endpoints to handle server-side logic, lambdas are by far the cheapest way to do it and fully performant.

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.

Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by Cyriou on Tuesday October 31, 2023 @08:16AM (#38083590)
Say I am building a marketplace which I plan: will get many users. Also, we are only 2 building it.

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?

Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by brap on Tuesday October 31, 2023 @08:21AM (#38083653)
It's not all or nothing, there are in-between approaches.

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...

Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by scarface_74 on Tuesday October 31, 2023 @10:18AM (#38085239)
Yes I’m going to tell my CTO to use any of those solutions and immediately be laughed out of the room.
Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by brap on Tuesday October 31, 2023 @10:36AM (#38085514)
You might not have a good CTO then
Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by andrewstuart on Tuesday October 31, 2023 @08:18AM (#38083620)
Why would you run kubernetes?

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.

Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by Cyriou on Tuesday October 31, 2023 @08:34AM (#38083802)
I don't think it is faster, I think it is way more convenient Ok, say I don't need kubernetes.

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.

Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by dpats on Tuesday October 31, 2023 @08:22AM (#38083659)
You can scale without learning kubernetes. Heroku is mature and easy to use.
Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by fuzzy2 on Tuesday October 31, 2023 @08:04AM (#38083476)
And suddenly you have to manage an entire Linux server. (-:
Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by andrewstuart on Tuesday October 31, 2023 @08:04AM (#38083483)
Oh the burden.
Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by kikimora on Wednesday November 01, 2023 @05:58AM (#38096367)
SSH keys, security updates, monitoring, access controls just to name a few. How do you stop a former employee from running a bitcoin miner in your servers? How do you detect that hacker has got access to your server?
Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by gadflyinyoureye on Tuesday October 31, 2023 @08:29AM (#38083736)
Here's my use case for a lambda monolith. We have a distributed process. It's very low activity; probably only a few hundred calls a day. However, it's a few hundred million in value over the year. We have 30 some odd services using NestJS to make Lambdas easier manage and to also run locally along with localstack.

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.

Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by jvanderbot on Tuesday October 31, 2023 @09:07AM (#38084246)
I have done both, for many years.

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.

Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by scarface_74 on Tuesday October 31, 2023 @10:15AM (#38085183)
How does your proposal add business value - ie “how does it make the beer taste better?”
Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by solatic on Tuesday October 31, 2023 @10:33AM (#38085481)
If you want to run node, why a full-blown VM and not a container?

> 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.

Re:Should you use a Lambda Monolith, a.k.a. Lambdalith, for ... by meowtimemania on Tuesday October 31, 2023 @04:44PM (#38091124)
I really like lambda for all my personal projects. Linux virtual machine means paying a monthly fee. For me Lambda is free.

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.