4 ms·
But he could've put static files on a Hetzner server and still have his backend in Azure. That would've solved these issues and probably saved even more money.
by dx034 5y ago
But he could've put static files on a Hetzner server and still have his backend in Azure. That would've solved these issues and probably saved even more money.
- hardwaresofton 5y agoBeing able to run a relatively simple global cache with a cheap provider like Hetzner has the origin is also harder than it should have to be.
- hrrsn 5y agoapt install nginx
- hardwaresofton 5y agoApologies wasn't clear -- what I meant was the difficulty of setting up NGINX AND setting up a CDN to serve your content as fast as possible from multiple places is harder than it should be. They're both relatively simple tasks in this day and age but they're not connected/brain-dead-easy for a vendor like Hetzner. Honestly, they're not even connected/brain-dead-easy for a vendor like AWS particularly -- you still have to click around a lot or write a bit of terraform/aws-cdk/etc when all you really want to do is throw a folder or zip file over the wall and point it at a domain. There are tools like Ness[0] out there which look like a breath of fresh air but there needs to be more tools like that where the supported backends include a cloud like Hetzner/Leaseweb/OVH.
- dx034 5y agoHow's that? Setting up a revers nginx proxy with cache takes probably less than an hour even if you've never done it (speaking from experience). And otherwise, if the files don't change that much just ssh in, copy them on the server and serve them via nginx and cloudflare tunnel? I'm in no way a sysadmin and have set up these configurations manually in less than an hour for side projects. Cloudflare tunnel also allows you to lock down the server for everything but ssh with pubkey auth so the attack surface is really small.
- Nextgrid 5y agoThe usual answer you'll get is that it's not "infrastructure as code", is not highly available, etc... and while that's theoretically true, in practice modern hardware is reliable enough that I'll take the gamble (and the complexity of clouds and their control plane means that you may have more outages than what would be caused by hardware failures).
- RamblingCTO 5y agoYou can always set it up as such though. We're using k8s/terraform on hetzner cloud perfectly fine on like 30% of the AWS costs we had before that. Maintenance is minimal as well.
- hardwaresofton 5y agoAh sorry I should have been clearer on this -- "global cache" === CDN. Hetzner does incur a performance latency (unless you use the brand new US DC of course, and your customer happens to be in the US). IIRC right now you can't mix US cloud servers and German ones in the same Load balancer (also a relatively new hetzner cloud feature) but of course you can do some DNS tricks and get the loads to be fast. Actually hosting files is super easy (Caddy is awesome, NGINX is awesome), but it's even better when you don't have to set up the server at all, for example just turn on "HTTP access" on a object storage bucket for example. So this is another place Hetzner kind of falls short though they do have hosting options[0], so basically the ideal solution here would be to deploy a simple Hetzner app (caddy/nginx or the hosted options hetzner has), set up a cheap CDN (Bunny, Cloudflare, etc) in front of it, and save money that way. If the bill is still too high just take the penalty or bias towards one geo (germany/US). I was less talking about the difficulty of getting a server up and more about the CDN bit of the issue to make loads blazing fast! [0]: https://www.hetzner.com/webhosting https://www.hetzner.com/webhosting what you want is latency reduction. Usually what sites like Vercel and others give you is way faster loading time by putting stu
- Symbiote 5y agoIf I understand this particular case correctly, the large files are just big data downloads of several GB each. Latency isn't particularly relevant for this, and it probably isn't relevant for most hobby projects.