Technical Blogs


gRPC Name Resolution and Load Balancing on Kubernetes

Managing microservices in Go that communicate via gRPC on Kubernetes is a really common theme these days. You might have noticed that Load Balancing these gRPC requests and responses is not trivial. In my recent article I tried to dive deep in to the realm of gRPC Name Resolution and Load Balancing on Kubernetes in order to unwrap almost everything that we need to know regarding the matter, from the (tricky) problems we're facing all the way to the solutions and implementation details.

Keywords: #go, #golang, #microservice, #grpc, #kubernetes, #loadbalaning, #nameresolution

 Homayoon Alimohammadi
 Feb 2024


Protoc Plugins in Go: gRPC-REST Gateway From Scratch

gRPC-REST gateway is one of the most popular projects in the gRPC-Ecosystem. Since I really like to understand how things work under the hood and how they are implemented, I decided to try and build a minimal gRPC-REST Gateway from scratch. If you are interested as well, make sure to read through the article as I’ve learned a bunch while trying to code it up...

Keywords: #go, #golang, #microservice, #proxy, #grpc, #grpc-web #grpc-rest-gateway, #grpc-gateway

 Homayoon Alimohammadi
 Jan 2024


Golang: Ensuring Data Integrity with Access Proxies

Dealing with an ever changing data can be tough. Especially when you’re trying to keep track of the original values at a given time...

Keywords: #go, #golang, #microservice, #proxy, #access_proxy

 Homayoon Alimohammadi
 Sept 2023


Enhancing gRPC Error Handling in a Microservice Architecture

Error handling and the way it is done is a crucial part of software engineering. Poorly returned errors and non-informative ones can cause unimaginable headaches. In this article I'm going to demonstrate the problems that I've faced with regards to gRPC error handling and what we might be able do to in order to improve upon our originally not-so-useful gRPC errors...

Keywords: #grpc, #error, #go, #golang, #microservice

 Homayoon Alimohammadi
 Aug 2023


Handling JSON in Go

In Go, the encoding/json package offers built-in JSON marshaling and unmarshaling capabilities, allowing us to effortlessly convert Go data structures to JSON and vice versa. However, there are scenarios where the default behavior falls short, such as handling complex data structures, managing custom field names, or dealing with special data types. This article aims to provide an introduction on how JSON can be handled in Go, and as always, with a bit of customization...

Keywords: #go, #golang, #json

 Homayoon Alimohammadi
 July 2023


Protoc Plugins with Go

In this article we take a look at Protocol Buffers (protobufs) and explore the intricate workings of protoc plugins in the context of Go programming. With a focus on demystifying protoc plugins and their role in code generation, we walkthrough a humble overview of the inner workings of plugins with practical snippets...

Keywords: #go, #golang, #protoc, #protobuf, #protocolbuffers

 Homayoon Alimohammadi
 June 2023


Circuit breakers (in Go)

Circuit breakers are a fundamental and basic, yet vital part of a system, especially if you are dealing with a micro-service architecture. Recently one of my colleagues was wondering what these "proxy like" pieces of code do, and while explaining to him, I figured although I kind of know what a circuit breaker is at a high level, I don't really know what is going on under the hood. So I decided to dig deeper and share what I've found...

Keywords: #go, #golang, #circuitbreaker, #microservice

 Homayoon Alimohammadi
 May 2023


Golang: to Point or not to Point!

Pointers have numerous benefits and to imagine coding without them, let's say it's not so pleasant. But they do have cons, one of them (at least for me) might be that they can cause confusion and may even break the code if not used with caution...

Keywords: #go, #golang, #pointer

 Homayoon Alimohammadi
 April 2023