Kubernetes

As I learn about Kubernetes I decided to write a series of blog posts. When learning any new technology it is important to understand the vocabulary so you can properly understand the documentation. Also, I would like to explain some ideas I didn’t quite understand. Definitions Kubernetes is an open-source container-orchestration system for automating application deployment, scaling, and management. It was originally designed by Google, and is now maintained by the Cloud Native Computing Foundation.

Fastly Cache

The Fastly cache is fast. I love the fact they use Varnish, because I like to use Varnish for some of my own projects. Fastly may charge a bit more for bandwidth than other CDNs, but it is worth it. Instant Purge Once you purge content using their web interface or API, it is done within 150 milliseconds. They focus their infrastructure in the same datacenters as major internet exchange points, which are also the locations of the same major cloud providers.

Why a Static Website?

I keep moving this site all over the internet. It has been hosted with InMotion, DigitalOcean, Cloudflare, Firebase, and now AWS S3 and Google Cloud Storage. I once developed a CMS (Content Management System) for this site, then I put the site into Wordpress, and now I’m using Hugo the static site generator. Database driven websites were the coolest back in the day, but now static sites are better. By making the site static, it speeds up the site since there are no connections to a database or complicated queries.

Fastly CDN

This is the first post in a series of posts about my transition Fastly. I used Cloudflare Worker Sites for almost two weeks. I’ve now switched to Fastly CDN. Cloudflare offers some great services for free, and we still use them at work, but I still have a feeling something isn’t right. When something is too good to be true, it usually is. Their pricing model , per domain, can be a bit expensive even though bandwidth is free.

Cloudflare Worker Sites

I’ve switched my site to Cloudflare Worker Sites. I was using AWS S3 and Google Cloud Storage to store my static site files, but now that Cloudflare offers static sites, might as well use theirs.

New site built with Hugo

I recently moved this site from shared hosting to being hosted on an Ubuntu server at home. Next, I installed a plugin that produces a static version of your Wordpress site and uploaded that to Google’s Firebase. I would rather keep my website in a Git repository instead of PHP and MySQL. There is another Wordpress plugin that will export all your content to Hugo compatible files that I used to migrate my content.

Content Security Policy (CSP) Report URI for free

Content Security Policy (CSP) is a great way to protect your sites. You implement it by adding a header to your web server’s HTTP response. The hardest part, in my opinion, is finding out where you can report violations, without having to pay a penny. Using Google’s Firebase Free plan you can create a Cloud Function to handle the reports sent by browsers when a rule has been violated. The Cloud Function can be triggered by an HTTP request.

Cloudflare Firewall Rules to Protect WordPress

Cloudflare Firewall rules a protecting my site from a brute force attack from a botnet. Below I’ll show you how to use Firewall Rules to keep your WordPress site safe. With the Cloudflare free plan, it includes five free Cloudflare Firewall Rules. Cloudflare Firewall Cloudflare is using wirefilter, which is a Wireshark-like expression language that they have created. We will need to create two rules to properly protect our WP Dashboard.

Picking a CDN

When it comes down to picking a CDN (Content Delivery Network) provider there aren’t many options. There are a few things you will need to consider when deciding. After reading this post you will be able to make an educated decision on which is best for your project. It’s an interesting time for the web. When I first started building sites everything was static. I had no dynamic content, and essentially, my websites had no vulnerabilities.

S3 Go Proxy

This is the story of how I wrote an S3 Go Proxy. I was recently working on a project that needed a scalable storage solution. Since I planned on hosting this project on DigitalOcean I originally thought about using Block Storage. While Block Storage is fast, it isn’t easily scalable, and I don’t want to be responsible for resizing/adding storage. It didn’t take long to realize the ideal solution would be Spaces.