I'll be back Shasta

I'll be back Shasta

Sup guys I’m back and I have something for you nerdy hikers. If you’re impatient enough please feel free to skip to the bottom of the post to get the details.

Few weeks ago I’ve made an attempt to summit mt. Shasta in northern California - from Bunny flats, via Horse camp, 50/50, Helen lake, Red banks. Reached the bottom of Misery hill (4km point) and turned back.

TLS termination using Nginx and application/json error handling

TLS termination using Nginx and application/json error handling

This is quite common nowadays to have some TLS terminatin reverse proxy in front of your REST API. Nginx is being used frequently for this purpose.

The problem I faced and spent some time trying to resolve is that API backing Nginx responds in JSON, but if something is wrong with the request itself or Nginx can’t reach the backend Nginx returns error page in ‘text/html’.

Static Site on Google Cloud Storage: Caching

Static Site on Google Cloud Storage: Caching

Be aware Google Cloud storage sets Cache-Control:public, max-age=3600 header for all files by default. This means files are going to be cached by browsers and proxies so it is going to take up to an hour for folks on the Internet to see an update.

I’ve decided to decrease default max-age value to 600. So I upload blog files with -h option set now:

gsutil -h "Cache-Control:public, max-age=600" rsync -d -r . gs://<bucket_name>/
0xDEAD Unicornz Ascending to a Cloud

0xDEAD Unicornz Ascending to a Cloud

What time is it? Migration time! Long story short I’ve decided to play a bit with Google Cloud services and Go. I’m really impressed with the platform so far - it’s awesomely documented and super easy to use. I was impressed to the point I’ve decided to move my blog from a VPS to Google Cloud Storage just to see how it goes.

Here is a step by step instruction