Hi there 馃憢

Welcome to Backend Byte! This blog is dedicated to sharing knowledge and experiences in backend development, focusing on Go, Kubernetes, PostgreSQL, and modern cloud-native technologies.

Here you’ll find practical guides, tips, and real-world solutions to common backend challenges.

Understanding Go's net/http Package: A Comprehensive Guide

Go鈥檚 net/http package is a powerful and versatile library for building HTTP clients and servers. It provides a robust set of tools for handling HTTP requests and responses, making it an essential component for web development in Go. This article will dive deep into the net/http package, exploring its core concepts, key features, and practical applications. Overview of the net/http Package: The net/http package is part of Go鈥檚 standard library and offers a high-level interface for HTTP client and server implementations. It abstracts away many of the complexities involved in network communication, allowing developers to focus on application logic rather than low-level network details. ...

July 9, 2024 路 5 min 路 1030 words 路 Backend Byte

Optimizing PostgreSQL for Large-Scale Data Insertions: From INSERT to COPY and Beyond

When dealing with massive datasets in PostgreSQL, efficiency becomes crucial. Recently, I faced a challenge while inserting 20 million records into a database while working on one of my hobby projects. This experience led me to explore various optimization techniques, from query optimization to server configuration tweaks. The Journey from INSERT to COPY Initially, I used the traditional INSERT approach, which proved to be excruciatingly slow, taking hours to complete. This prompted me to search for a more efficient solution, leading me to the COPY command. ...

July 8, 2024 路 4 min 路 663 words 路 Backend Byte

Race Condition between Database and Application in Docker Container

In the realm of containerized applications, particularly those orchestrated with Docker, developers often encounter a subtle yet critical challenge: managing the startup sequence of interdependent services. One of the most common and potentially problematic scenarios is the race condition that can occur between a database container and an application container. This article will provide an in-depth exploration of this race condition, with a focus on Go-based applications, and offer strategies to mitigate it effectively. ...

July 8, 2024 路 6 min 路 1099 words 路 Backend Byte

ArgoCD configuration on Bare metal with nginx-ingress and cloudflare tunnel

Before starting, lets visualize a illustration how it works User initiates a request to a web application hosted on a cluster server. DNS resolution directs the user to Cloudflare. Cloudflare acts as a reverse proxy, terminating the SSL/TLS connection and initiating a tunnel to the Nginx ingress controller in the Kubernetes cluster. The Nginx ingress controller routes the request based on the Host header to the appropriate service within the cluster. The service distributes traffic across pods running the application. A selected pod processes the request and generates a response. The response travels back through the Nginx ingress controller, Cloudflare tunnel, and finally to the user鈥檚 device. ...

May 18, 2024 路 4 min 路 718 words 路 Backend Byte