Moving to google Cloud

June 07 2017


One of the reasons for building this blog site is to be run with as little cost as possible to see what I could do on the ultra-low end, normally I'm working with 24 core monster servers (monster for me OK) and that can let you get pretty lazy in your coding so this was my complete change of pace - squeeze everything I could out of this site and run it on the cheapest server I could find (apologies if its a bit slow but you know it is running on a calculator).

AWS is awesome and I use it a lot at work so naturally it was a good starting place and they have a free tier they offer which gets you a low power server for 12 months at no cost. Now everything was running nice and smoothly but my free tier is just about up so its time for me to re-evaluate my hosting plans.

Option 1 - stay on AWS

This is the easiest option by far - no new servers to set up, no migration, no code changes, etc. BUT this is all about super low cost and what I have on AWS will cost me $15.32 USD per month, that's for a single linux t2.micro instance and a 30 Gb EBS drive. I realize 30 Gb is way more than I need but that's what was on offer in the free tier so I went all in. The cost is $11.72 for the server instance and $3.60 for the EBS disk.Today (06/06/2017) according to google $15.32 USD is $20.32 AUD and I will incur an overseas credit card charge for sure AND the bank never gives you the google rate so all up I don't even know what I'm in for but $20 hosting is way too much.

Option 2 - Move to Google Cloud

At first I assumed Google cloud offered the same 12 month free tier as AWS and that I could just move over and sit on them for another year and then make some decision after that time but after some research it appears Google's free Google Compute Engine (or EC2 or Elastic Cloud Compute for you people who only speak Amazonian) offer their super cheap junk low end server for free forever . Looks like I just found my new home.

Making it happen

Google Cloud is a bit different to AWS Cloud but thanks to this thing called Google its pretty easy to find exactly what you need. Stuff I searched for included "Google Cloud Elastic IP Address" and "Google Cloud Security Groups", its pretty easy to find out exactly what you need by sticking "Google Cloud" in front of the AWS name.

One small catch is your server must be based in the US, currently mine is expensive because it's based in Sydney and we get screwed over with the Australia Tax on everything (Check out how much an iPhone costs here). Looks like I'm moving to the US!

Setting up the instance was pretty simple and with some googling I had my Ubuntu Server up and running with .Net Core, HAProxy, and Supervisor up and running in no time. Then it is just a case of working out my SSL Certificates. Currently I'm using Lets Encrypt but .Net Websites don't like serving any files out of any folder so the auto-renew is a bit annoying. So I'm forking out some cash for a NameCheap SSL Key at a cost of $9 per year I think that's OK. Once i get that set up and installed it will be as simple as flicking the Cloudflare DNS Settings and I'm off...