Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What we did for tacticalvote.co.uk:

1. A static site generator, with markdown as the source input in Github

2. Data from Google Sheets

3. A bash job on a cron that would poll both for changes... if changes exist, re-publish the site or data and purge Cloudflare cache using their API

4. Configure Cloudflare via Page Rule to Cache Everything

Even with a very high change rate and hundreds of thousands of visitors a day and severe traffic spikes... the site was instantaneous to load, simple to maintain and update, and the cache purge stampede never overwhelmed the cheapest Linode serving the static files.

The content editors used Github as the CMS and edited Markdown, or just updated data in Google Sheets. Changes were live within 5 minutes.



I have something similar set up for a site I run using Jeykll and Google Cloud Build. The site is hosted on a free tier VM and short builds (eg 2 minutes) are free unless you're doing hundreds a day. I use a docker container to generate the site which is much faster than installing jekyll every time. The site isn't big, so a short fix is pushed live within about four minutes.

The builder just rebuilds when someone pushes to master and then scps to the VM. We've been trying out Forestry.io (linked to github) as a management client so that non technical authors can add content. It works to a point, but there are odd things like forestry has poor support for media that's not an image, and doesn't have a concept of folders. So everything gets thrown into "/media" which I hate. Also because it's using git as the database, it commits every time you save, which of course triggers a build. So if there was a way to add releases in forestry that'd be ideal.


That sounds like a really nice approach. Out of interest what does that sort of traffic end up costing on the Cloudflare side - presumably that's where the cost ends up here?


It's a free account on Cloudflare.

Cloudflare do not charge for bandwidth... and so it's free.

This whole setup is $5 per month for the hosting, though we do use Github personal and that is $7.00 per month.


That’s a pretty amazing setup for the traffic and press you were sustaining, nice!


Interesting. Have you made your source available?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: