95 comments

[ 0.58 ms ] story [ 11.5 ms ] thread
looks like an answer to Cloudflare Workers
Also vercel, railway, render etc

Cloudflare workers wasn’t always an 1:1 option for simple hosting (iirc) and people used to think it was more complicated than vercel etc but it has changed in recent years and right now they have made things smoother and simpler to compete with vercel and others.

Now that AWS has entered into the field as well, given that vercel and others already build on top of AWS. It will be interesting to see how this all goes.

I wonder if more og hyper scalers like say hetzner/ovh and others will also target this audience

Vercel has a big advantage, they are preferred partners from many SaaS vendors, and have hobby accounts without credit card requirements.

Render also doesn't require pay for play.

This is something that big hyperscallers are yet to understand, free to play and then one is hooked, it is much easier to go to the next step.

One of the first blog posts that I have written is about this topic (pardon my bad writing):

"Hosting a hobby project for free without credit card is tough (rant) & here's how I did it (Hugging face)"[0]

I remember trying to evaluate all the options and trying to find a good enough option and there were very few options aside from Vercel and Render or rewriting your application to fit cloudflare workers.

HF spaces is a good option that I had found back then. Also, I recommend having a separate backend service like supabase with HF as if your server is inactive for 24-48 hours, the storage could get wiped out so backend should be seperated.

One of the biggest things that I am proud of was how I broke the nat of intel tiber jupyter using applying a custom patch of bearssh and before it, using junest and ssh and ppng.io, all because I wanted to play minecraft with my friend without credit card :-D

Nowadays, I have a few cheap vps's which makes things so much simpler but I remember that struggle and vercel/render used to help in most cases thus they are so popular.

So I seriously agree with what you are saying based on my experience as well. Though I have to wonder?: I think that the reason that small companies aren't attempting this is because of reasons of scam/spam, but what reasons are there for AWS and others to not do so.

What are the reasons that you think that they don't already provide such service, or do you feel as if this is the natural continuation of it and soon we are gonna see AWS or large hypercloud provider providing free very small compute similar to vercel/render?

Also thanks for making me remember again the blog that I had written :-D

[0]: https://smileplease.mataroa.blog/blog/hosting-a-hobby-projec...

Isn't this a move in the other direction. Workers and traditional Lambda need to you write short lived event handlers; this is about running a standard server.
Absolutely, and the offer is better in terms of DX (no need for an adapter) and it’s not limited to 128MB of memory.

Exciting times, I can’t wait for Cloudflares response.

Google Cloud Run and Azure Container Apps feels like the closest analogues.

Both allow deployment of web apps without an adapter layer. Both scale to zero (really useful for hobby apps; small internal apps that do not get sustained traffic, but can get bursty). Both allow concurrency control.

Cloud Run "family" is quite a nice way of managing serverless ("orchestrationless"?) containers. Cloud Run worker pools for background workers that connect to Pub/Sub. Cloud Run jobs for long running tasks like extracts, ETL. Cloud Run instances (newer offering) for always on agents.

The real advantage of cloudflare workers is you don’t pay for the processing time while you’re waiting for upstream network responses.

I believe Cloudflare is the only FaaS that offers that. It makes it fantastic for putting a light weight layer in front of a few upstream API, like say inference providers.

> I believe Cloudflare is the only FaaS that offers that

Wasmer also offers the same (charging only for active CPU usage), with the advantage that you can run full Node.js and Python workloads :)

And there are even hibernateable websockets too - only paying for when data is actually transferring.

And the maximum worker time is based on processing time, not wall time.

but this is built on firecracker vm. while Cloudflare workers are built on v8 isolates. at the moment Cloudflare workers have no equivalent. Deno was the only one trying to do the same.

what will be interesting to see is startup times.

How is this different from a container?
Skip the docker part I guess? More approachable for new vibe-orientated developers
[flagged]
The scaling part. You don't need to do anything. It just runs as many instances of the Lambda as needed for you.
It’s one isolated process per request.

In a container the memory/cpu is shared for all incoming requests.

Being able to handle concurrent requests with one worker is nice. I hope this becomes available for Python too.
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.

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.

