back to blog

fafnir

Published: November 6, 2025

Last Updated: November 12, 2025

part 1

This project fafnir is a distributed and scalable microservice backend for trading platforms (will be simulated). I'm mainly coding everything in Go, but might use Python, Java, or C++ down the line depending on the service.

It's meant for my portfolio and to understand modern microservices, system design patterns, and best coding practices in building a scalable distributed application. It is not fully implemented yet, but I have been able to deploy on docker, connect multiple containers and services together, and utilize a bunch of technologies such as Redis, gRPC, GraphQL, Prometheus, and Grafana to name a few.

Here is a rough sketch of what I have right now of the system architecture:

Revised Dev Design of #1

Here is the related issue on GitHub: Implement NATS + auth validation logic #4

Going through, I have many more features to be implemented (check TODO on README), and hopefully learn something new

part 2

Here is the GitHub issue related to this part: kubernetes local implementation #5

I have now implemented Kubernetes as a deployment alternative instead of Docker Compose. I used something called minikube, which is basically a local Kubernetes cluster for well, local development and fast learning.

I also installed kubectl, which if minikube is the Kubernetes cluster, kubectl would be the user's control plane tool, or CLI, that interacts with the Kubernetes cluster. I then tested minikube with these following commands:

> minikube start
> minikube kubectl -- get po -A
> minikube dashboard
> kubectl create deployment hello-minikube --image=kicbase/echo-server:1.0
> kubectl expose deployment hello-minikube --type=NodePort --port=8080
> kubectl get services hello-minikube
> minikube service hello-minikube

# visit localhost address

With this, I was able to get started in migrating a multi-container deployment to a multi-node kubernetes cluster!

Or so I thought ๐Ÿ˜…

Turns out, it took a bit longer than I expected. I had to dive deeper into Kubernetes concepts like the kubelet, kube-proxy, etcd, services, deployments, and pods. I also needed to learn what a kubernetes manifest was and how to define and manage cluster resources declaratively.

After all that, I then revised my rough architecture design so many times (too many to count), but finally was able to get a workable and reasonable diagram:

Revised Dev Design of #1

It definitely took more time and rewrites than I expected, but I learned a ton about Kubernetes in the process. Up next, NATS implementation (lol)