Build the Systems You Usually Just Use

Distributed systems, stream processing and AI infrastructure — not as slides and diagrams, but as systems you build from scratch, break, and reason about yourself.

  1. 1

    Understand

    Every guide starts with the concepts and trade-offs, and how systems like Kafka and Flink handle them.

  2. 2

    Build

    Implement the system in Go, chapter by chapter, from an empty folder to a running cluster.

  3. 3

    Break

    Kill nodes, drop messages and inject faults, then verify the system still behaves correctly.

Consensus, replication, leases and recovery, built into systems that survive failures.

GoKafkaRaftSerf

Building a Distributed Log

Inspired by Kafka

Build a Kafka-style replicated log from scratch — append-only segments, a binary wire protocol, Serf membership, Raft metadata consensus, pull-based replication and producer/consumer clients.

13 parts · about 5 hours

GoPostgreSQLRedisState machines

Building a Distributed Workflow Engine

Inspired by Conductor

Build a distributed workflow engine from scratch — a pure state machine, PostgreSQL as the source of truth, a transactional outbox, sharded Redis Streams, task leases and self-healing recovery.

11 parts · about 3.5 hours

Stateful, fault-tolerant computation over unbounded streams.

Coming soonGoRedisStreaming

Building a Stream Processor on Redis

Inspired by Flink

Build a Flink-style stream processing engine on Redis — operators, keyed state, windows, watermarks and checkpoint-based recovery.

The platform layer that lets AI agents run safely in production.

Coming soonAgentsMCPSandboxing

Building an Agent Platform

Infrastructure to run AI agents

Build the infrastructure that runs AI agents from scratch — an LLM gateway, the agent harness, sandboxed tool execution, MCP servers, and the security and governance layer around them.

From the blogFull archive ➔