All Stories

High-Performance JSON Serialization: Benchmarking Oj, Blueprinter, and Fast JSON API

The last place I look when an API endpoint is slow is the serializer, and that’s a mistake. On a typical list endpoint the serializer is where most of the...

Multi-tenant Database Routing and Connection Pooling in Go microservices

The simplest multi-tenant design in Go is also the most dangerous: one *sql.DB per tenant, looked up from a map at request time. It works beautifully for ten tenants and...

Guaranteed JSON Formats: Grammars and Regex-Constrained LLM Decoding

Prompting a model to “return valid JSON” fails at a rate that is invisible until it isn’t: at low volume a 2% malformed-output rate is a retry. At 5M calls/day,...

Prompt Caching Strategies to Reduce LLM Latency and API Costs

Every RAG or agent application I’ve reviewed re-sends the same few thousand tokens on every request: the system prompt, tool schemas, a hundred pages of policy docs, the conversation so...

The Rails 8 Solid Suite: Moving to a Zero-Dependency Stack

Rails 8 (November 2024) did something bold: it made the database the default home for everything that used to need Redis. Solid Queue for background jobs, Solid Cache for the...

Go Scheduler Deep Dive: Work-Stealing, Preemption, and OS Thread Matching

Go’s concurrency story rests on one runtime component most engineers never look at: the scheduler. If you have ever seen a service with 300,000 goroutines and 12 cores stay responsive,...