Skip to content

HueCodes/Aulon

Aulon

Aulon is a NATS-core-compatible message broker built thread-per-core on tokio-uring, with io_uring fixed buffers registered against the kernel via IORING_REGISTER_BUFFERS and a subscription router sharded by L3 cache domain. The publish hot path is allocation-free by construction: PUB parsing, trie matching, and MSG emission all operate over borrowed bytes into pre-registered buffers.

In-VM, single-process bench client. Bare-metal moves to v0.2. Publish-to-deliver latency, 4 subscribers, 256 B payload, 50,000 iterations + 1,000 warmup; OrbStack Ubuntu 25.04 VM (kernel 7.0.5-orbstack, aarch64, 8 vCPU) on an Apple M2 host, server pinned to CPU 0, client to CPU 1, 2026-05-26:

backend p50 p99 p99.9
Aulon (pace_window=2, single-in-flight) 29 us 48 us 62 us
nats-server 2.10.24 (pace_window=0, unpaced) 53 us 1.6 ms 1.9 ms

Reproducer: bash bench/headline.sh. Each backend runs at the smallest pace its measured behaviour permits: the bench client's single tokio_uring runtime cannot drive nats-server cleanly at pace=2 (its outbound batching stalls the publisher loop) and Aulon's pace=0 numbers are dominated by the same runtime's task-queue depth, not the broker. The multi-process bench client and the bare-metal headline are open follow-ups; see PERFORMANCE.md for the full distribution, the ring-buffer fix that tightened the tail on 2026-05-26, and the stranger-read review under docs/reviews/release-v0.1.md.

This is a single-node broker. JetStream, clustering, gateways, leafnodes, TLS, and authentication are out of scope for v1. The wire protocol implements the verbs needed for the official nats CLI and nats bench to run unmodified (CONNECT, PUB, SUB, UNSUB, MSG, PING, PONG, INFO, +OK, -ERR) with full * and > wildcard and queue-group support. See docs/SCOPE.md for the compatibility matrix and docs/design/INDEX.md for the decisions behind the implementation.

The workspace: aulon-proto (#![no_std]-clean, allocation-free wire codec, fuzzed and proptested), aulon-core (per-core runtime, fixed-buffer pool, wildcard trie, topology, loom-tested cross-shard inbox), aulon-server (the binary), aulon-bench (HDR-histogram benchmark client). Dual-licensed under MIT and Apache-2.0.

Status

v0.1.0. Operator surface complete: graceful SIGTERM drain, admin listener with /healthz + /readyz + /metrics + /version, structured logs (JSON behind a flag), CLI + TOML config with typo guard, --version with git SHA and rustc, Dockerfile, systemd unit, and a reproducible release script. The bare-metal headline number and the multi-process bench client carry to v0.2 (the M5 host is not yet available, so the v0.1 chart ships with explicit OrbStack VM provenance). Per-checkpoint reviews are under docs/reviews/, the measurement log is PERFORMANCE.md, the release notes are docs/release/v0.1.0.md, the changelog is CHANGELOG.md, and one written-up debugging story is docs/war-stories/loom-tokio-cfg.md. A two-second asciinema cast of the official nats CLI publish-and-subscribe round-trip against Aulon is at docs/aulon-nats-demo.cast (open with asciinema play).

Install

Three supported v0.1 surfaces (see docs/operator/deploy.md for the full reference):

# Container
docker build -t aulon:0.1.0 .
docker run --rm -p 4222:4222 -p 8222:8222 aulon:0.1.0

# systemd
bash scripts/release.sh
sudo install -D release-out/aulon-server-0.1.0-*-linux /usr/local/bin/aulon-server
sudo install -D packaging/aulon.service /etc/systemd/system/aulon.service
sudo systemctl enable --now aulon

# Manual
./aulon-server --config /etc/aulon/aulon.toml

Aulon listens on 0.0.0.0:4222 (NATS-core wire) and 127.0.0.1:8222 (admin: /healthz, /readyz, /metrics, /version). Probe with curl http://localhost:8222/healthz. Tunable knobs in docs/operator/config.md.

Build

cargo build --release
cargo clippy --all-targets --all-features -- -D warnings
cargo test

Aulon is Linux-only (it depends on io_uring). See docs/design/dev-environment.md for the macOS-host + OrbStack-VM workflow.

Reproducing the benchmarks

bash bench/echo.sh        # single-connection echo RTT, HDR histogram
bash bench/fanout.sh      # 1-publisher / N-subscriber fanout latency
bash bench/headline.sh    # Aulon vs nats-server back-to-back

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

About

NATS-core broker on tokio-uring + io_uring fixed buffers

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors