Set Up a $4/Mo Hetzner VM to Skip the Serverless Tax
shipixen.com
shipixen.com
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.
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
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.
Who? I would assume hetzner would close those accounts pretty quickly.
What is their markup?
However, there is something right in this title: when you take into account how serverless was originally marketed ("you save costs as you run things only when you need so you save on these expensive ec2s running 24/7") and the reality (performance issues, cold boot, arbitrary timeout limit, high cost for longer-running processes) it may turn out that cheap VMs might work much better in scenarios where serverless was initially considered.
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.
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.
Focusing on fancy infra now will just take a lot of time for little to no benefit.
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.
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.
I'm not sure why anyone would be patriotic about a private company.
My bet is to reduce support calls. "Why can't I do X and Y on this server?"
However, the DO docs are on a different level and high quality. But those are also accessible if you are not a customer.
Did you have a particularly positive experience?
That doesn't really say anything in the parent context of persistent 100% CPU usage.
They had a bit of a reputation for unreliability but that was decades ago, I expect them to have improved and it's definitely more than good enough for a hobby project.
My main concern with them would be the abuse policies - unless that changed in the past couple of years, they have a "shoot first ask questions later" approach (shutting down or firewalling your server, then asking you to explain/fix the issue before maybe turning it back on - e.g. if their automated systems detect what they think to be a port scan).
Pricing:
$6 on DigitalOcean gets you 1 GB RAM, 1 vCPU, 1 TB traffic, 25 GB SSD. Additional traffic is $10/TB.
€4.51 ($5) on Hetzner gets you 4 GB RAM, 2 vCPU, 20 TB traffic, 40 GB SSD. Additional traffic is likely around €1/TB.
$48 on DigitalOcean gets you a VM with 8 GB RAM, 4 vCPUs, 5 TB traffic, 160 GB SSD.
$48 (€43) on Hetzner gets you a physical machine with e.g. (the specs are a bit random since you're picking from a list of customized systems) an Intel XEON E-2176G (6 cores/12 threads), 64 GB of ECC RAM, 2 x 960 GB SSD, and a Gigabit link with "unlimited" traffic (there are reports https://lowendtalk.com/discussion/180504/hetzner-traffic-use... that they don't like it if you actually max out the line rate all the time, but you should consider the 20 TB/month they offer by default the minimum that they will have absolutely no issue with).
I use them a lot for backend data processing but anything public facing I host at AWS or Digital Ocean who have a more reasonable approach to the internet.
This is nitpicky, but just want to mention that Europe is a continent made up of 44 diverse and distinct nations, and Hetzner originates from one of them.
Patriotism doesn't really work in that situation (nor in the context of a private company).
A more apt comparison would be how Americans feel towards their president. Most like them, others dislike them, but overall they're proud to have them. They're there in tough times and easy to blame when something doesn't go their way.
Update: Hetzer does have USA servers, but apparently not dedicated bare metal servers in USA (only shared/VM).
A VPS with dedicated vCPUs is not the same as a dedicated server.
(haven’t tried them though)
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.
0: https://learn.microsoft.com/en-us/azure/azure-functions/func...
If so, the code/test/deploy loop is certainly much faster with this method than any serverless I've messed with.
Why not explain the "serverless" part a bit more? Say, automatically deploy on a new GitHub commit or something.
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.
> 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".
Autoscaling in side projects? My side and your side seems to be different :)
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.