Live data from Hacker News

Scaling Your Static Site to a Global Market for a Fraction of the Cost on AWS

medium.com

21–30 of 64 posts

Re: Scaling Your Static Site to a Global Market for a Fraction of the Cost on AWS

#21
post #16

Earlier quoted context omitted.

> What if your site changes every 5 minutes, and is about 100Mb? This is probably an exceptional rate of change for the _vast_ majority of static sites.

> This is probably an exceptional rate of change for the _vast_ majority of static sites. I also doubt that many static sites have much "overhead" related to maintaining nginx config files and Let's Encrypt certificates.

Sure, but then there's the whole overhead of maintaining a server.

Re: Scaling Your Static Site to a Global Market for a Fraction of the Cost on AWS

#22
post #2

why can't he use the free cloudflare? A static website cached by cloudflare seems very vanilla. Also, why S3? this seems very easy to do with Linode or anything else similarly cheap or cheaper ($20 gets you a KVM VPS with 2 Gb nowadays) Unless you have to regenerate constantly, all it needs is nginx, to serve the pages to Cloudflare edges when thry drop out of the cache

Nowadays, if you really don't need a server, then don't spin up one. In this case, the author does not need a server. If you think you might need to do some backend processing, see if you can use 'serverless' functions and offload the admin work to someone else. If that doesn't suffice, maybe something like App Engine. Still not enough? Ok, so maybe a AWS batch job (or equivalent). Does it have to run all the time? Then maybe a container managed by ECS or similar. None of this works and you need an actual VM? Fine, spin up one. But now you have to care for it and keep it monitored, patched and secured.

Re: Scaling Your Static Site to a Global Market for a Fraction of the Cost on AWS

#23
post #15
post #5

Earlier quoted context omitted.

S3 is going to be more reliable than anything you can reasonably be expected to administrate yourself, and it's cheaper as well. It's also supported by all CI tools, so you just script the deployment based on git commits.

My linode hasn't been updated for years, still runs nginx just fine. port knocking means little risks of intrusion, as ssh is on a non standard port too. My deployment is shell scripts launched by systemd timers Instead of downvoting, can someone please explain why this setup that is stable is not up to whatever standards?

You have a single point of failure and a linux box (and CMS?) that needs to be constantly patched - how is that in any way comparable to the simplicity and scalability of dropping files onto an S3 bucket?

Re: Scaling Your Static Site to a Global Market for a Fraction of the Cost on AWS

#24

I have set up some sites the same way, the only ugly part for me was that I wanted to use the features of S3 web hosting interface, but restrict all traffic to come through CloudFront. This blog post (not mine) describes the problem and the approach: https://abridge2devnull.com/posts/2018/01/restricting-access...

Just wondering, what's the motivation to restrict access? Is it to keep costs down in case someone decides to run up your bill with a flurry of requests?

Re: Scaling Your Static Site to a Global Market for a Fraction of the Cost on AWS

#28

I'm surprised no one is mentioning Netlify in the comments.

1000x this. Netlify is one of those tools that I really have trouble remembering life without, especially for static sites. The first time I used it, I distinctly remember saying, “oh wow,” aloud. And I still find myself saying that the more I get to know their offerings.

Re: Scaling Your Static Site to a Global Market for a Fraction of the Cost on AWS

#29

I have set up some sites the same way, the only ugly part for me was that I wanted to use the features of S3 web hosting interface, but restrict all traffic to come through CloudFront. This blog post (not mine) describes the problem and the approach: https://abridge2devnull.com/posts/2018/01/restricting-access...

Have you thought about using Cloudflare Workers instead? It's pretty easy to host from a bucket: https://developers.cloudflare.com/workers/recipes/static-sit...

Re: Scaling Your Static Site to a Global Market for a Fraction of the Cost on AWS

#30
post #2

why can't he use the free cloudflare? A static website cached by cloudflare seems very vanilla. Also, why S3? this seems very easy to do with Linode or anything else similarly cheap or cheaper ($20 gets you a KVM VPS with 2 Gb nowadays) Unless you have to regenerate constantly, all it needs is nginx, to serve the pages to Cloudflare edges when thry drop out of the cache

Nowadays, if you really don't need a server, then don't spin up one. In this case, the author does not need a server. If you think you might need to do some backend processing, see if you can use 'serverless' functions and offload the admin work to someone else. If that doesn't suffice, maybe something like App Engine. Still not enough? Ok, so maybe a AWS batch job (or equivalent). Does it have to run all the time? T…

You can just use Cloudflare Workers to do whatever serverless things you need.
Post reply on HN