Architecture

Technical Journal // Architecture
Jul '26

Designing a Rate Limiter

A full system design of a production rate limiter. Covers every major algorithm (token bucket, sliding window, leaky bucket, fixed window), their tradeoffs, how they break in a distributed system, how Redis fixes them, and how Stripe, Cloudflare, and API gateways actually deploy this in production.

Jul '26

How Multi-Tenant SaaS Actually Works

A complete system design of Relay, a multi-tenant AI API gateway. Covers multi-tenant database architecture (silo vs pool vs bridge), API key authentication, provider routing with failover, dual-layer rate limiting, token-based billing, response caching, row-level security, tenant provisioning, and observability. Full Postgres schemas, mermaid diagrams, and Go snippets included.

May '26

Why Explaining Technical Difficulty is Hard

"It's just a simple query". Why the distance between a logical requirement and its infrastructure cost is the most expensive gap in engineering.

May '26

Just About Go Time

A breakdown of the absolute absurdity of human time, monotonic clocks in Go, and the one true way to store time across PostgreSQL, Couchbase, and mobile clients.

Apr '26

Why Your Goroutines Need a Speed Limit: Bounded Concurrency in Go

Unbounded concurrency is a reliability nightmare. Learn how to protect your system from OOM kills and database exhaustion by implementing Semaphores and Worker Pools in Go.

Apr '26

Part 2: Decoupling the Renderer: Terminal to Raylib in One Interface

If your game logic knows about OpenGL, your architecture has failed. This post dissects the Interface Segregation Principle in Go, demonstrating how the Derelict Facility engine swapped an ANSI terminal renderer for hardware-accelerated Raylib without changing a single line of game simulation code.

Jan '26

OLTP vs OLAP - Why You Need Two Databases

"The database that runs your app cannot be the database that analyzes your app". It's a hard lesson learned at scale. Early on, Postgres does it all. But as you hit massive scale, your analytics queries start killing your login APIs. This post breaks down the physics of Row-oriented (Couchbase) vs Column-oriented (ClickHouse) databases, and how to bridge them using Change Data Capture (CDC) for a robust, lag-free architecture.