Live data from Hacker News

Should you use a Lambda Monolith, a.k.a. Lambdalith, for your API?

rehanvdm.com

121–130 of 131 posts

Re: Should you use a Lambda Monolith, a.k.a. Lambdalith, for your API?

#121

Earlier quoted context omitted.

Scales to zero means you can span as many environments as you want and don’t bother. Every dev can have multiple environments to demo features and do experiments.

Isn’t that what local machines are for? If you’re in territory where running locally isn’t feasible you’ve either done something horribly wrong or have scaled way past the point where either a single lambda or single ec2 instance is sufficient.

I don't see how I can use a local machine to demo a feature to my PM.

Re: Should you use a Lambda Monolith, a.k.a. Lambdalith, for your API?

#122

Earlier quoted context omitted.

> Honestly, this just means you don't have any users Which is where many small ideas start. My buddy had an idea for a few SaaS products and I've helped him develop them. The initial costs were small, but give it was an expense with no income in the near future, finding a way to scale to zero was the only way this became something he'd consider. It's got _very_ sporadic use currently and his bill for each service is…

And that’s totally fine. I have similar stuff setup for hobby projects. But my impression is that this thread is mainly about “real” architecture (for lack of a better word”

I think I might disagree that this isn't "real" architecture.

All system architecture is about designing a system to meet the defined needs. This system is designed to hit the starting needs and has an already designed migration to the medium-term needs. That idea of "YMMV" is very much relevant here as every system has different needs. Some of those needs are minorly different, others are wildly different.

Anyone on this thread that's discounting FaaS usage out of hand with statements like "just run a $20/month server" are demonstrating a lack of imagination. Would I use it as the primary server for a medium+ traffic site, almost certainly not. But there is a whole world of low-traffic services that are well suited to using a FaaS platform over a dedicated server.

Re: Should you use a Lambda Monolith, a.k.a. Lambdalith, for your API?

#123
post #118

Earlier quoted context omitted.

> It's basically impossible to make managed hosting more expensive than cloud. So, I've got 6 different backend services running as monolithic Lambda functions. They all must be up for a number of nines per year, each going down will cost our company actual money for every second of downtime. They've never been down except when AWS broke something - and then the customers couldn't have accessed them anyway. Can you t…

Without more details I can't give you numbers, but I've gone through this with countless customers. Every time I offered to do the work for a percentage of savings. Unfortunately most of them did the maths and had me bill by the hour instead. I've yet to come across a setup where we couldn't trivially halve costs. Often you can halve costs over a well optimized AWS setup (most AWS setups are nowhere near well optimiz…

For us, our partners and mutual clients, minimizing the cost of provisioning IT services is something like priority # 4 or 5.

Security, correctness, compliance, performance and availability are gonna be far more important to the business. As long as the cost isn't absolutely insane no one is going to blink. Zero stakeholders care that we can do it marginally cheaper with a nerd sniper rifle.

Re: Should you use a Lambda Monolith, a.k.a. Lambdalith, for your API?

#124
post #119

Earlier quoted context omitted.

Basecamp is an anomaly on pretty much every vector imaginable. They have been remote-first (remote-only?) since forever, they still use Ruby in production, have never taken VC money and they've never even tried to do a hockey stick growth unicorn hack. They're still under 40 people.

None of which provide any legitimate reason for dismissing their savings.

The point is that Basecamp is an unicorn, they've been special since their inception and can do stuff that a regular 40 person company could never even dare to try.

Re: Should you use a Lambda Monolith, a.k.a. Lambdalith, for your API?

#126
post #119

Earlier quoted context omitted.

None of which provide any legitimate reason for dismissing their savings.

The point is that Basecamp is an unicorn, they've been special since their inception and can do stuff that a regular 40 person company could never even dare to try.

There's nothing daring or special about picking a cheaper alternative and/or looking at how they're achieving what they're doing. There are huge numbers of people who will run the devops side for you on retainer - this is not a special setup nor a rare skillset.

Re: Should you use a Lambda Monolith, a.k.a. Lambdalith, for your API?

#127
post #118

Earlier quoted context omitted.

Without more details I can't give you numbers, but I've gone through this with countless customers. Every time I offered to do the work for a percentage of savings. Unfortunately most of them did the maths and had me bill by the hour instead. I've yet to come across a setup where we couldn't trivially halve costs. Often you can halve costs over a well optimized AWS setup (most AWS setups are nowhere near well optimiz…

For us, our partners and mutual clients, minimizing the cost of provisioning IT services is something like priority # 4 or 5. Security, correctness, compliance, performance and availability are gonna be far more important to the business. As long as the cost isn't absolutely insane no one is going to blink. Zero stakeholders care that we can do it marginally cheaper with a nerd sniper rifle.

And that's a valid choice to make when your margins are significant enough to let you afford not to spend effort cutting hosting costs. I've opted for cloud hosting many places for that reason myself as well. In fact, my current job involves a 100% cloud based setup, and it's a fine choice in this instance because we do have the margins for it.

At the same time, many other places I've worked or done consulting that is not a choice their businesses can survive. One place the cost difference between cloud and managed servers was large enough it'd have been several times their profit.

We're not talking "marginally cheaper". It's rare to be talking about cost savings lover than 50%. That still doesn't mean it's always worth switching away from cloud environments - if that 50% saving is small enough to you to not matter, that's totally valid.

But you ought to understand that you're making that choice because the costs are currently too insignificant to be worth it, not because it's the cheapest option.

The argument is not that you should never pick cloud, but that claiming to choose cloud because the alternatives are "untenable from a financial point of view" to quote part of the comment that I first replied to is totally backwards and suggests to me nobody has actually done a cost analysis.

Re: Should you use a Lambda Monolith, a.k.a. Lambdalith, for your API?

#128
Yes, that's what I do with Graal Native Image and multi-entrypoint applications ( https://izumi.7mind.io/distage/distage-framework.html#roles ). Not only for APIs, but for everything.

Microservices in various forms are unnecessarily distributed and that's a fundamental problem with many implications. When you pack your components into a monolith which can be easily reconfigured into microservices by replacing transport implementations, you would gain a lot.

Re: Should you use a Lambda Monolith, a.k.a. Lambdalith, for your API?

#129
post #91

Earlier quoted context omitted.

with lambdalith you miss out on some things like granular IAM roles and granular Memory/Cores config. Also with lambdalith you probably end up needing an application framework as opposed to just using mostly vanilla features of your language of choice. Of course I agree that lambdalith has advantages as well.

I don’t buy this. From the top of my head I can think of many things not handled by the Lambda runtime: session cookies, routes with ids in them like /author/15/posts, having to specify Content-Type for responses, generating error responses properly, etc. Good server framework does this for you transparently.

mmm sure but I never said that the Lambda runtime handles those things...

By the way, routes with ids are handled no problem by API Gateway, you can even set more complex ones like {proxy+} etc.

Re: Should you use a Lambda Monolith, a.k.a. Lambdalith, for your API?

#130

Earlier quoted context omitted.

Sounds like a cool hack, but why not just self-host with on-premises hardware, or rent a cloud server from a hosting provider like e.g. Digitalocean? Then you wouldn't have to worry so much about what Microsoft wants, no?

Good old HN, "just self-host with onprem". Who monitors it 24/7 and checks the alerts? Who drives to the data center to fix broken hardware on Christmas Day? It has to be multiple "whos" or one sick leave will leave you completely vulnerable. For small-medium companies whose main business isn't hosting software this makes it untenable from a financial point of view. For the monthly salary of a single SRE/devops/admin…

[deleted]
Post reply on HN