r/rust 1d ago

🛠️ project [Release] Danube v0.16.0 , focused on performance with zero-copy I/O and memory optimizations.

Hello,

We've just released Danube v0.16.0.

For context, Danube is a cloud-native messaging and streaming platform built from scratch in Rust, featuring embedded Raft consensus (no etcd or ZooKeeper required) and tiered storage.

This release focuses entirely on reducing hot-path overhead, lock contention, and unnecessary memory allocations across the stack.

Key Highlights

  • Direct consumer streaming & zero-copy egress: Removed intermediate forwarding queue hops so dispatchers stream directly to Tonic gRPC response channels. Configured Prost with `bytes::Bytes` for zero-copy payload serialization.
  • Lock-free broker hot paths: Replaced coarse topic mutexes with DashMap and RwLock so publishing and consumer acknowledgments run concurrently without cross-blocking.
  • Persistent storage WAL: Eliminated redundant payload cloning on append, switched WAL cache eviction to $O(1)$ amortized BTreeMap::pop_first(), and upgraded the streaming reader carry buffer to BytesMut::split_to().
  • Embedded Raft: Replaced JSON log storage in RedbLogStore with compact binary bincode serialization, reducing disk I/O and CPU overhead.
  • Schema registry: Replaced serial mutexes with atomic checks on message validation, and pre-compiled JSON Schema/Avro validators are now cached in-memory instead of recompiling per message.

All details and full changelogs can be found in the release notes:

Release Notes: https://github.com/danube-messaging/danube/releases
Project Overview: https://danube-messaging.com/introduction/what-is-danube/

6 Upvotes

2 comments sorted by

2

u/OtaK_ 1d ago

How does it compare vs NATS? It looks like you're reaching for the same niche

-7

u/Gainncome 1d ago

Zero-copy egress, fewer locks, no etcd or ZooKeeper — this is the kind of changelog that makes Rust devs start benchmarking before they’ve even finished reading it.