Open in app

Sign In

Write

Sign In

Benjamin Cane
Benjamin Cane

482 Followers

Home

About

Pinned

How to Structure a Golang Project

A 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…

Golang

5 min read

How to Structure a Golang Project
How to Structure a Golang Project
Golang

5 min read


Published in The Startup

·Pinned

How to Structure a Go Command-Line Project

I 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…

Golang

7 min read

How to Structure a Go Command-Line Project
How to Structure a Go Command-Line Project
Golang

7 min read


Feb 1

Boosting Resilience with Graceful Shutdown in Cloud-Native Golang Applications

Graceful 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…

Programming

11 min read

Maximizing Resilience with Graceful Shutdown in Cloud-Native Golang Applications
Maximizing Resilience with Graceful Shutdown in Cloud-Native Golang Applications
Programming

11 min read


Jan 2

Maximizing TCP Throughput in Linux: Understanding and Tuning Send and Receive Buffers

A 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…

Networking

6 min read

Maximizing TCP Throughput in Linux: Understanding and Tuning Send and Receive Buffers
Maximizing TCP Throughput in Linux: Understanding and Tuning Send and Receive Buffers
Networking

6 min read


Sep 5, 2022

Avoiding Data Races in Go: Best Practices for Concurrency

Concurrency 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…

Golang

8 min read

Avoiding Data Races in Go: Best Practices for Concurrency
Avoiding Data Races in Go: Best Practices for Concurrency
Golang

8 min read


Aug 1, 2022

Best Practices for managing BASH Scripts

Let’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. The simplicity of BASH has kept it relevant, but even though we rely on these shell scripts daily, they are…

DevOps

5 min read

Best Practices for managing BASH Scripts
Best Practices for managing BASH Scripts
DevOps

5 min read


Jul 5, 2022

Maintaining Healthy TCP Connections in Golang

While 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…

Golang

4 min read

Maintaining Healthy TCP Connections in Golang
Maintaining Healthy TCP Connections in Golang
Golang

4 min read


Sep 9, 2021

Troubleshooting High I/O Wait in Linux

Note: 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. I/O Wait is an issue that requires advanced Linux tools and advanced usage of…

Linux

5 min read

Troubleshooting High I/O Wait in Linux
Troubleshooting High I/O Wait in Linux
Linux

5 min read


Published in ITNEXT

·Sep 7, 2021

Forcefully Closing TCP Connections in Golang

Working 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 Development

7 min read

Forcefully Closing TCP Connections in Golang
Forcefully Closing TCP Connections in Golang
Software Development

7 min read


Published in CodeX

·Aug 9, 2021

Creating Middleware with httprouter

When 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 Development

5 min read

Creating Middleware with httprouter
Creating Middleware with httprouter
Software Development

5 min read

Benjamin Cane

Benjamin Cane

482 Followers

Building payments systems at American Express. Author (https://amzn.to/3kuCFpz). Open-source contributor (https://github.com/madflojo).

Following
  • Erik Engheim

    Erik Engheim

  • Sultan Meghji

    Sultan Meghji

  • Jaana Dogan

    Jaana Dogan

  • AirbnbEng

    AirbnbEng

  • Matt Klein

    Matt Klein

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech