Ask HN: Cheapest/easiest way to host a static site?
451 pointsThis is more of a thought experiment, I know a multitude of ways to do this which require loads of setup, jumping through AWS hoops, etc. I'd like ideally way to deploy to a hosted service with a single command. Imagine Heroku but even easier.
Comments (487) 172 threads
Earlier comments[1] - https://neocities.org/
Use it to host my blog; free tier is good, but I really like them and have really phenomenal limits, etc, so just pay (even though my blog is not updated nearly as much as I'd like)
Continue this thread — 2 replies
Example site: https://jeremyshaw.co.nz
Other than that I'm sure Github Pages and Netlify are fine, both very popular options.
Worst case you put it on Amazon S3 and get charged a fraction of a dollar every month .
The fact that you cannot put a cap on your spending is infuriating (the official AWS answer is "we do not want to break your business" (even if I want to)).
To be fair, some complaining or crying in such cases usually gets your bill reversed.
You can set up billing alarms and use alarms as triggers for actions.
Also, you might be the main/only site administrator, in which case falling asleep might end up badly for you.
I've had spikes of up to 300k visitors to my Firebase blog in a month, and the bill was like $150. It seems hard to get bitten by huge surprise costs from a blog on Firebase static hosting, even if someone's using a botnet to try to drive up your bill.
Edit: Thinking about it a little more, I guess you could find the largest resource on a blog and direct your botnet to download it nonstop repeatedly, and that would be orders of magnitude more expensive than even large organic traffic.
No, I was referring to your bill, when your resource usage spikes (really spikes, as in sustained Gbps+ traffic spikes). Many people were taken aback by the unexpected bills.
I miss the old days :(
I host my personal site this way.
I also host about 100 mostly-static mostly-low-use websites at work similarly: with Apache on a couple of VMs. They are more reliable than the free versions of Netlify etc, and the systems work to maintain 100 static websites is little different to maintaining 5 static websites.
Many routers have support for this and if your router runs dhcpcd you can tell it to issue the call when it renews the DHCP lease from your ISP, or simply cron job it.
Continue this thread — 5 replies
Continue this thread — 1 reply
As IPv6 becomes more widely adopted, there will be no need to conserve IP addresses and everyone can be allocated a block of them.
It will also be stupid fast (cloudfront is edge networks) + have ssl + it will not go down if you ever see a surge in traffic.
I have several of these and they work beautifully. As far as cost goes: 12$/domain per year + 0.5$/month for route53 zone + 0.2$/month for the actual traffic and hosting the content in S3. So it's under 2$/month for "enterprise grade"
Except that it isn't.
Only the domain, and to some extend, the S3 costs are the "fixed" cost that you can even predict at first. A surge in traffic will surely increase the egress data, and that is easily $0.05-0.10 per GB.
Cloudfront is one of the most expensive CDNs out there, and after 2-3 years of use, I came to realize how much I was wasting money on. CDNs often work quite flawlessly if you have a good cache busting mechanism, and I was paying a huge premium for what was essentially a set-once operation.
at 10GB per month you pay 0.8$/month yes the traffic it costs extra, but a static website should not be GB (or even MB) in size. Also, if you have a lot of traffic you should learn how to control the caching aspect.
i would also challenge you to look at what egress traffic costs in other places.
For a side project I likely wouldn't bother, but the pricing differential is really damn steep.
Continue this thread — 2 replies
All comments shown.
Couldn't load more comments. Check your connection and try again.