Originally this blog was hosted on Amazon Web Services, using a Amazon Simple Storage Service (S3), Amazon CloudFront and Amazon Route53. I have now completed a migration to Google Cloud Platform.
Originally I had planned to use Google Cloud Platform's (GCP) equivalent services:
- Amazon Simple Storage Service (S3) with Google Cloud Storage (GCS)
- Amazon CloudFront with Google Cloud CDN
- Amazon Route53 with Google Cloud DNS
However after exploring further I realized two things:
- To use Google Cloud CDN, you need to use Google Cloud Load Balancer (GCLB), which currently costs around USD $18 per month.
- Google Cloud CDN is not required when using Google Cloud Storage (GCS) as Google Cloud Storage leverages Google's caching network and your objects are cached close to your users as part of the service.
After discovering this, I realized that the CDN was not needed. I just needed to point the DNS records of my domain to a Google Cloud Storage bucket. However, I then realized that when using a custom DNS record in front of a Google Cloud Storage bucket, only HTTP is supported, your content will not be served over HTTPS - you can of course use a Google Cloud Load Balancer in front of the bucket and use your own certificate, but HTTPS is not served when using the CNAME solution.
Even though I do not have any sensitive content, I prefer to serve all my content over HTTPS by default. Not being able to do that from a bucket was a show stopper.
It didn't take long before I realized that the solution to serving a static website on Google Cloud Platform is to use Google Firebase Hosting.
Google Firebase Hosting provides static content hosting via a global content delivery network using a Firebase domain or a custom domain, over HTTPS.
Using the Firebase SDK, I had my static Jekyll blog website deployed in seconds, serving over HTTPS on my own custom domain. With Firebase's generous free tier, this blog will probably cost me nothing per month, versus the few dollars it used to cost me per month on Amazon.
The final setup was:
- Google Domains - Registrar for domain name
- DNS with Google Domains - DNS provided by free if your registrar is Google Domains
- Google Firebase Hosting - Static website hosting with global content delivery network (CDN)