News for hackers. Stuff that matters.
Re:Ask HN: Cheapest/easiest way to host a static site? by crazypython on Friday March 26, 2021 @04:16PM (#26596427)
An S3 bucket is intended as storage, not retrieval. Downloading from S3 means grabbing shards. You should put a proper CDN, like CloudFront or Cloudflare, in front.
Re:Ask HN: Cheapest/easiest way to host a static site? by dave_sid on Friday March 26, 2021 @04:32PM (#26596587)
Pfffffft. It’s probably a personal site with 10 visitors a week. Let’s step back a little here.
Re:Ask HN: Cheapest/easiest way to host a static site? by erichurkman on Friday March 26, 2021 @05:47PM (#26597358)
Let's be real here.

He clearly needs kubernetes.

Re:Ask HN: Cheapest/easiest way to host a static site? by dave_sid on Friday March 26, 2021 @06:26PM (#26597755)
Hahahaha
Re:Ask HN: Cheapest/easiest way to host a static site? by pgroves on Friday March 26, 2021 @05:05PM (#26596920)
This is correct. Why would I put any more effort into it?
Re:Ask HN: Cheapest/easiest way to host a static site? by gabeio on Friday March 26, 2021 @05:38PM (#26597273)
Cloudflare at minimum it's free as well and will protect you from bad actors which will save you $ if someone starts an infinite loop requesting your site.
Re:Ask HN: Cheapest/easiest way to host a static site? by cphajduk on Friday March 26, 2021 @04:40PM (#26596673)
And 9 of them are just bots.
Re:Ask HN: Cheapest/easiest way to host a static site? by Diederich on Friday March 26, 2021 @04:26PM (#26596522)
> You should put a proper CDN, like CloudFront or Cloudflare, in front.

I understand what you're saying, but why? I assume the site in question is pretty low volume. What's wrong with serving directly from S3?

Re:Ask HN: Cheapest/easiest way to host a static site? by viraptor on Friday March 26, 2021 @04:42PM (#26596696)
You can't get https on S3. Also many interesting headers are only available via cloudfront.

Also you get a little bit of protection from someone sending lots of traffic to make you spend $$$

Re:Ask HN: Cheapest/easiest way to host a static site? by miyuru on Saturday March 27, 2021 @04:15AM (#26600822)
S3 does not support gzip compression.

https://news.ycombinator.com/item?id=26600816

Re:Ask HN: Cheapest/easiest way to host a static site? by blacha on Friday March 26, 2021 @04:35PM (#26596618)
You can generally query any object off s3 in a few milliseconds..

I have a system doing 10s-100's of millions of reads a day from s3 with very consistent and fast read times.

Re:Ask HN: Cheapest/easiest way to host a static site? by erikmolin on Friday March 26, 2021 @04:26PM (#26596524)
Why, if his monthly bill is 83 cents, and he values his time? Does not using a CDN impact performance in a crippling way that neither me nor the poster you're replying to understands?
Re:Ask HN: Cheapest/easiest way to host a static site? by philistine on Friday March 26, 2021 @04:29PM (#26596557)
The big gain with putting Cloudfront in front of it is you can have HTTPS.
Re:Ask HN: Cheapest/easiest way to host a static site? by crazypython on Friday March 26, 2021 @04:42PM (#26596698)
HTTPS gets you better SEO and the ability to be iframe'd from HTTPS sites.
Re:Ask HN: Cheapest/easiest way to host a static site? by speedgoose on Friday March 26, 2021 @05:30PM (#26597187)
And some security.
Re:Ask HN: Cheapest/easiest way to host a static site? by dave_sid on Friday March 26, 2021 @04:33PM (#26596600)
And loose 30 mins of your life you’ll never get back. It’s just a person site.
Re:Ask HN: Cheapest/easiest way to host a static site? by foobar33333 on Friday March 26, 2021 @05:52PM (#26597410)
Browsers will light up like a christmas tree if your site doesn't have https.
Re:Ask HN: Cheapest/easiest way to host a static site? by nrmitchi on Friday March 26, 2021 @04:33PM (#26596602)
Performance maybe a little bit, but IIRC you, as the owner of the bucket, pay for bandwidth out.

Putting it being a CDN protects you (at least a little bit) from the possibility of a huge bandwidth bill at the end of the month if someone realizes they can attack your wallet directly by trying to ddos your site.

Re:Ask HN: Cheapest/easiest way to host a static site? by crazypython on Friday March 26, 2021 @04:36PM (#26596631)
I agree– AWS bandwidth out is literally 100 times more expensive than CDN and VPN bandwidth out.
Re:Ask HN: Cheapest/easiest way to host a static site? by sitzkrieg on Friday March 26, 2021 @05:31PM (#26597199)
indeed, not to mention generous bandwidth rates on vps providers too
Re:Ask HN: Cheapest/easiest way to host a static site? by crazypython on Saturday March 27, 2021 @04:30PM (#26605364)
*VPS
Re:Ask HN: Cheapest/easiest way to host a static site? by imgabe on Friday March 26, 2021 @07:56PM (#26598424)
It takes like 30 seconds to point a Cloudfront distribution at an S3 bucket. Maybe a couple minutes more to set up the domain.
Re:Ask HN: Cheapest/easiest way to host a static site? by maest on Friday March 26, 2021 @08:35PM (#26598646)
Eh, only if you've done it before. If it's your first time, it can easily take 30 mins to an hour, if you also have to figure out how to host the website on Route 53.
Re:Ask HN: Cheapest/easiest way to host a static site? by imgabe on Friday March 26, 2021 @08:43PM (#26598707)
Well, sure, but every suggestion is going to take some time if you've never done it before. It's not like it's an obscure skill that you'll never use, it's pretty handy to know.
Re:Ask HN: Cheapest/easiest way to host a static site? by pgroves on Friday March 26, 2021 @05:06PM (#26596937)
I don't think it matters much b/c of the super low volume but I do have it behind Cloudflare free-tier.
Re:Ask HN: Cheapest/easiest way to host a static site? by crazypython on Friday March 26, 2021 @04:36PM (#26596625)
> Does not using a CDN impact performance in a crippling way that neither me nor the poster you're replying to understands?

It adds up to 600ms of latency for each roundtrip. A modern website without link rel=preload is several roundtrips– download HTML page, then do JS requests and CSS, so that's ~1.2s of additional latency.

Because he succumbed to AWS' marketing. Surge, mentioned downthread, lets you deploy a folder for free on a worldwide CDN with virtually no setup.

Re:Ask HN: Cheapest/easiest way to host a static site? by miyuru on Saturday March 27, 2021 @04:14AM (#26600816)
I agree, S3 is only storage. S3 even does not support gzip compression.

If you are hosting a website in s3, please put a CDN with gzip support in front.

Re:Ask HN: Cheapest/easiest way to host a static site? by maest on Friday March 26, 2021 @08:33PM (#26598635)
You can use CloudFront with an S3-backed static website.