If you haven't tried Azure Container Apps or GCP Cloud Run, I would strongly recommend trying them at least once deploying any standard web API app in your language of choice, just for your edification.

No adapters needed; just write a web API and ship it. Public URL gets assigned and its ready for use. Code works locally with no special adapters, emulators, or tooling needed. Need to support another cloud plat tomorrow? Ship the same container. Moving it to self-managed K8s? Same container.

I find GCP Cloud Run soooo much more pleasant to work with than either AWS Lambda or ECS. Unfortunately most companies don't use GCP.
Agree; Cloud Run has the best ergonomics/economics of all of the serverless container runtimes at the moment. Use it for all of my personal workload when possible.
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.
They're also good for extremely bursty loads. I use Lambdas extensively for a radar imagery API that delivers the images for an Android live wallpaper that shows weather radar.

That particular use case can go from hardly any traffic at all to a hurricane of traffic during something like, well, a hurricane.

For consistent processing loads, I think I could save money by just running on dedicated EC2 instances, but you cannot beat the instant scale of Lambdas.

Shameless plug: https://play.google.com/store/apps/details?id=app.radarlove....

I often hear this argument that it is good for bursty load, but for real, there are a lot of inconvenient limitations. For exemple, you don't really control the number of concurrent instances or the scaling except if you pay for very expensive provisioning.

So you might have to wait for 10s or more to have a new lambda instance spawning up and replying to your requests. And you might have to have your function finish in 15 minutes, deals with the strange concurrency and scaling rules lambda is based on.

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

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

I would agree with OP with "stay away".

The Google paper Towards Modern Development of Cloud Applications[0] does a great job explaining why.

TL;DR the case they make against micro-services architectures (which Lambda encourages):

    1. It hurts performance
    2. It hurts correctness
    3. It is hard to manage
    4. It freezes APIs
    5. It slows down application development
For even a moderately complex system, spreading logic out over multiple discrete runtimes doesn't make sense; instantly run into each of the 5 points. The only times I've found functions useful is truly single-point behavior where we were running some logic connected to CloudFront on each request for some header parsing.

It is certainly possible to write a monolith in Lambda as well, but then that would be bad architecture and a bad fit and I suppose why they are now introducing this new model that is more like GCP Cloud Run or Azure Container Apps.

[0] https://sigops.org/s/conferences/hotos/2023/papers/ghemawat....

They said what they wanted to say, and it was quite clear. The person who commented suggests we don't use client-edge compute unless we have a specific need for it, i.e., don't treat it as a default due to its apparent simplicity up front.

You've taken it in a rather odd direction with the request for a framing more palatable to you.

We don't have to agree, and I guess me understanding it differently could also be like how you understood me in a way I didn't intend to
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.

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

Strong disagree, we use lambda/sfn/other services to process hundreds of millions of pages of data annually and it scales beautifully while being mostly hands-free and easy to maintain with a small team.
I take it as you rarely ever consider tradeoffs when you build your stuff. No good. You are the kinda person who builds, and waste my or companies money and time.
Sometimes things are easily and objectively worse than the alternatives.
that "objectively" portion stems from trade-off discussion.

> Sometimes things are easily and objectively worse than the alternatives.

That's the most subjective thing one can say.

Am I in a postmodernism 101 class or something? No, reality begs to differ.
This sort of just feels like those “free PHP hosting” sites you would see in ~2004 now.

Not to say it’s “bad”, just interesting how things loop around.

Feels like they’re placating to those that keep bundling their entire application, php or node, into a single lambda.
I guess the event translation step is not needed but I don't see what this gives you over what many of us do today: shove Hono/Express/Fastify into a lambda with some shim/adapter.

It annoys me that when I started with Lambda (2019-ish?) it (at least seemed to) advised against this. I went down the "one function per route/method" path but always disliked it and it added a decent amount of complexity for packaging/deploying. A year or so ago I abandoned that and switched to Fastify (one function instead of 100+) and never looked back. It also makes it easier to test in dev/local and gives me more flexibility to move to a different host in the future.

