Live data from Hacker News

Why aren't we all serverless yet?

varoa.net

21–30 of 137 posts

Re: Why aren't we all serverless yet?

#22

I still find the DevEx of serverless terrible compared to the well-established monolith frameworks available to us. The YAML config, IAM permissions, generating requests and responses, it's all so painful to get anything done. Admittedly I speak as a software engineer primarily building CRUD apps, where frameworks have had decades of development. I can see use cases for event-driven applications where serverless may…

> Admittedly I speak as a software engineer primarily building CRUD apps

Ya, this is the majority of us.

Re: Why aren't we all serverless yet?

#23
post #10

This misses the main factor, I think: Vendor lock-in. There is no unification of APIs - every provider has their own bespoke abstractions typically requiring heavy integration into further vendor-specific services - moreso if you are to leverage USPs. Testing and reproducing locally is usually a pipe-dream (or take significantly more effort than the production deploy). Migrating to a different cloud usually requires…

This the reason I tend to not use a serverless solution in most cases.

I want my code to be written and executed on my machine in a way that can at least kind of resemble the production execution environment. I want a binary that gets run and some IO access, most of the time.

If I have a VM or a "serverless"-style compute like Fargate on ECS, I can define an entry point, some environment variables, and we're off to the races in a very similar environment to my local (thank god for containers and VMs).

The _idea_ of lambda and the similar services is awesome to me, but it's just such a PITA to deal with as a developer, at least in my experience.

Re: Why aren't we all serverless yet?

#24
Because we use Nix recipes to deploy our Datalog-ish backend connectors that talk to Amazon Elastic Beanstalk via a bespoke database we wrote in Julia that's deployed on Snowflake Container Cloud. But there's a missing backslash somewhere and nobody can find it because even ChatGPT cannot decipher the error messages.

Maybe it's an expired certificate but the guy who knew how that stuff works built a 12,000 line shell script that uses awk, perl, and a cert library that for some reason requires both CMake and Autotools. It also requires GCC 4.6.4 because nobody can figure out how to turn off warnings are errors.

Re: Why aren't we all serverless yet?

#25
We've looked at these tradeoffs over and over at places I work.

There's always part of the stack (at least on the kinds of problems I work on) that is CPU intense. That part makes sense to have elastic scaling.

But there's also a ton of the stack that is stateful and / or requires long buildup to start from scratch. That part will always be a server. It's just much easier.

For my own projects, I prefer lambda. It comes with zero sysadmin, costs zero to start and maintain, and can more easily scale to infinity than a backend server. It's not without costs, but most the backend services I use can easily work in lambda or a traditional server (fastapi, axum), so it is a two-way door.

Re: Why aren't we all serverless yet?

#26
post #6
post #4

How about cost at scale? Amazon itself shifted Prime Video from serverless to mostly containers and it resulted in huge savings.

Without a link and a breakdown that makes no sense. We switched from blue to square and saw a honey suckle savings. Amazon runs both and serverless is a billing model. Many serverless runtimes consume containers. Serverless, like microservices are a design philosophy.

Serverless is more of a billing philosophy than a design philosophy in my opinion.

Serverless is all about outsourcing the infrastructure for scaling a micro service. How you design the service itself, or the system its a part of, can vary widely.

There are definitely dedign constraints of going serverless, but I'd argue those are largely just the constraints of going with microservices rather than a monolith.

Re: Why aren't we all serverless yet?

#27
> The median product engineer should reason about applications as composites of high-level, functional Lego blocks where technical low-level details are invisible

This is a good way to get nonfunctioning product. Or at least a lot of frustrating meetings.

The thing is, "serverless" still has a server in it, it's just one that you don't own or control and instead lease by short timeslices. Mostly that doesn't matter, but the costs are really there.

Re: Why aren't we all serverless yet?

#28
post #9

Because serverless doesn't exist. Serverless just means it runs on someone else's servers, just like the cloud. And 10 years down the road people have forgotten how to run basic things, but Bezos buys Panama.

In software, a server refers to an application that listens for requests from a client.

If you remember the olden days of web development, when CGI was king, the web applications didn't listen. Instead, a separate web server (e.g. Apache) called upon the application as a subprocess and communicated with it using system primitives like environment variables, stdin, and stdout.

Over time, we started moving away from the CGI model, moving the server process into the application itself. While often a fronting web server (e.g. nginx) would proxy the requests to the application, technically the application was able to stand on its own.

Serverless returns to the old CGI model, although not necessarily using the CGI protocol anymore, removing the server from the application. The application is less a server, hence the name.

Re: Why aren't we all serverless yet?

#29
>Something I’m still having trouble believing is that complex workflows are going to move to e.g. AWS Lambda rather than stateless containers orchestrated by e.g. Amazon EKS. I think 0-1 it makes sense, but operating/scaling efficiently seems hard. […]

This isn't really saying anything about serverless though. The issue here is not with serverless but that Lambda wants you to break up your server into multiple smaller functions. Google cloud run[0] let's you simply upload a Dockerfile and it will run it for you and deal with scalling (including scaling to zero).

[0] https://cloud.google.com/run

Re: Why aren't we all serverless yet?

#30
post #4

How about cost at scale? Amazon itself shifted Prime Video from serverless to mostly containers and it resulted in huge savings.

From what I recall about that situation, they had a really stupid architecture that was using S3 as intermediate storage and processing video multiple times on multiple stages.

In fact, the solution still used serverless afaik: https://www.youtube.com/watch?v=BcMm0aaqnnI

(take that u/UltraSane! https://news.ycombinator.com/item?id=42506205)

It likely could have been solved by serverless too, by using local storage and having the pipeline condensed into a single action...

FD: I'm not a fan of serverless for production anything.

Post reply on HN