This page documents the evolution of Walrus from a single-node WAL library to a distributed message streaming platform.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nubskr/walrus/llms.txt
Use this file to discover all available pages before exploring further.
Version 0.3.0
Distributed Message Streaming Platform
Walrus 0.3.0 represents a major architectural evolution, transforming the single-node WAL engine into a fault-tolerant distributed system.Raft Consensus
Integrated Raft consensus (Octopii) for metadata coordination across cluster nodes.
Segment-Based Sharding
Topics split into segments with automatic leadership rotation for load balancing.
Lease-Based Write Fencing
Only designated leaders can write to segments, preventing split-brain scenarios.
Automatic Rollover
Monitor loop triggers segment rollover when threshold exceeded (~1M entries).
New Features
TCP Client Protocol
Simple length-prefixed text protocol for producers and consumers:Interactive CLI
Newwalrus-cli binary for cluster interaction:
Comprehensive Test Suite
Integration tests for distributed scenarios:cluster-test-logs- Basic smoke testcluster-test-rollover- Segment rollovercluster-test-resilience- Node failure recoverycluster-test-recovery- Cluster restart persistencecluster-test-stress- Concurrent writescluster-test-multi-topic- Multiple topics
Architecture Components
Node Controller
Node Controller
Routes client requests to appropriate segment leaders, manages write leases synchronized every 100ms, tracks logical offsets for rollover detection.
Raft Engine (Octopii)
Raft Engine (Octopii)
Maintains consensus for metadata changes only (not data path). Handles leader election and log replication across nodes.
Cluster Metadata
Cluster Metadata
Raft state machine storing topic → segment → leader mappings, sealed segment counts, and node addresses.
Storage Engine
Storage Engine
Wraps Walrus engine with lease-based write fencing. Only accepts writes if node holds lease for that segment.
Configuration
New environment variables:| Variable | Default | Description |
|---|---|---|
WALRUS_MAX_SEGMENT_ENTRIES | 1000000 | Entries before rollover |
WALRUS_MONITOR_CHECK_MS | 10000 | Monitor loop interval |
Breaking Changes
Version 0.2.0
Batch Operations and io_uring
This release focused on performance improvements through batch operations and asynchronous I/O.New Features
Atomic Batch Writes
Performance Benefit
Batch operations reduce syscall overhead and enable io_uring optimizations on Linux.
Batch Read Operations
io_uring Support
On Linux, Walrus can leverage io_uring for asynchronous batched I/O operations, significantly improving throughput.Disable io_uring with the
WALRUS_DISABLE_IO_URING environment variable if compatibility issues arise.Dual Storage Backends
Two backend implementations:FD Backend
Uses
pread/pwrite syscalls for file operations. Compatible with all platforms.Mmap Backend
Memory-mapped I/O for improved read performance. Default on most platforms.
Namespace Isolation
New_for_key constructors for multi-tenancy:
Improvements
Fsync Modes
Fsync Modes
Added
FsyncSchedule::SyncEach for durability and FsyncSchedule::NoFsync for maximum throughput.Enhanced Documentation
Enhanced Documentation
Comprehensive architecture documentation, design docs, and API reference improvements.
Expanded Benchmarks
Expanded Benchmarks
Added benchmarks for batch operations comparing Walrus against Kafka and RocksDB.
Bug Fixes
- Fixed: Tail read offset tracking in concurrent scenarios where multiple readers access the same topic
- Fixed: Edge case in cursor advancement when segment boundaries align with read batch sizes
Version 0.1.0
Initial Release
The first public release of Walrus as a standalone Write-Ahead Log library.Core Features
WAL Functionality
Append-only log storage with sequential write guarantees.
Topic-Based Organization
Logical separation of data streams into named topics.
Consistency Modes
Configurable fsync policies for durability vs. throughput tradeoffs.
Persistent Cursors
Read offset tracking survives process restarts.
API Example
Benchmarks
Initial benchmark suite comparing Walrus against industry-standard systems:- RocksDB Write-Ahead Log
- Apache Kafka (single broker)
Memory-Mapped I/O
Implemented mmap-based backend for improved read performance on sequential workloads.Future Roadmap
Planned features for upcoming releases:Multi-Segment Writes
Allow concurrent writes to multiple segments within a topic for higher aggregate throughput.
Compression
Optional compression for sealed segments to reduce storage overhead.
Read-Ahead Caching
Predictive caching for sequential read workloads to improve latency.
Replication
Data-level replication across nodes for durability (currently metadata-only).
Feature roadmap is subject to change based on community feedback and project priorities. See Contributing to help shape future development.
Version Support
| Version | Status | Support |
|---|---|---|
| 0.3.x | Current | Active development |
| 0.2.x | Maintenance | Security fixes only |
| 0.1.x | End of Life | No longer supported |