BlogRSS →
Writing
Notes and longer pieces on ML systems, distributed systems, and infrastructure.
Infra
All 6 →2026-05-01A $22/Year VPS Running Three Self-Hosted ServicesRunning Obsidian LiveSync, Matrix Synapse, and Calibre-Web on a $22/year VPS — nginx reverse proxy, Docker Compose, Cloudflare tunnels, and what actually fits in 2.9GB RAM.→2026-04-21Three Useful Services on a $22/Year VPSA minimal self-hosting stack on a budget VPS — three useful services (sync, chat, library) running on Docker Compose behind nginx, for under $22 a year.→2026-02-17From Manual Deploys to SHA-Tagged Containers: CI/CD for a K8s PlatformSHA-tagged Docker images replace mutable latest tags, eliminating silent overwrites in CI/CD pipelines. Docker Buildx, multi-arch builds, and dynamic workflow generation for a Kubernetes platform.→2026-02-16Hunting OOMKilled in Kubernetes: Four Memory Leaks That Almost Took Down Our PlatformFour memory leaks inside OOMKilled Kubernetes pods — slow async accumulation in Python services, unclosed client sessions, unbounded caches, and how to track each one down without a profiler.→2026-01-23SSE in FastAPI: The Tab Closed and My “Done” Code Never RanServer-Sent Events in FastAPI silently drop cleanup code when a browser tab closes. How to detect client disconnects and ensure generator cleanup runs reliably.→2025-12-26End-to-End HTTPS with Cloudflare Origin Certificates and NginxEnd-to-end HTTPS with Cloudflare Origin Certificates and Nginx — full-strict SSL mode, origin certificate installation, and Dockerfile configuration to eliminate 521 errors.→
Machine Learning
All 5 →2026-05-02KV Cache and PagedAttention: Why vLLM Actually WorksKV cache stores attention keys and values across tokens to avoid recomputation during autoregressive decoding. PagedAttention extends this with virtual memory paging, making vLLM's throughput possible.→2026-05-01LLM Inference Optimization: Stop Paying for Idle SiliconLLM inference is memory-bandwidth bound, not compute bound. Continuous batching, speculative decoding, quantization, and KV cache management — the techniques that actually move the needle.→2026-01-08Eigenvalues of a MatrixEigenvalues and eigenvectors — the linear algebra behind PCA, Google's PageRank, and the stability analysis of dynamical systems. Geometric intuition and computation.→2025-09-12 Parameters in LLMsHow to count parameters in a transformer LLM — attention heads, MLP layers, embeddings, and normalization. Includes a worked example matching published model sizes.→2025-09-06Matrix-Vector Dot ProductMatrix-vector dot products are the inner loop of neural network inference. Understanding the memory access patterns and FLOP counts explains why hardware utilisation matters so much.→
Notes
All 17 →2026-05-01Teaching Myself CS: The PlanA structured self-study plan for computer science fundamentals — algorithms, systems, databases, networks, and mathematics, with resources and a realistic timeline.→2026-04-20Building a Second Brain with Obsidian, Zettelkasten, and an AI AgentBuilding a second brain with Obsidian and Zettelkasten — atomic notes, linking ideas, periodic reviews, and an AI agent that surfaces connections you'd otherwise miss.→2026-04-15Fixing Silent $0 Streaming Costs in AgentBudget: An OSS ContributionAn OSS contribution to AgentBudget: fixing silent $0 costs for streaming responses by hooking into the token usage callbacks that LangChain emits post-stream.→2026-04-14Building a Local AI Stack: Hermes, Bifrost, Telegram, and CamoufoxBuilding a local AI stack: Hermes as the agent framework, Bifrost for LLM routing, a Telegram bot as the interface, and Camoufox for browser automation — all running on local hardware.→2026-03-13Freeseek: Turning DeepSeek's Web Chat into an OpenAI-Compatible APIFreeseek proxies DeepSeek's web chat interface into an OpenAI-compatible API endpoint, enabling local tools and agents to use DeepSeek R1 without an API key.→2026-03-02Fixing Parallel Tool Call Streaming in Bifrost: An OSS Bug HuntDebugging a parallel tool call streaming bug in Bifrost — how delta chunks from different tool calls interleave incorrectly and the fix that restores correct JSON assembly.→
Systems
All 16 →2026-05-02The Bulkhead Pattern: Isolating Failures Before They SpreadHow the bulkhead pattern isolates failures in distributed systems — partition thread pools, connection pools, and resources so one degraded dependency cannot sink the whole service.→2026-05-02CRDTs: Conflict-Free Replicated Data TypesCRDTs eliminate merge conflicts by design — commutative, associative, idempotent data structures that converge to the same state regardless of operation order. G-Counters, OR-Sets, and LWW registers explained.→2026-05-02Multi-Paxos: From Single Decree to a Replicated LogMulti-Paxos extends single-decree Paxos into a replicated log by electing a stable leader, skipping Phase 1 for subsequent entries, and batching proposals for throughput.→2026-05-02Raft Log Compaction: Keeping the Log from Growing ForeverRaft logs grow forever if left unchecked. Log compaction via snapshots lets nodes discard old entries, transfer state to slow followers, and recover quickly after a restart.→2026-05-02The Saga Outbox Pattern: Reliable Event Delivery Without Two-Phase CommitThe outbox pattern solves the dual-write problem in event-driven systems: persist events to a local outbox table in the same transaction as your domain change, then relay them reliably.→2026-05-02How Spanner Does Distributed Transactions Without Classic 2PCGoogle Spanner achieves globally consistent distributed transactions using TrueTime — bounded clock uncertainty instead of classic 2PC, enabling external consistency at planetary scale.→