Bossy Lobster

A blog by Danny Hermes; musing on tech, mathematics, etc.

Edit on GitHub

Reading Istio Secrets

Adopting a service mesh like Istio is a huge undertaking. (Let's set aside for this discussion whether it's a good idea to undertake.) A fairly common issue when getting a mesh up and running is misconfiguration. When trying to debug and determine where and how things are misconfigured, the network …

Edit on GitHub

Preventing PostgreSQL Deadlocks in Go

All About Locks

I've been writing a library for running PostgreSQL migrations in Go. One of the primary pieces of advice I keep coming across is

Beware of lock queues, use lock timeouts

In other words, each migration stage should happen instantaneously (or almost instantaneously). For real-time applications, if a migration runs "for …

Edit on GitHub

How Do Slices Gain Capacity in Go?

Looking Inside a Slice

The first thing to realize is that a slice in Go is really just a struct that wraps "header" information about (1) a pointer to the "real" underlying data, (2) the length and (3) the capacity without directly exposing those fields. We can use a struct …

Edit on GitHub

Difference Between localhost and

Note: In a docker container, a server can only be available outside of the container / pod if it is bound to the "any host" IP1. Binding a server to localhost / the loopback IP2 will mean the server is only reachable within the container / pod.

Consider the following Express …