logoalt Hacker News

bob1029 • today at 11:39 AM • 6 replies • view on HN

I strongly recommend never using functions as a service unless you genuinely have some client edge compute requirement that absolutely cannot be solved via some other means.

Everything about running software is made more difficult this way. You might think it would make certain infrastructure aspects easier, but it just changes the semantics of the same problem. It's the same quantity of mess to clean up, but now it's in these really weird piles that are often much harder to access.

> up to 128 concurrent requests per environment

I am fairly confident I could support more capacity with a single t3a.nano instance.


Replies

joshstrange • today at 1:13 PM

I agree and disagree with this. I run multiple software platforms that are incredibly bursty, to the level of "no traffic for 10 months out of the year, small traffic of 1-1.5 months, medium for <1 week, and high for 1-2 days" (event-based, like a physical in-person event, not events in the software sense). While I agree lambdas are fiddly and I have some reasons to move off them, they also are kind of perfect for my use case from a billing perspective. Even a t3a.nano would have cost more and not scaled quite as easily as I needed.

All that said, there are times I regret my lambda decision and would prefer just a EC2 host even if it cost more. Deployment would be easier/simpler. I've spent considerable time to improve my deploy process and lower the deploy times but it's still ~2-3min from tag -> deployed which I know I could do faster on just a VM. Also everything gets harder in a lambda, packages/binaries, logging, monitoring, etc.

badatnames • today at 12:02 PM

These one-sided arguments come up every time there's a Lambda thread. They're useful and easily cheaper almost anywhere you have sparse compute or RAM requirements, even for heavyweight tasks like transcoding. A t3.nano meanwhile can simultaneously be overpriced ($3.50 for an idle task) and a bottleneck (30Mbit/s sustained network) in just as many places as a Lambda could be applied incorrectly.

➕ show 1 reply
vermilingua • today at 11:59 AM

I seem to have had the opposite experience. Using Lambda (I can't speak for many of the other FaaS platforms) is so straightforward to me that there need to be some strong arguments for hosting code/containers in my projects.

My guess is that the IaC is the special sauce that's missing; you do need to go all in with some IaC solution to make using Lambda easy, but it doesn't take a lot of it to make it slick.

Cost/compute is obviously strictly worse for FaaS, but most web workloads don't _really_ need to be optimal.

➕ show 1 reply
nater5000 • today at 1:44 PM

This is like the Normal Distribution meme: naively, using Lambdas for these services seems like an obvious choice. Once you start getting into the weeds of it, though, you start to realize that there are real trade-offs which make Lambda not as obvious a choice as they appear at first glance. But once you've worked through those pains and complexity, you end up realizing that there's no free lunch and Lambda is actually a great service for these tasks, all things considered.

>> up to 128 concurrent requests per environment > I am fairly confident I could support more capacity with a single t3a.nano instance.

Don't forget that this is referring to 128 concurrent requests per environment. By default, an AWS account can run up to 1,000 concurrent Lambdas, and that number can be increased with support requests.

Of course, the REAL win is that you only pay for what you use. Your t3a.nano is costing you 24/7, and if you want it to scale on demand, your stack will get very complicated very quickly. Lambdas just scale "for free".

otterley • today at 12:20 PM

> I strongly recommend never using functions as a service unless you genuinely have some client edge compute requirement that absolutely cannot be solved via some other means.

Why? What’s the downside? Are you taking the benefits into account in your calculus? This sort of general, input-free recommendation is junior level thinking at best.

> I am fairly confident I could support more capacity with a single t3a.nano instance.

It depends on what resources those connections are using (memory, CPU, I/O, network). What actual work is being done?

hmokiguess • today at 12:57 PM

> unless you genuinely have some client edge compute requirement that absolutely cannot be solved via some other means

You make it sound like these cases are rare, not sure what kind of work you do but there are markets of all sizes in many different use cases out there.

I feel like what you wanted to say was "I haven't found a need for them" as opposed to "Stay away from it"

Maybe you're trying to say something else we don't know because we don't have your backstory either, did folks at your work tried pushing it for scenarios in which they became a problem? Share that instead as it brings a lot more value to the readers, otherwise it sounds like you are trying to go for a weird flex.

➕ show 2 replies