5 ms·
Set Up a $4/Mo Hetzner VM to Skip the Serverless Tax
- bernadus_edwin 2y agoCoolify is really save my time
- joshbetz 2y agoThere are some things I host this way as well. On the other hand, I find that having autoscaling and automated deploys makes a big difference in speed I can iterate on some side projects.
- romeo88 2y agoAutomated deploys are a matter of two lines of script. Autoscaling in side projects? My side and your side seems to be different :)
- alserio 2y agoScaling to 0 can be nice
- anonzzzies 2y ago$4/mo is close to 0 though and I don't run the risk waking up with a 1000$ bill because HN picked up my crappy blogpost.
- thelastparadise 2y agoGet me thinking: Are there any good vertical autoscalers out there? If we simply scaled the machine bigger and bigger (and then smaller) as needed, we'd avoid all the complexities of horizontal auto scaling. The limits of vertical scaling would be rather huge these days. The simple edit/deploy loop of the blog post would remain 100% usable. The bonus is that it'd work nicely with using sqlite as a datastore as well.
- kamikazeturtles 2y agoHow does Hetzner compare to Digitalocean? I always hear great things about Hetzner. I don't know if those comments are just patriotic Europeans or if Hetzner is really that much better than the alternatives.
- benterix 2y agoI've been using their services for over a decade (first physical servers, now their cloud) and have little to complain. It just works, and if something breaks, they help you real fast.
- tazu 2y agoI personally like the UI much better (less bloat + CTAs), and the prices seem cheaper.
- afandian 2y agoI’ve never used DO, but I’m a happy Hetzner customer of over a decade. The cloud offering is solid, and I’ve had several VMs running for years. I had one project which was part AWS, part Hetzner, for cost reasons. Both driven from terraform. If you can do it with simple VMs, I’d go for Hetzner. Of late they’ve added more features like private networks. The original offering is real servers, and the “server bidding” feature is brilliant for getting a bargain.
- RLN 2y agoI've just switched from DigitalOcean to Hetzner purely for cost. I'm getting more resources for less money. Features seem pretty comparable to me but I don't need anything more than a standard VPS. The only thing I've found weird is SELinux being set to permissive by default. I'm not sure why anyone would be patriotic about a private company.
- hu3 2y ago> SELinux being set to permissive by default. My bet is to reduce support calls. "Why can't I do X and Y on this server?"
- 2y ago
- thelastparadise 2y agoWhen he says "serverless tax," a term I haven't heard before, is he talking about the development overhead? If so, the code/test/deploy loop is certainly much faster with this method than any serverless I've messed with.
- FireInsight 2y agoI think they mean 'serverless' platforms charging extra for bandwidth/build minutes/whatever.
- hypeatei 2y agoServerless is nice for running low traffic services for free. Azure Functions for example don't start charging until 1M+ executions IIRC. Transitioning to micro services also makes serverless more appealing since you're getting a separate web server (resiliency) and scaling for free if you need it.
- alserio 2y agoI do agree for the use case of low traffic services but I've not tried Azure yet. What options do you have to avoid runaway costs and "denial of wallet" attacks?
- hypeatei 2y agoThe function app resource itself has a "Daily Usage Quota (GB-sec)"[0], but I'm not sure how useful it is since I've never used it. Overall billing management doesn't have a way to shut off the world if you go over, but alerts can be setup... basically the same as other clouds in this regard. You can also host functions apps on dedicated service plans and not "consumption" (serverless) plans which provides a predictable monthly bill without changing any of your code. 0: https://learn.microsoft.com/en-us/azure/azure-functions/functions-best-practices?tabs=csharp#maximize-availability https://learn.microsoft.com/en-us/azure/azure-functions/func...
- alserio 2y agoThank you!
- uaas 2y agoGoing with a title like “How to set up Hello World on a Hetzner VM” would be less misleading.
- etaioinshrdlu 2y agoI would use Hetzner more but most of my user base is in the USA, and there is a lot of added latency to having your servers in Europe. I sort of think of Hetzner like a Costco for servers - does anyone know the closest equivalent in the USA? Update: Hetzer does have USA servers, but apparently not dedicated bare metal servers in USA (only shared/VM).
- tazu 2y agoHetzner has servers available in Ashburn, VA and Hillsboro, OR.
- luckylion 2y agoImportant to add: virtual servers. They don't offer physical servers in the US, as far as I remember they're not running their own data centers.
- tazu 2y agoI didn't notice but the dedicated machines are indeed "vCPU". But isn't that how all VPS providers do it? How else would they manage/sandbox the machines?
- Onavo 2y agoBare metal machines only need a minimal hypervisor, no need to sandbox if there are no other users.
- SahAssar 2y agoThe point is that their dedicated servers in EU are not VPS:es. They are dedicated servers, not virtual private servers. This usually means better performance (at the same pricepoint but dedicated have a higher starting point) among some other pros. A VPS with dedicated vCPUs is not the same as a dedicated server.
- dawnerd 2y agoIs Hetzner the same as OVH? OVH has data centers in the same cities.
- popalchemist 2y agoThis is an insufficient replacement for serverless. No scaling capabilities.
- jonathantf2 2y agoMost people using serverless do not use or need autoscaling.
- popalchemist 2y agoNevertheless that is part of the value prop, and this does not address it.
- manuelmoreale 2y agoIsn’t that covered by the fact that the 4/mo is a VPS and you can log into the Hetzner admin and scale up your server with a few clicked when needed? Unless you mean automatic scaling which fair, that’s not something you can do.
- bcye 2y agoThat is only vertical scaling though. Serverless' advantage is that it almost always has horizontal scaling/resilience/failure handling built in
- monkpit 2y ago[citation needed]
- riku_iki 2y agothe clear advantage of serverless are: autoscaling and fault tollerance out the box, which single VM doesn't provide. Otherwise it is not clear why one would use serverless..
- antifa 2y agoMost people are scaling down to zero (which is cheaper than $4/month last time I checked).
- micw 2y agoThat feels so wrong to me: 1st to install node, an arbitrary script is downloaded and executed without having a look into it. Could do anything with the system. Then `sudo npm install -g pm2` is called. That means the stuff is installed as root "somewhere" in the system - bypassing debians package management. Then a "process manager" is installed to start/stop/manage a service - on a system that already has systemd doing the same job. Is that really the way things should be done? Waiting for the day when the tutorial starts with modifying grub.cfg to directly boot into node.
- wavemode 2y agoFrom the very beginning of the article: > This tutorial is made for beginners ― you only need to be somewhat comfortable with the command line. > It is made as short as possible and avoids using e.g. Docker to keep things simple. Once you feel comfortable with this setup, you should consider using Docker for easier management or automatically deploying from Github with a webhook. Even setting that aside and assuming this tutorial was meant for an experienced engineer, your points still feel like nitpicks without substance. Downloading an "arbitrary script" is not substantially different from downloading an arbitrary executable, which people do anyway. Of course npm packages bypass debian's package management. On the off chance debian's repositories even have the package in question, I certainly wouldn't trust it to be up-to-date. pm2 is a popular process manager with features tailored for node apps. That you personally feel it shouldn't be used over systemd, doesn't mean that using it is "wrong".
- elktown 2y agoDo you inspect your neighbors garage workshop for branch safety standards & best practices? Context and proportionality.
- micw 2y agoNot this. But I'd care if my neighbour would fix his roof without proper safety stuff like a belt or whatever.
- 2y ago
- fabian2k 2y agoThe title is clickbait or maybe simply misguided in my opinion. A cheap VM and Serverless services are very different things and not directly comparable. But I do sometimes get the impression that the simple approaches are discarded too easily today. You can rent a lot of hardware pretty cheap from Hetzner and the raw power you get is much higher than what you get with cloud services for the same amount of money. Of course the cloud also provides more stuff, but you really pay a hefty price for some of the things you get there (cough traffic). The difference gets even larger when you look at the Hetzner root servers, that's a lot of CPU, RAM and storage for little money. And renting actual servers does seem to be overlooked a bit at times, often the comparison is between the cloud and actually buying servers and doing everything yourself.
- overbytecode 2y agoWho are comparable providers in your opinion? Hetzner has KYC and needs ID for you to use their services, I’d rather go with a service that didn’t. Any recommendations?
- gallexme 2y agoThere some hetzner resellers which accept crypto coins instead OVH(and subsidiaries like server 4 you,kimsufi) is the pricing a bit higher but comparable (in some regions) But last time I used ovh Hetzner also didn't require Id verification, maybe they changed since then Ionos also similarly priced didn't need Id last time I used them
- mrinfinitiesx 2y agoOVH wants ID as well in some cases. If you're in the US you aren't getting an OVH overseas anymore to my knowledge. Although, you can get 2gbps unmetered on your servers which is awesome. I've just been being lazy and buying a domain from namecheap and getting the VPS Pulsar (6GB RAM, 4cores), 250mbps up/down for when I do a project. one server does fine for multiple projects usually. OVH is still grand-daddy IMO.
- insane_dreamer 2y agowhat's the "serverless tax"?
- layer8 2y agoThe premium you pay for serverless versus a VPS with comparable performance/bandwidth requirements.
- antifa 2y ago$4/month for smallest VPS vs the burdensome $0 for first million requests? The author's framing is non-sense.
- anonzzzies 2y agovs waking up with a $1000 bill because some bored hackers decided to have some fun. With the 4$, it is still $4 no matter what happens.
- insane_dreamer 2y agoIt’s not a premium — it’s a business decision as to whether based on expects number of requests it makes more sense to pay for a serverless or VPS setup
- dark-star 2y agoThis, sadly, stops right where it gets interesting. Setting up a VM/VServer with Cloudflare and Let's Encrypt is pretty well-covered already. Why not explain the "serverless" part a bit more? Say, automatically deploy on a new GitHub commit or something.
- ezfe 2y agoIt's clickbait - this doesn't replace serverless
- cedws 2y agoI’m so disillusioned with cloud/serverless/Kubernetes these days. If I were building a startup I’d just build a monolithic service, plonk it on a Hetzner VM, boom done. You can start making money. So many startups are bleeding cash because they’ve been convinced by AWS and others they need auto scaling and self healing from day one. Just build the thing, get it running, make it good later.
- anonzzzies 2y agoIt sounds a bit like a grift these days; investors want you to invest millions in infinite scaling ops 'because good' so you don't get the big money if you don't so you do, wether you may ever need it or not. Almost every startup can run their entire lifetime on a $4 vps and have the same outcome if it wasn't for the required (...) vc moneys.
- Alex_L_Wood 2y agoHonestly, same. I'm building a small BE for a small startup with a friend of mine, and while sometimes I have these urges that I should migrate everything to K8S / Docker Swarm, so far the setup with three small VMs of API server machine + ingress machine + auth machine with simple SSH deploy through GitHub Actions (that can always be performed manually, if needed) works fine. Is it fancy? No. Can I understand everything to the last details what happens during deploy and debug it? Oh yes. Focusing on fancy infra now will just take a lot of time for little to no benefit.
- iAkashPaul 2y agoScaling/cold-boot time is the real concern IMO no the cost
- aitchnyu 2y agoWhat if I'm nervous about my SQL db? I pay 12$ onwards to RDS so I can do one click backups and restores to any point in time. With a VPS, I have to make a script to cron to generate backups and test that the VPS backup has backed up the file and the file is useful. Is there a "set and forget" solution?