medhir.com

personal blog setup

I promised that when I first started this site that I would write a follow-up post about how it’s structured.

What started out as a single virtual machine on Amazon's EC2 has turned into a collection of services managed in a Kubernetes cluster on GKE.

The main entrypoint of the application is through Next.js, which is a server-side rendering framework for React. But there is also a Go server that contains all the site's APIs, and another dedicated deployment for authentication management.

Some people will probably look at this and scoff at how much is going on. It’s totally not necessary to start a Kubernetes cluster for a blog site! In fact, you probably shouldn’t!

Software design decisions depend greatly on the context. I've used "writing a blog" (perhaps better stated as building a blog) for quite some time as the stimulus for learning new technologies . Some things I have learned since first beginning work in 2018:

  • Go, the programming language
  • Creating containerized applications with Docker
  • Contributing to other software projects
  • Understanding the value prop of cloud services and evaluating their trade offs. I’m now familiar with both AWS and GCP
  • And of course, Kubernetes, for managing the various things I need to deploy in a fault tolerant manner

Slow, incremental progress towards designing and building my own system from scratch has resulted in lots of knowledge that is useful in other domains.

While this system is downright extra for one person writing a couple of articles a year (aka me 🤪), it has become a foundation on which I can build more interesting things. For instance, an interactive programming course that goes beyond the usual tutorial content by integrating an IDE directly in the browser.

a screenshot of medhir.com, with an example lesson writing a Go program, with a full environment for running code

Not sure where any of this is ultimately headed, but it's provided immense satisfaction to build something from scratch, and it serves as a great template for any web service I wish to build down the line.