Weird to see them come around on this but again, what does this give me over what I currently do? It looks like they are just making migrating an existing stack easier (it wasn't that difficult before IMHO).

I feel like we're in an age where a very small team of devs armed with enterprise LLM subscriptions could absolutely build and maintain an open source, reverse engineered, self-hosted implementation of all of Amazon's most high profile AWS offerings (S3, SQS, Lambdas, IAM, EC2, DynamoDB, etc.). All as a single, cohesive open source project.

Just feed it the API docs and loop.

Sure... but the point with using AWS is that I don't have to self-host these services lol

Like, most of these services already have proper open-source alternatives you're free to use on your own hardware or even on AWS.

You’re pretty much describing LocalStack [1].

IMO much of the product’s success was derived from the extensive snapshot + behavioural tests they created to validate parity with AWS.

The basic engineering loop was: 1. Write tests against AWS 2. Record all results 3. Run tests from (1) against emulator and diff with results from (2)

Like, theoretically, you could use their preexisting suite of tests to construct a pretty decent emulator, since the engineering + cloud costs of recording behavior has already been frontloaded, and resides within their snapshot files [2].

[1] https://github.com/localstack/localstack

[2] https://github.com/localstack/localstack/tree/main/tests/aws...

Yay ! Active CPU billing mean the same thing as Cloudflare ! But you still pay memory for as long as the function is up. Data transfer is not included, you have to take that into account. There is also the number of requests...

AWS should have understood by now that Cloudflare workers pricng is so much more legible, it's one of the reason of their success.

Jeeze, there's a lot of comments in this thread written by people who have no clue how any of this works lol
why not reply and engage with them then rather than posting a vague dismissal?
I don't mean to pile on (given the reply by awithrow) but maybe it's worth repeating the principle: if you know more than others do, that's great, but in that case please share some of what you know, so the rest of us can learn!

https://hn.algolia.com/?dateRange=all&page=0&prefix=true&sor...

I have replied to multiple comments. This comment comes from a general response to this thread as a whole lol.

There's not much to say otherwise. It's a pretty standard release from AWS, so other than just explaining AWS as a whole, I don't have anything to offer in general.

(comment deleted)
Lambda can have its place in some architectures. I am not a fan of them in general, I've seen enough giant webs of lambdas that become impossible to truly understand the full architecture as they are split across 100 repos, just a web of slop lambdas. This feels like a canary in a coal mine, if you need this, you really need to start migrating to a standalone service on a machine instead of a lambda, where you are using it wrong.
I agree they can get bad but it's so nice to be able to take event driven workflows, like "pick up this file just written to S3, do some stuff to it, and write results out somewhere", and just have it work with basic features like autoretry, DLQs, built-in logging, etc.

Stringing together a bunch is an anti-pattern IMO but when it's not being abused, it's wonderful tech.

I've built 2 applications using Lambdas as a backend and I love how simple and it is. It cost literally 0$ (the lambda part).

The frontend is hosted on cloudfront, the backend is a lambda and you basically just pay for the database and certificate.

I don't want to manage a server or even a docker image. I just want my code to exist there so I like the idea

> I don't want to manage a server or even a docker image. I just want my code to exist there so I like the idea

agree, unfortunately in practice it's more common to throw the api behind k8s with containers

And then stick your code in an OpenFAAS container.
What certificate cost? Acm is free if you don’t export
lambda + DB is an antipattern.
direct connection can be problematic if you dont limit the scaling or don't use rds proxy yes.

The 3 lambda instances aren't going to break your db

Are we pretending now it's less complicated to distribute an app a cross a variety of lambda functions? So how are you deploying it? Serverless Framework? SST? Mounting complexity compared to a container... There are also a bunch of services that let you simply host a container, no server to manage. Distributing apps on lambda is a classic trap, and also just because you can, doesn't mean you should. You will quickly find out local development, deployment, debugging, monitoring is all more complex and you will wonder how you got there.
Yeah I've worked on a website built on a bunch of Lambdas - something like 150 Lambdas that tied themselves in knots with both HTTP requests and message queues.

I ended up moving a bunch of the logic into an ECS-hosted monolith. Probably cost a bit more (warm-up plugins meant that no customers still cost us money) but it vastly simplified things and made scaling up easier (can't set scaling thresholds with Lambda).

> Are we pretending now it's less complicated to distribute an app a cross a variety of lambda functions?

I treat Lambda purely as compute and ignore everything else related to "serverless". My Lambda's are monolith webapps using Axum Rust framework. Using cargo lambda I generate a static binary, upload to s3 and point the lambda at it. Sometimes I'll package as a docker image so can run in Lambda or locally by passing a `--aws-lambda` flag.

If serving HTML i'll use Function URLS with IAM auth and put a Cloudflare worker in front acting as the gateway. I also serve the static assets from cloudfront bucket i.e. static.example.com. Advantage is I use Cloudflare free tier so get denial-of-wallet prevention when my free credits run out. Using IAM auth also means the lambda doesn't execute if for what ever reason someone discovers the url and tries to DoS it so only get charged for the requests not run time.

Yes. I found it was simpler to have a "fat" monolithic lambda than split up your logic across multiple lambdas. Easier to deploy, too.
It's just more effort then I want to or need to.

Just a lambda, a switch in the handler that calls my routes and that's it. I could make it smarter but I don't really need to

Disappointed by the NodeJS-only requirement and the 128 req/env/sec ceiling.

NodeJS-only feels very pre-AI. Let me tell my agent to write my web service in Rust/C++/C/Go/Zig, and ship a statically-linked single binary that fits within a maximum binary size ceiling. I'd get much better performance, and make much more of the premium CPU/RAM pricing that I'm being asked to pay in exchange for scale-to-zero and fast autoscaling.

The rest is amazing. First-class support as a CloudFront origin. Easy multi-region and gradual deployment. Clearly, finally, a great response to Cloudflare. Just.... so close, and yet, so far. No way am I going back to Node as a web backend for greenfield projects in 2026.

It should just accept a docker container (which normal lambdas can) or a WASM blob that exposes HTTP over a standard port.

Could use optional headers for extra integration points (eg. better per-request resource usage tracking for scaling).

Rust + Axum has sort of supported this with a middleware (https://github.com/lazear/axum-aws-lambda). Essentially you write your API as normal, and then when you build for lambda you enable a feature that does the special handler for you.

This + Function URL + Cloudfront, and you end up with an API entirely hosted in lambda. I have a backend that does is hosted like this that does pretty complex work (image/video uploads, image conversions, on top of the standard auth, database connections, etc). It even renders a frontend with HTMX/Alpine.

Even with all the bot traffic I receive, at almost 15 million requests per month the cost is under $10/mo (median latency is roughly 90ms). Cold starts are a non-issue with the Rust runtime.

Something very similar to this was already possible via serverless-express for node:

https://github.com/CodeGenieApp/serverless-express

This wraps Lambda's 'handler' function and allows express to run on top of it, essentially you get a node web server with no persistence between requests which usually isn't a good thing to rely on, but you can also kinda have that with persistent tcp connections.

Of course since this is not real HTTP, things like WebSocket aren't available, but it's good enough to build a CRUD backend or two.

Similar libs exist for other runtimes as well.

That's just an adapter. This new AWS offering allows concurrent connections, and CPU billing vs wall clock time. It's not the same.
I know, but as far as the programming experience is concerned, it feels quite similar.

But expensive. Stuff like Api Gateway is just absurd (but necessary since you don't want that stuff to reach your lambdas, which are dog slow to handle). Paying per request is like charging for every breath.

Another big advantage (and I guess the reason this exists), is for some reason, AWS lambda is a hostile environment for node, with its ephemeral VMs, performance is quite bad (much worse than expected)

This looks suspiciously like Vercel's fluid compute..
In this thread: "If my grandma had wheels, she'd be a bike."
Interestingly, Google Cloud recommends using Cloud Run (any container) instead of Cloud Functions (upload code). AWS can do that with Lambda too, I wonder why AWS decided to "move backwards" here, as I always found containers are easier and faster to work with?

Both container-way and code-way have the same scalability (code-way is built into a container anyway, just on the cloud). Maybe AWS re-builds the container for security every day?

The page has only a description, no comparisons. The best way to explain a technology is to compare it with something.

Presumably something like cloudworkers has caused customers to ask for it?

I agree, lambdas can currently run code, run containers, or fargate for containers.

I guess someone managed to find a usecase that wasn't quite covered.

Finally. The need of API gateway + lambda combo even for POCs was almost cliche.