5 ms·
It felt odd to see a doc this comprehensive on static site hosting with no mention of AWS S3/Cloudfront, given how easy it is to push content to an S3 bucket (e
by akerl_ 4y ago
It felt odd to see a doc this comprehensive on static site hosting with no mention of AWS S3/Cloudfront, given how easy it is to push content to an S3 bucket (either manually or via the CI pipeline of your choosing) and then serve it up either direct-from-S3 or via Cloudfront.
But then it turns out that this is actually pushing folks towards some new paradigm of static cached HTTP responses instead of files. It pitches this as an attempt to “standardize the hosting side of static sites”, which doesn’t pass muster for me. We’ve already standardized the hosting side of static sites by using the file system. Shifting to a new storage format besides “HTML on disk” doesn’t unify anything, nor does it seem desirable to have fewer options for serving content.
- danuker 4y agoS3 is not competitive. Here: https://neocities.org/supporter https://neocities.org/supporter
- akerl_ 4y agoCompetitive by what metric? My site lives more or less entirely within the AWS free tier. I think my total AWS bill is around $20/mo, and 80% of that is for the stupid number of domain names I’m hosting zones for.
- Something1234 4y agoQuick question: Why wouldn't I use my free tier registrar DNS? Are there really that man DNS queries serviced cause you pay based off the number of responses? Especially if they are stupid domains.
- akerl_ 4y agoAs far as I can tell, there’s only 2 upsides I’m getting by using AWS as a registrar: 1. I’m lazy, and I already manage a bunch of other stuff in AWS, so it’s convenient for me to have the domains in the same place 2. For some of the domains, I’m serving records that point to other AWS resources (like Cloudfront and S3). AWS’s Route53 has clever helper features when you’re pointing records at other AWS services). Otherwise, you’re right that there’s plenty of registrars that’ll do perfectly solid DNS
- lukewiwa 4y agoFor me my static sites are small enough that it all falls within the free tier and I can deploy everything using the CDK.
- numtel 4y agoIf you're ok with using Cloudflare's free plan for your DNS, you can stop paying for each hosted zone.
- Dalewyn 4y ago>We’ve already standardized the hosting side of static sites by using the file system. Worth noting that the incoming younger generations can't and don't into file systems.[1] Yes, anyone who wants to be a webmaster should do their homework, but that is besides the point. We are probably the last generation who can be ubiquitously assumed to have an understanding of files and folders/directories in a computer. [1]: https://www.theverge.com/22684730/students-file-folder-directory-structure-education-gen-z https://www.theverge.com/22684730/students-file-folder-direc...
- doliveira 4y agoThat's fascinating! Young people struggling with files and folders just like my Mom does.
- Dalewyn 4y agoIt's really not surprising. The most familiar computer to young people, their smartphone, does everything to hide and abstract away the file system and even the fact that it's a computer. When someone doesn't even realize a concept exists, it shouldn't come as a surprise they will struggle.
- nerdponx 4y agoMore cynicism is warranted here. "Platform companies" like Google and Apple love it when users fail to understand how their devices work, because they get locked-in to the plaftorms. This is the successful end result of a long campaign of deliberate miseducation of users.
- zactato 4y agoI think people in the web development space will continue to understand this concept. People who are curious will learn how the internals work. For everyone else, who cares? Search is so good that it doesn’t matter where a file lives on your device. They don’t need to understand the internals of how directories work. Good riddance! Even though people knew how to use files and folders no one did it well. It was a mess of “new directory” and “copy of copy of essay5.doc” I’m so thankful that most folks don’t have to deal with that anymore. They can use their computers instead of fighting them.
- waffle_ss 4y agoJust using the file system is inadequate for some reasons that TFA mentions. For instance, returning gzip or Brotli compressed versions of resources, or returning HTTP 301/302 redirects for certain requests. Also if you use CloudFront be aware you'll be paying for bandwidth, so if one of your pieces goes viral (or you're just a popular writer) the cost can be surprisingly high (over $50/mo).
- indigodaddy 4y agoPretty sure you can stay in free tier without a CC on file though? So assume they’d just deactivate your services if you breach free tier resources for the month..(?)
- the_gipsy 4y ago"HTML on disk" does not cover headers. But it's true that cloud providers have that solved, and "DIY" bring-your-own-server don't, and the article somehow concludes that bringing your own server with the right configuration is not an option.
- ciprian_craciun 4y ago> [...] the article somehow concludes that bringing your own server with the right configuration is not an option. [the author here] On the contrary, it is an option to fine-tune your web-server configuration to put all the right headers in the right places. (I usually do this from HAProxy and just ignore the web-server.) However, the point I was trying to make in the article is that where these headers are configured is divorced from the content itself lives. I can't look at a HTML file and easily say "when the browser will hit this resource these are the HTTP headers that will be sent in the reply"; I need to execute in my mind the web server configuration logic to get that. Thus my proposal is to move back (some of) the headers where they belong: as meta-data right besides the actual resource.
- the_gipsy 4y agoBut do you really need different headers for different resources for a static site? I can imagine a distinct "downloads" folder maybe, but not much more.
- twhitmore 4y agoI agree -- the OP said space for all the separate HTTP response variations might be an issue, and "With a smart enough storage format all of these could be solved". I think he misses that storing HTML and having a webserver turn this into HTTP responses, might be exactly the storage format that solves this problem.