Home/Writings/Distributed Systems

Lessons from My First Distributed System

The small surprises that appear when a program stops living in one process.

Figure 1A working loop for technical inquiry: observe the system, reason about its constraints, and build to test the model.

The first surprise was how many assumptions came from single-process programming. Function calls either returned or threw. State changed in one place. Time felt more like a sequence than a negotiation.

Once the system crossed process boundaries, every interaction needed a failure model. Requests could be duplicated, delayed, reordered, or lost. A node could be alive but useless. A timeout could mean failure, overload, or simply a slow network.

The biggest lesson was to design for uncertainty directly. Idempotency, explicit ownership, health checks, backpressure, and boring operational visibility matter because the system will eventually enter a state your local tests did not imagine.

Continue reading
Distributed Systems · 16 min read

How We Taught a Scheduler to Predict the Future

The engineering realities of building adaptive prioritization, predictive runtime modeling, and resilient coordination on top of PostgreSQL and why most simple queues fail under real workloads.

Read note
Distributed Systems · 14 min read

Raft Consensus and Failure

A look at why the easy part of consensus is the normal case.

Read note
Distributed Systems · 8 min read

Emergence in Complex Systems

Why distributed behavior can surprise you even when every local rule is simple.

Read note