Serverless Horrors
serverlesshorrors.com
serverlesshorrors.com
This is extremely sad. It's like we are taking steps backward. A 3.44MB should not be an issue and if it is, the answer should not be to host it elsewhere. If there is no other lesson learned here, it's that there is no such thing as 'free'. As others have said, there should be more done to prevent such large losses without some kind of limit.
I would also like to point out that VPS's are extremely cheap [1] and extremely easy to manage. They have automatic limits.
IMO vps was easy before and even easier now to manage.
(Aside: you shouldn't really be using SSH keys to begin with at anything but a small scale. SSH certificates are much more flexible)
2. Often there would be a cPanel plugin/extension/app/config value (if the hoster enabled it for you) that would just do for you what you needed.
The content & config are pushed by rsync/ssh from a git repo, so there's no need for backups. I can recreate a server in half an hour. I guess I lose the webserver logs, but I rarely look at them so I don't care.
A single server has plenty of bandwidth for a personal site, so there's only one EC2 instance and no secure network is needed. If I need more bandwidth, I'll use a load balancer but there's no need for secure connections between the load balancer & web servers because what's the eavesdropping threat model for a public content site?
Let's Encrypt seems to deal with https key rotation without manual intervention.
The cloud servers just have the usual ~cloud/.ssh/authorized_keys login setup, and I guess I rotate them every time a stronger crypto is recommended, which is 4ish times in 30 years.
Still I can think of a corporate blog, and you have employees come and go then it became a problem even for a small website. Otherwise an angry admin can deface your website and damage your reputation.
All other things like secure net won’t apply for a small website, of course.
- you add your ssh public key to the hosting provider, so any new VM will have it automatically
- you use the snapshot service of your hosting provider for backups. If you have a database, run a cronjob that dumps it so it's in the snapshots as well. Alternatively use any backup tool to backup files to somewhere else
- you do not need a separate network for simple use cases. Just encrypt traffic if you have multiple servers, odds are you only have one here anyway.
* You don't have to rotate what doesn't get out. Limit ingress to relevant IPs reduces this surface area a lot.
* SCP to a system built for storage. Not really essential for many systems - system logs are fine.
* Every VPS provider comes with a backup check box.
* Tailscale is really simple.There are definitely many footguns with managing a VPS but I think the threshold to get vaguely competent with a VPS is not really that far off with getting familiar with the average cloud platform - which comes with its own dangers, like the near-total inability to put an upward cap on fees that that person found out with Netlify recently.
Having a $5 VPS and knowing it's never going to cost your more than $5 might balance out a lot of things on the other side for a lot of people.
(And, as a bonus, it comes with the benefit of having a better idea of what is going on on the actual computer which is running your code.)
Platforms like https://coolify.io/ (which I have not tried, but looks interesting) seem to give you some of the abstractions that you get in cloud platforms to save you having to mess with too much low level stuff and become an expert in a billion separate systems.
If you have Debian with automatic updates that does most of the heavy lifting for you. The hardest problem I have is resisting the temptation to just install everything, because the cost to do it is capped at my VPS monthly fee.
So yep, it comes with a lot of assumptions. But so does everything!
is this harder than dealing with cloud 'platforms' and their ever-changing UIs, APIs, SDKs?
It's probably one less click to get a droplet turned up on Digital Ocean, and then you have to configure nginx or caddy (which is like five minutes if you've done it before, 30 if you haven't). Probably worth doing if it's your livelihood and you're afraid of Cloudflare disappearing, but if it's just a mess around... eh.
add your config, use chatgpt if you want, save `nginx -s reload` and bam! you're good to go, practically forever.
Badly.
I'm a mediocre Linux admin, at best. The current environment is so dangerous, these days, that it's worth your life, to have your essential services run by a mediocre admin; even if I can convince myself that I'm the best (spoiler: I'm not).
I'll generally run shared hosting, or managed servers.
I need the whole enchilada: DB, Web Server, Dynamic Languages, etc. Also, for a shipping, production application, with hundreds of users; where privacy and security are of paramount importance.
It's easy, sure. It's easy to create an insecure server, that can be pwned. I know of which I speak. I have done just that.
"A man who holds a cat by the tail, learns a lesson he can learn in no other way."
- Mark Twain
Use private keys. Use a firewall (ufw is really simple) and only expose your reverse proxy (e.g nginx or haproxy). Use docker to run your crap.
Any software engineer should be well capable of setting up a secure server. It really is simple.
The whole process takes maybe 30-60 minutes to setup for someone completely new and following guides.
Render's is simple, true, you just pay $300 for 1TB of bandwidth.
It's crazy how much Merchants of Complexity fooled devs into thinking that running your own server is complicated and you need to pay 1000x to save few minutes of your time.
I get that, a lot. It's the "No True Scotsman" of tech. This is also used as a way of validating college-style leetcode.
Let me introduce you to my GH Activity Graph[0]. See all that green? That's pretty much all coding in Swift; mostly in shipping apps and whatnot. There's a bit of PHP, for server-side stuff, but I like to spend a lot of time, coding frontend app stuff.
Every minute I spend, being a Linux admin, is a minute that I don't spend on executable code. I know that there's a number of folks, hereabout, that can code circles, around me, in Swift, and a few more, that can code circles around me, in PHP, but pretty much all of you, can run circles around me, in Linux admin. I'm not especially interested in competing, there; especially since a number of you are likely the folks that would Do Bad Things to my server, given an opening.
You don't have to be a linux admin to be able to setup a properly secure server, nowadays it's quite trivial. I bet you, that if you tried, you would be able to do so in less than an hour (at a relaxed pace).
We get lied to about the complexity of hosting by the cloud. I was able to host forums and game servers on VPSes when i was a young teenager, and I'm not technically gifted, it just wasn't complicated at all.
I tend to like shipping stuff, which means taking Responsibility for its operation, maintenance and security.
That often means a lot of "not fun." My servers are working servers. They have data and capabilities that are important to a lot of "not-Chris" people. It's my job to make sure that they get what they are [not] paying for (I write free stuff). That can be a bit stressful, at times; especially when some bad actor is making life miserable for me. I'd much rather that be someone else's problem, where I can write an email that says "Make it so, Numbah One!", instead of spending two days, wrestling with config files, and CLIs.
People are getting hacked a lot because of this, and docker doesn't seem to care all that much.
Firewalls are made for two things:
- packets alteration (iptable table mangle)
- applying filtering on behalf of a badly configured OS
So, if your case and if you want to prevent remote access to your database, you have a bad way: create a firewall rule to drop connections to tcp/3306And you have a good way: configure your sql to bind to ::1
The firewall way requires two configuration (hence: complexity) and hide your intent : the mysql say : "I accept connections from everybody", and then the firewall say "I deny all connections".
While the good way is clear and sane : one component who say : "I only accept connections from localhost"
I guess you gain some security, when you don't have to worry about some things. But you also lose some security, because of the added complexity.
sure it still needs work but much much less everyday
What a silly quote. “No other way” except all the other ones. Everyone watching the man and the cat will learn the same lesson. Everyone who hears the story will learn the same lesson.
I never held a cat by the tail, nor have i ever seen anyone foolish enough to attempt it, yet I am certain I know what happens next.
People FAFO when they should know better all the time.
I think the person in the original article was, at least for the sound file.
> I need the whole enchilada: DB, Web Server, Dynamic Languages, etc. Also, for a shipping, production application, with hundreds of users; where privacy and security are of paramount importance.
It seems quite simple to me, you either learn security, or pay for the expertise of someone that has. You need to decide whether it's worth your time.
I would suggest one thing, though - even with the likes of <big cloud>, they will only provide security in limited cases, i.e. DDoS. Nobody at <big cloud> is going to make sure your application logic works correctly - they clearly won't even make sure you use their resources within sensible bounds.
And people wonder why there's only half a dozen websites any more and the "long tail" has vanished. You can post 3.44MB of audio to Facebook or Twitter and know that you'll never be billed for it.
On the other hand, if one could explain such causation, then I would be very interested in hearing about it.
Correct, but the effect on the wallet doesn't care if there is a causal relationship. And since my wallet is closer to me than a philosophical debate, the conclusion I reach in this case, is to move my site ;-)
It also has a pretty nicely growing community where people are contributing new templates (I added one for Syncthing) and helping each other debug.
The only issue I've had with it is things kinda fall over if you run out of disk space, which happened when I was running on an instance with just 10GB storage. So a little better alerting or prevention around that would be great but otherwise it has been pretty solid.
What brought it closer to home was the characteristics of the recently affect site (same number of daily visits, not popular (a bit niche), etc) where similar to mine.
Moving is easy enough, mostly requiring a DNS update, since I prefer to build the HTML locally and then just dumping it somewhere.
What struck me as odd, when looking for an alternative is that almost none of the popular solutions Netlify, Vercel, Cloudfare (AFAIK) actually implement a spend limit.
This seems like such a basic thing to do...
- firefox - userAgent spoofing claiming I'm chrome - pihole
If I change enough of these, I get through the infinite loop. Does not make me happy.
https://vercel.com/blog/introducing-spend-management-realtim...
Based on the info in this thread, Vercel is the only company I'd leave for Netlify.
> None of them have an equivalent of a stop-loss.
Cynically, it's because they want to take your money. Practically, it's because a company that breaks your thing because you didn't pay, even if you asked it to, just isn't going to be a popular move.
It's probably easier to make it so they can set up alerts and have a human on their end evaluate what steps are worth taking to cut costs while maintaining important availability.
A decade later I played around with AWS, set up a free 1-core VPS. It was fine for a year or so (I ended up not using it at all), and suddenly I got a bill. It wasn't much, but it reminded me how these services make it very hard to be aware of your bills until you get them.
I was trying out Azure recently, and I found it too confusing to make any sort of quick risk assessment.
It's clearly just for people for whom "What's the worst that could happen?" is always a rethorical question.
It's not cheap to restore though, at about $90 minimum per TB.
So it's best as part of a 3-2-1 system, not for frequent restores.
I think the UX can make it more friendly to specify the types of traffic and cost you’re expecting but most erroneous spikes are the result of a customer misconfiguration or a legitimate spike in traffic.
It’s the former which are problematic for customers. They can request a credit and we (GCP) try and accommodate.
It’s not a feature designed for profit. But it also tends to fall below the cut line for prioritization to fix. But it’s in the backlog and doesn’t go unnoticed.
(Former PM on GCP Cloud Functions)
gcloud run deploy ..... --max-instances=N
I'm not sure how sustainable such business model is. When you owned the server, you could unplug it. Now you have no way of knowing if somebody is going to hit your /api a million times per minute
"would be a shame if somebody read a bad review about your biz, pay us to remove it"
to Netlify
"would be a shame if somebody DDOS'd your serverless website, subscribe to our DDOS protection plan"
AWS also has WAF to protect from DDoS , it is expensive but may save a day if you urgently need a protection.
Nowadays everyone push you to add a card to open free* account. Such disposable cards is a solution to this issue.
I just ignore any horseshit that goes to collections outright
Why are such large companies so incompetent though...
Bouncing checks are not a life hack to get stuff for free, they're a crime.
As a small user and not a large organisation, I'll never be able to read the full documentation on throttling every nook and cranny, I want to set a fixed spending limit that if reached, will kill the whole thing, even lose data if it must. But they won't do that because it hurts their bottom line if people are careful with budgets, and sometimes it's tricky to compute billing ahead of time.
A more accurate allegory would be if you told the mechanic to do whatever anyone who knows the registration plate asked, and he did so.
Netlify has multiple options to solve the problem: billing controls, request throttling, setting bandwidth limit, and waving of overages if it was a genuine DDoS, but it doesn't seem they are interested because that'd be like killing the golden goose. Just look at all the things bunny.net CDN offers [2].
It's disappointing how we acquiesce to explanations of cloud providers that are motivated by nothing other than greed.
[1]: https://answers.netlify.com/t/limiting-bandwidth-traffic-to-...
[2]: https://support.bunny.net/hc/en-us/articles/360014190440-Und...
It's a cloud problem.
Edit: Well, if you have small cloud servers they might go down under an attack. And if you pay only outgoing like in AWS that's good for you.
It's either a billing or an architecture problem.
Either let me throttle requests to prevent overbilling, or cut me off when I hit a certain value.
If you DDoS my $5/month DigitalOcean VPS, it's not going to increase how much I have to pay DigitalOcean in terms of compute, and most likely the VPS will buckle under load before it can actually rack up massive transfer costs (since those are also pay-as-you-go for DO).
> It's a cloud problem.
It's a serverless problem because it can be mitigated if using the cloud, but not mitigated if it is serverless.
I have a cloud instance. I don't have this problem and never will. If I had serverless instead, I will have this problem.
There used to be a whole host of specific fuckup like list site, sadly I can't find them anymore.
I’m guessing many hobby users would set that to $100, end of story.
I don’t understand why it’s so unpopular to offer that. I’d imagine the providers would benefit too in the long run.
Why does this not exist after years (more than a decade since EC2) of cloud computing?
Because it is not good for the VC investors.
Note that the submission references serverless providers, specifically netlify and vercel. I don’t think these support an easy to configure kill switch - in any case it wasn’t easy to configure in the scenarios listed on the page.
Not that serverless is perfect.
I have seen AWS Lambda generate large bills even with the 1000 concurrent executions limit, but with the help of upstream services. My memory of it is hazy, but I think over a weekend, a function with some dodgy retry logic managed to generate something like 21TB of CloudWatch logs.
Netlify just sent me a $104k bill for a simple static site | https://news.ycombinator.com/item?id=39520776
There's no end of stories of people discovering 10s to thousand in bill run up on AWS (ir Azure or GCP) because they foot gunned themselves and didn't set up alerts and/or automated service suspension using the cloud providers available tools.
Part of me thinks you shouldn't be allowed to provision EC2/S3/Lambda/whatever without first having set up a Cloudwatch alert and a rule to stop your service if your bill goes past expected/acceptable limits.
Of course Amazon (or Microsoft or Google) could make that _way_ easier than they do. It'd be nice if there was a simple form in your account setting where you could configure it to suspend services if your projected monthly bill passed $limit.
I think it's a more generic "horror story of working with other people's computers".
It’s not really the serverless part that is the problem but rather inability to limit it
eg cloudflare has serverless stuff that you can hard limit
Oh and it's not like you can jump into the console to debug.
I gave up after not even vercel could figure it out and merely told me that I should replace said package.
I would like to see some small amount of commentary on each page that covers what I am about to read. Not much, but half a paragraph of introduction would be nice.
On the otherhand, I fear it will just turn into an unreasoned backlash against technology that is often useful if not as often as its early proponents said it would be (See NoSQL).
The underlying problem I found working with teams is that they all too frequently wanted to use these cloud-native technologies (serverless, etc.) which means thinking in microservices by definition, but usually architected for monoliths. This was accomplished in a few ways: 1) the serverless job did everything for you so in effect it was a monolith 2) they didn't want to use any intermediary storage/cache layer and relied heavily on both sides being up and available (synchronous brittle systems) 3) they went TOO hard in the microservices direction and made things way too complicated 4) their testing suites were half-baked (more the industry/tools fault than the users tbh) and weren't sufficiently air-gapped or mostly incomplete.
If you've been around for more than a decade - we have seen this before: AWS specifically sold the concept of "lift-and-shift" to C-suites a dozen years ago and now that MO is so baked in it's going to take a new generation of services with the right selling points to undo it. Lift-and-shift doesn't work because, as stated above, monoliths aren't for the cloud for a sufficiently sophisticated system. It's the reason DHH and others are advocating for "cloud repatriation". And then there are the small cases, comparatively speaking, like the ones listed on this site. These examples are what happens when you give very powerful tooling to people who do not understand it or the implications of it. But too, this is also partly (maybe even mostly) the vendors' fault: "From localhost to https, in seconds. Deploy from Git or your CLI." is the perfect selling point for a DIY-er or someone running a small business. But what comes along with that low barrier to entry is a downside that could be very expensive when the s**t hits the fan.
it also baffles me that these services cannot tell between legitimate traffic and ddos.
Presumably the costs for a cloud provider are passed on to the cloud provider's customers from that cloud provider's operating costs (with profit). When a spike happens due to, say, a DDOS, does the cloud provider first have to negotiate with its downstream suppliers (e.g., energy, network peering, etc.) to waive the cost?
...
How far down the chain does this go? Or maybe insurance steps in at some point -- or every point -- to break the chain?
(I created serverlesshorrors)
Otherwise this seems like a bait question:)
Although he calls Coolify a Netlify 'alternative', it's 100% 'bring-your-own-server', and is not at all serverless. Coolify is basically a (very nice and featureful) fancy frontend to Docker with integration with Git.
Coolify is free if you want to install it yourself and don't mind the (minimal) tinkering needed to get it set up and keep it up-to-date, although you can pay a monthly fee to have your own servers managed for you, the main benefits are either to support continued development, or to access priority support. You still need to bring your own server, even if you're paying the management fee.
It's not a competitor to Netlify, it's an alternative.
What I was getting at is that we now have a thread with 4 replies: (1) you pitch competing product (2) what product? (3) Coolify (4) it's not competitor because ...
I just wanted to point out that comment #2 only seems to prompt question #3, whereas the helpful reply #4 created by yourself obviates the need for #2 and #3.
All the horror stories so far seem to be about people using a lot of metered resources, like bandwidth, and then getting billed for those resources.
With the pushed competitor you can self-host your Vercel or Netlify alternative on your own EC2 instance - but then if someone downloads 60 terabytes worth of data from you, you still get to pay for that bandwidth. You still get an unexpected large bill.
60 TB
On Hetzner (VPS provider): $1. On Netlify: $33,000