Typhon Database: Three Configurable Durability Modes in a Single WAL for Flexible Workloads
By
Loïc Baumann
Baker's choice. Dense with flavour, light on filler.
Summary
This article is part of a series about building a database engine called Typhon in C#. It discusses how Typhon implements three different durability modes (Full, Kernel, and Async) within a single Write-Ahead Log (WAL), allowing developers to choose durability guarantees per commit rather than at boot time. The author explains the trade-offs between performance and safety across these modes, drawing inspiration from game engine data management techniques. The article covers technical implementation details including fsync strategies, kernel-level caching, and asynchronous write patterns.
Key quotes
· 4 pulledMost databases pick one durability strategy at boot time. Typhon picks one per commit — and the surprising part isn't the user-facing API, it's that all three modes share the same Write-Ahead Log.
The Full durability mode calls fsync on every commit. This is the slowest option, but it guarantees that once a commit returns, your data is on disk.
Kernel durability is the middle ground. The data reaches the operating system's page cache, so a process crash won't lose it, but a power failure might.
Async durability never calls fsync at all. The WAL writes to the page cache and returns immediately. This is the fastest option, but it offers no durability guarantees whatsoever.
You might also wanna read

Typhon: A .NET Database Engine Built for Game Servers Using ECS Architecture
Typhon is an embedded, persistent, ACID database engine written in .NET specifically designed for game servers and real-time simulations. It

Building a High-Performance Database Engine in C# for Game Servers and Real-Time Simulations
The article explains why the author chose C# to build Typhon, a high-performance embedded database engine for game servers and real-time sim
Understanding SQLite's Durability Settings and Performance Trade-offs
The article examines SQLite's durability settings, highlighting the confusion and conflicting information in its documentation regarding whe
SQLite WAL Mode Default Settings Compromise Durability by Skipping Fsync on Commits
SQLite's WAL (Write-Ahead Logging) mode with default synchronous=NORMAL setting does not perform fsync operations on each commit, which can
Exploring Persistence and Durability in Key-Value Databases
The article discusses the author's experience working on a key-value database, exploring different approaches for persistence and durability

Understanding Data Durability with the fsync System Call in Linux
The article discusses the durability guarantees provided by the fsync system call in Linux, particularly focusing on the potential data loss
puzpuzpuz.dev·10mo ago