PinnedMember-onlyHow to Structure a Golang ProjectA while back (2020), I published an article on How to Structure a Go Command-Line Project. Within that article, I stated that while there are many recommendations on structuring Go Projects, there is no set standard. The lack of a standard causes many new Gophers to question the best way…Golang5 min readGolang5 min read
Published in The Startup·PinnedMember-onlyHow to Structure a Go Command-Line ProjectI was recently restructuring one of my early Go side projects. As I was changing the project layout, I was reminded there are many recommendations out there but no set standard for structuring Golang projects. In other programming languages such as Java, there is a typical project layout that most…Golang7 min readGolang7 min read
Feb 1Member-onlyBoosting Resilience with Graceful Shutdown in Cloud-Native Golang ApplicationsGraceful shutdown is vital to building highly resilient systems in a cloud-native environment. When we build cloud-native applications that follow the “cattle and not pets” philosophy, creating and destroying instances of applications is standard operating procedure. This article will discuss why it’s important to implement graceful shutdown mechanisms and how…Programming11 min readProgramming11 min read
Jan 2Member-onlyMaximizing TCP Throughput in Linux: Understanding and Tuning Send and Receive BuffersA standard performance tuning recommendation for distributed systems running on Linux is to adjust the tcp_rmem and tcp_wmem Kernel tunables. But what are these? Why are they important? How do they work? In today's article, we are going to explore the tcp_rmem (Receive Buffer) and tcp_wmem (Send Buffer) work and…Networking6 min readNetworking6 min read
Sep 5, 2022Member-onlyAvoiding Data Races in Go: Best Practices for ConcurrencyConcurrency is such a foundational capability of the Go language that it is effortless to write code that leverages multiple goroutines, sometimes without even knowing. As an example, if you’ve ever used the net/http package to create a web service, you’ve used goroutines. To handle incoming HTTP traffic, the HTTP…Golang8 min readGolang8 min read
Aug 1, 2022Member-onlyBest Practices for managing BASH ScriptsLet’s face it, even with all the changes in how we run systems at scale, shell scripts are still a go-to tool in the DevOps & Site Reliability Engineers toolbelt. …Dev Ops5 min readDev Ops5 min read
Jul 5, 2022Member-onlyMaintaining Healthy TCP Connections in GolangWhile most systems these days integrate over gRPC or HTTP, quite a few applications still speak custom protocols. And many of these custom protocols don't have handy packages like net/http to manage all of the TCP connection creation and management. Today's article is for anyone working directly with TCP connections…Golang4 min readGolang4 min read
Sep 9, 2021Troubleshooting High I/O Wait in LinuxNote: This article is a republish of a 2012 blog post, Medium doesn’t support back dating… Forgive the dated material. Linux has many tools available for troubleshooting; some are easy to use, some are more advanced. …Linux5 min readLinux5 min read
Published in ITNEXT·Sep 7, 2021Member-onlyForcefully Closing TCP Connections in GolangWorking with TCP servers is a great way to become familiar with low-level network communications. When writing applications that communicate directly over TCP sockets a multitude of socket management steps are required. Actions that you typically don’t have to take for a typical HTTP-based application. Sometimes, those extra management steps…Software Development7 min readSoftware Development7 min read
Published in CodeX·Aug 9, 2021Creating Middleware with httprouterWhen working with HTTP-based services in Go, many developers (including myself) like to use HTTP Multiplexers (mux). Multiplexers, also sometimes referred to as Request Routers, offer a suite of features and capabilities. The simplest form allows users to register a specific handler function with specific URL patterns and methods. One…Software Development5 min readSoftware Development5 min read