A deep dive into building a production-grade HTTP/1.1 server using Tina, a thread-per-core framework written in Odin, without async/await or coroutines. The architecture uses three Isolate types (Listener, Connection, Dispatcher) modeled as state machines communicating via message passing — similar to the Actor model. Single-shard and multi-shard modes are explained, along with how the handler API stays synchronous and clean. Pre-allocated memory ensures predictable load shedding instead of OOM crashes. The framework also enables Deterministic Simulation Testing (DST), allowing replay of exact network fault sequences including dropped packets and slowloris attacks using a seed value.

7m read timeFrom p99conf.io
Post cover image
Table of contents
The Mental Model: Isolates and ShardsDeconstructing HTTP: Control Plane vs. Data PlaneThe Handler Contract: Synchronous Code, Predictable StateEscaping the HTTP SandboxDeterministic Simulation TestingSee it in Action
16 Impressions