3 ms·
Almost every self hosted blogging platform I've seen requires you to have a server to run it on 24/7, and I don't get it. This is the perfect use case for FaaS
by jedberg 5y ago
Almost every self hosted blogging platform I've seen requires you to have a server to run it on 24/7, and I don't get it.
This is the perfect use case for FaaS -- a personal site that maybe gets a few thousand hits a month, and maybe has that one post that goes viral and gets 100,000 hits in a day.
I love all the features and the nice aesthetic of all these things, but it seems silly to pay even $5/mo for a 24/7 server when I can host it for free on AWS Lambda if the software had been written that way. Not to mention it would make it more accessible to non-tech folks if you can just give them a button to click that sets up a Cloudformation for them or something.
Sadly I don't have the time (not design skills) to write one myself.
- cpach 5y agoVery interesting idea. If you or anyone else feel like expanding upon that idea and do a ”back-of-the-napkin” diagram or something, it would be very interesting to see that! (I started dipping my toes into FaaS[0] literally yesterday, so I must admit I can’t yet imagine how one would actually host a blogging service in such an environment.) [0] Function as a service
- jedberg 5y agoIt's pretty straightforward actually. What does a blog do? - Show content to users - Allow the admin to update content So you'd really just need three functions and some storage: - A function that takes a request for content and shows a web page - A function that authenticates the admin and shows them an admin page - A function that takes their admin update request and writes to storage. The storage could be S3, of if you want to get fancy you could use DynamoDB so that you can do things like tags and have blog pages that show each tag (or just regenerate them and put them on S3 every time you make a update with a new tag).
- indigodaddy 5y agoI don't think there is any significant technical challenges to running this on lambda. You'd just need some sort of workflow to update the lambda image with each blog update. A big downside to hosting on AWS though is if your site gets HN'ed, you could have a hefty bill on your hands.
- cpach 5y agoCouldn’t the risk of hefty bills be lowered by using CloudFront as a caching layer?
- jedberg 5y agoThat's unlikely. Using Cloudfront you'd only pay 8 cents per GB (once you get past the 50GB of free data tier). Or you can put Cloudflare in front of it and pay nothing.
- indigodaddy 5y agoSo I’m not that familiar with using CDNs. So Cloudflare would actually serve 100% of the workload for a static site? That’s where you leave everything default for a domain in Cloudflare’s UI right? Usually I uncheck the “use cloudflare” or whatever they call it, essentially just having Cloudflare do the DNS only.
- jedberg 5y agoNot 100% but petty close. For a mostly static website like a blog it could easily serve 95%+ of the traffic. And yes, it's where you leave it checked to use Cloudflare for your traffic.
- indigodaddy 5y agoThanks for the response and info!