System Design

Technical Journal // System Design
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.

Apr '26

10 years of lorbic.com architecture

Reviewing the technical evolution of this blog over a decade: from managed platforms and dynamic backends to a custom, zero-dependency Hugo architecture.

Feb '26

Building Production-Ready Background Workers in Python

Your background jobs crash on deployment, fail silently, and corrupt data. Here's how to fix it with worker pools, retry strategies, idempotency, and graceful shutdown. A guide to building production background processing systems that don't break under load. Tested at 20 req/sec.

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.