BMP collector
  • Rust 73.1%
  • Shell 25.6%
  • Cap'n Proto 0.7%
  • Dockerfile 0.3%
  • Starlark 0.2%
  • Other 0.1%
Find a file
Michael Freeman a7baea5e00
All checks were successful
Publish Crates / publish (push) Successful in 3m1s
CICD / docker (push) Successful in 3m43s
CICD / tests (push) Successful in 1m39s
CICD / manifests (push) Successful in 57s
Merge pull request 'release: bump Arancini to v0.7.5' (#7) from release/v0.7.5 into main
Reviewed-on: #7
2026-07-16 07:31:30 +00:00
.forgejo/workflows fix(ci): use Forgejo-compatible artifact actions 2026-07-16 02:07:41 -05:00
.github Move Arancini CI and publishing to Forgejo 2026-04-01 22:40:15 -05:00
arancini release: bump version to 0.7.5 2026-07-16 02:24:56 -05:00
arancini-lib build: adopt Rust 2024 workspace metadata and rand 0.10 2026-07-16 00:06:51 -05:00
integration chore: rename 2026-02-18 17:17:36 -06:00
openspec Move Arancini CI and publishing to Forgejo 2026-04-01 22:40:15 -05:00
.dockerignore serialize updates with capnp 2025-04-14 19:56:51 +02:00
.gitignore Migrated to edition 2024, trimmed unused deps. Bumped up version numbers. All tests are passing. 2026-07-15 15:04:21 +08:00
AGENTS.md wip: initial 2026-02-18 00:42:10 -06:00
BUILD.bazel fix: startup bugs 2026-02-19 22:10:35 -06:00
Cargo.lock release: bump version to 0.7.5 2026-07-16 02:24:56 -05:00
Cargo.toml release: bump version to 0.7.5 2026-07-16 02:24:56 -05:00
Dockerfile chore: cleanup 2026-02-18 17:13:30 -06:00
LICENSE add clean workflow 2025-03-07 09:35:17 +01:00
Makefile chore: adding makefile, more performance updates 2026-02-18 00:45:20 -06:00
README.md release: bump version to 0.7.5 2026-07-16 02:24:56 -05:00
RELEASING.md fix(ci): honor non-root Forgejo runner 2026-07-15 22:30:23 -05:00
renovate.json migrate from bincode to postcard 2025-12-30 22:03:26 +01:00

Arancini 😋

crates.io

Arancini is an experimental carrier-grade BGP Monitoring Protocol (BMP) collector designed for ultra-high throughput and sub-millisecond telemetry pipelines. Built on a shared-nothing, thread-per-core architecture, it ingests BMP feeds from routers and streams curated BGP updates to NATS JetStream.

Arancini is a high-performance fork of Risotto, re-engineered for linear scalability and zero-copy data paths.

Key Features

  • Thread-per-Core Architecture: Powered by monoio and io_uring, Arancini pins worker threads to physical CPU cores, eliminating context switching and lock contention.
  • Zero-Copy Ingest: Utilizes registered buffer rings to DMA packets directly from the kernel to userspace.
  • Shared-Nothing State: Curation state is sharded across workers. Each core manages its own RIB, enabling lock-free deduplication and synthetic withdraw generation.
  • NATS JetStream Native: Replaces Kafka with high-performance async publishing to NATS, supporting fine-grained subject schemas (e.g., arancini.updates.v4_192_0_2_1.64512.1_1).
  • Cloud-Native Persistence: Supports state snapshots to local storage or NATS Object Store for seamless recovery in Kubernetes environments.

Quick Start

The fastest way to deploy Arancini is via Docker. The following command displays the help menu:

docker run registry.carverauto.dev/serviceradar/arancini:v0.7.5 --help

To run with default parameters (BMP on :4000, Metrics on :8080):

docker run \
  -p 4000:4000 \
  -p 8080:8080 \
  registry.carverauto.dev/serviceradar/arancini:v0.7.5

Monitoring is available via the Prometheus endpoint at http://localhost:8080/metrics.

Data Curation & Reliability

Arancini maintains a high-fidelity representation of connected routers and their peers to solve common BMP data integrity issues:

  • Duplicate Suppression: Suppresses redundant prefix announcements caused by BMP session resets or router restarts.
  • Synthetic Withdraws: Automatically generates withdraw messages when a Peer Down notification is received, even if the router fails to send them.
  • Stateless Mode: For pure telemetry ingestion without curation, Arancini can be configured to forward all updates as-is, bypassing the state store.

Architecture: Arancini vs. Risotto

While Risotto provides a robust standard async implementation, Arancini is built for massive scale:

Feature Risotto (Legacy) Arancini
Async Runtime Tokio (Work-Stealing) Monoio (Thread-per-Core)
I/O Driver Epoll / Kqueue Linux io_uring
State Locking Global Arc<Mutex> Lock-Free Shards
Messaging Kafka / Redpanda NATS JetStream
Memory Path Heap-allocated Vec Registered BufRing

Kernel Tuning for High Load

To achieve maximum throughput (>500k updates/sec), ensure your Linux host is tuned for high-concurrency I/O:

# Increase file descriptor limits
ulimit -n 1048576

# Tune TCP receive buffers for large bursts
sysctl -w net.core.rmem_max=33554432
sysctl -w net.ipv4.tcp_rmem="4096 87380 33554432"

Contributing & Development

To test the full pipeline locally, refer to the Integration Tests. The setup uses Docker Compose to spin up:

  1. Routers: BIRD and GoBGP instances.
  2. Infrastructure: NATS JetStream and ClickHouse.
  3. Collector: Arancini running in worker mode.

Running Tests

docker compose -f integration/compose.yml up -d --build

Refer to the Docker Compose integration tests to try Arancini locally. The setup includes BIRD and GoBGP routers announcing BGP updates between them, and transmitting BMP messages to Arancini.

Linux Performance Validation

For Arancini deployments, run the tuning/socket validation checks:

bash integration/bench/run_2_6_linux_tuning_validation.sh

This validates:

  • Runtime socket option enforcement in code (SO_REUSEPORT, TCP_NODELAY, backlog and SO_RCVBUF wiring).
  • Linux host tuning guidance (sysctl, file descriptor limits, and RSS/IRQ readiness checks).

Runtime Benchmark (Arancini)

Use this script to benchmark Arancini runtime throughput with producer paths disabled:

ROUTE_COUNT_PER_BIRD=2000 TARGET_RX_DELTA=2000 TIMEOUT_SECONDS=180 ARANCINI_WORKERS=4 \
  integration/bench/run_bird_saturating_runtime_benchmark.sh

The script writes the report to:

integration/bench/risotto-vs-arancini-bird-saturating-report.md

Use the report to capture current throughput and latency numbers for your target profile and host.

NATS JetStream mTLS

Arancini supports TLS and mutual TLS for the NATS JetStream sidecar path.

Example:

./target/release/arancini \
  --nats-enable \
  --nats-server nats://nats.example.net:4222 \
  --nats-tls-required \
  --nats-tls-ca-cert-path /etc/arancini/nats/ca.pem \
  --nats-tls-client-cert-path /etc/arancini/nats/client.pem \
  --nats-tls-client-key-path /etc/arancini/nats/client-key.pem

Optional:

  • --nats-tls-first enables handshake-first mode when the NATS server is configured for it.