May's Notebook

thoughts on code, coffee & clouds

April 10, 2026

Connection Pooling Pitfalls in High-Concurrency Go Services

After spending a week debugging intermittent 502s in production, I traced it down to a subtle interaction between pgx connection pool settings and our Kubernetes readiness probes. Here's what I learned about idle connection timeouts.

GoPostgreSQLProduction
March 28, 2026

Building a Token Cost Tracker for Multi-Model LLM Pipelines

When you're routing requests across GPT-4, Claude, and Gemini with different pricing tiers, tracking cost-per-request becomes surprisingly tricky. I built a lightweight middleware that handles it elegantly.

LLMObservabilityArchitecture
March 15, 2026

Caddy as a Production Reverse Proxy: Patterns I Keep Reusing

After migrating three services from Nginx to Caddy, these are the configuration patterns that have become my defaults. Automatic HTTPS is just the beginning.

CaddyDevOpsTLS
February 22, 2026

Understanding Redis Memory Fragmentation Under Write-Heavy Workloads

Our Redis instance was using 3x the expected memory. The culprit was memory fragmentation from a specific pattern of frequent small key deletions and recreations. Here's the deep dive.

RedisPerformanceDebugging
February 8, 2026

Migrating to Go slog: A Pragmatic Guide

The standard library finally has structured logging. I migrated a 50K-line codebase from zerolog to slog. Here's the migration strategy, the gotchas, and whether it was worth it.

GoLogging