Optimizing Large File Transfers in Linux with Go - An Exploration of TCP and Syscall

As I experiment with Raspberry Pi and other devices in my network, I have created a small network application to aid in device discovery using multicast, data collection, and other functions. One key feature of this application is the ability to download various data and metrics from some plugins weekly. With file sizes ranging from 200 MB to 250 MB after applying some compression, it’s essential to carefully consider some approaches for sending these files over TCP using Go....

January 30, 2023 · 9 min · Me

A simple example of using unix domain socket in Kubernetes

In my previous post, Understanding Unix Domain Sockets in Golang, I mentioned that one potential use case for Unix domain sockets is to communicate between containers in Kubernetes. I received requests for an example of how to do this, so in this post, I’ll provide a simple example using two Go applications that you can find in this repository. Using Unix domain sockets in Kubernetes can be an effective way to communicate containers within the same pod....

December 16, 2022 · 4 min · Me

Understanding Unix Domain Sockets in Golang

In Golang, a socket is a communication endpoint that allows a program to send and receive data over a network. There are two main types of sockets in Golang: Unix domain sockets (AF_UNIX) and network sockets (AF_INET|AF_INET6). This blog post will explore some differences between these two types of sockets. Unix domain sockets, a.k.a., local sockets, are used for communication between processes on the same machine. They use a file-based interface and can be accessed using the file system path, just like regular files....

December 5, 2022 · 8 min · Me