Rate Limiting HTTP Requests in Go based on IP address

If you are running HTTP server and want to rate limit requests to the endpoints, you can use well-maintained tools such as github.com/didip/tollbooth. But if you’re building something very simple, it’s not that hard to implement it on your own.

Golang Interfaces Explained

For the past few months I've been running a survey which asks people what they're finding difficult about learning Go. And something that keeps coming up in the responses is the concept of interfaces. I get that. Go was the first language I ever used that had interfaces, and I...

High availability with nats-streaming-server (fault-tolerance)

I wanted to set up a fault tolerant nats-streaming-server, but couldn’t find a “quick” guide on how to do it - so here we are. I would also recommend you to read a previous post I wrote about how to do it using the clustering method. Why not Clustering Clusteri...

Progresses

Caddy Partnership With Light Code Labs

Ardan Labs (a leader in building Go enterprise software) is excited to announce that we have partnered with Light Code Labs and Matt Holt to bring Caddy into the Ardan Labs family of products and services. Caddy is a lightweight ingress service written in Go that provides automat...

Drawing Waveforms in Flutter

In the previous article, I explained what data we needed to generate waveforms and showed how to use a BBC Free Open Source Software to generate that data. In this article, I will show how to draw a waveform using Google’s Flutter UI toolkit for mobile, desktop and web. Her...

Watch out for Compiler Optimizations

An Open Letter To The Go Team About Try

“Once a language gets complex enough, programming in it is more like carving out a subset from an infinite sea of features, most of which we’ll never learn. Once a language feels infinite, the costs of adding further features to it are no longer apparent". - [Mark Miller...

Generating Waveform Data - audio representation

Audio visualization is a fascinating topic. We often take it for granted, but sound isn’t visible and only exists over time. In the case of a video stream, you can pick a frame/image and you have a snapshot of the video at this specific time. But you can’t do that wit...

Faster Docker builds using go modules

Quick tip to improve the docker build speed using go modules. Normally, I would do something like this: FROM golang as builder ENV GO111MODULE=on WORKDIR /code ADD . . RUN go build -o /app main.go FROM gcr.io/distroless/base EXPOSE 8080 WORKDIR / COPY --from=builder /app /usr/b...