5 points · by thenorthbay · 2y ago · 20 comments
In recent years, many new serverless service providers have been released for everything (Neon – Postgres, Cloudflare D1 – SQLite-like DB, GCP Functions, Vercel edge functions, etc.). However, people have been complaining about their complexity and overkill in the beginning.
More recently, I've witnessed friends prefer serverful providers for their apps because they offer more control, and are cheaper and simpler to get started with (their words). Serverful platforms like Render, Railway, or Fly.io have also become a bit more popular.
Both approaches come with their trade offs and limitations, especially at different scale and costs.
So, which way, western man: is Serverful the Future? Quo vadis, web development?
As tech progresses, it makes the abstraction levels better for those who need less power.
Nothing has shifted. It might have gained some market share but that's about it.
There are times though when serverless may not be a good idea:
- Atypical technology stack. If the stack you need, and actually need, isn't accounted for then you're on your own.
- Continuous, 24x7 application load. You'll have to do the cost analysis, but you may find you're better off provisioning a server.
- You want to "lift and shift" existing assets into the cloud.
Brand-new, greenfield project? Consider serverless first.
I'd argue it's the opposite. Since everything gets "thrown away" per request you neglect on caching, memory leaks, subtle bugs etc.
You also need to make trade offs like focusing on cold start as opposed to peak performance etc.
Memory leaks are an interesting matter because, you're right: you really don't care. All the pieces parts comprising your system are continually restarting without impacting the overall resiliency of the system. In fact, quite the opposite is happening - the system is more resilient due to all the mini restarts.
You will have to learn techniques for handling cold starts, there's a few different ways to go about it and which one is appropriate, including not worrying about it at all, is dependent on your application and the cold load ramp-up experienced.
You lose a lot of layers of caching since there's no point in it. You focus on rather poor caching, i.e. you have to use an external cache. You can't store this as part of the current session and access it for the next request, e.g. by the same user.
> you really don't care
That's on the surface. It's like having a hidden illness that only gets you when something else breaks and suddenly 100s of errors pile up.
> the system is more resilient
It pretends to be. You often get bugs that aren't so obvious and never get fixed because it's now hidden so deep.
> You will have to learn techniques for handling cold starts
The nuance here is you're learning to prefer faster cold starts at all costs including trading for warm start performance. It's making the world worse.
I'd also say things like Neon "serverless postgres" is not really serverless. It is using serverless as the de jour marketing term for managed postgres SaaS. I can get the same thing from GCP (Cloud SQL) for much less
What makes it not serverless in your opinion? This is our architecuture: https://neon.tech/docs/introduction/architecture-overview and no, you can not get the same from CloudSQL.
> ... and no...
not a great way to elicit feedback
New stuff I’m building is putting StepFunctions in rather than Lambda if at all possible, and DDB alongside S3 for indexing. I expect these to be nearly maintenance free (no runtime updates, no package updates, TTLs to expire data).
Serverless or serverful any will get the job done.
But for personal projects, I like its charge-by-usage model. I want my projects be cashflow positive.