{"id":50606859,"url":"https://github.com/carverauto/arancini","last_synced_at":"2026-06-06T00:01:58.166Z","repository":{"id":339141602,"uuid":"1160591806","full_name":"carverauto/arancini","owner":"carverauto","description":"High-performance BMP collector.","archived":false,"fork":false,"pushed_at":"2026-02-20T22:35:47.000Z","size":2669,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-23T01:46:12.411Z","etag":null,"topics":["bgp","bgp-monitoring-protocol","bmp","io-uring","zero-copy"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/carverauto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"github":"mfreeman451"}},"created_at":"2026-02-18T06:01:53.000Z","updated_at":"2026-03-02T02:25:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/carverauto/arancini","commit_stats":null,"previous_names":["mfreeman451/arancini","carverauto/arancini"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/carverauto/arancini","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carverauto%2Farancini","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carverauto%2Farancini/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carverauto%2Farancini/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carverauto%2Farancini/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/carverauto","download_url":"https://codeload.github.com/carverauto/arancini/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carverauto%2Farancini/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33964367,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-05T02:00:06.157Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bgp","bgp-monitoring-protocol","bmp","io-uring","zero-copy"],"created_at":"2026-06-06T00:01:57.590Z","updated_at":"2026-06-06T00:01:58.155Z","avatar_url":"https://github.com/carverauto.png","language":"Rust","funding_links":["https://github.com/sponsors/mfreeman451"],"categories":[],"sub_categories":[],"readme":"# Arancini 😋\n\n![crates.io](https://img.shields.io/crates/v/arancini.svg)\n\n**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**.\n\nArancini is a high-performance fork of [Risotto](https://github.com/nxthdr/risotto), re-engineered for linear scalability and zero-copy data paths.\n\n## Key Features\n\n- **Thread-per-Core Architecture:** Powered by `monoio` and `io_uring`, Arancini pins worker threads to physical CPU cores, eliminating context switching and lock contention.\n- **Zero-Copy Ingest:** Utilizes registered buffer rings to DMA packets directly from the kernel to userspace.\n- **Shared-Nothing State:** Curation state is sharded across workers. Each core manages its own RIB, enabling lock-free deduplication and synthetic withdraw generation.\n- **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`).\n- **Cloud-Native Persistence:** Supports state snapshots to local storage or NATS Object Store for seamless recovery in Kubernetes environments.\n\n---\n\n## Quick Start\n\nThe fastest way to deploy Arancini is via Docker. The following command displays the help menu:\n```bash\ndocker run ghcr.io/carverauto/arancini:v0.7.2 --help\n```\n\nTo run with default parameters (BMP on `:4000`, Metrics on `:8080`):\n```bash\ndocker run \\\n  -p 4000:4000 \\\n  -p 8080:8080 \\\n  ghcr.io/carverauto/arancini:v0.7.2\n```\n\nMonitoring is available via the Prometheus endpoint at `http://localhost:8080/metrics`.\n\n## Data Curation \u0026 Reliability\n\nArancini maintains a high-fidelity representation of connected routers and their peers to solve common BMP data integrity issues:\n\n- **Duplicate Suppression:** Suppresses redundant prefix announcements caused by BMP session resets or router restarts.\n- **Synthetic Withdraws:** Automatically generates withdraw messages when a Peer Down notification is received, even if the router fails to send them.\n- **Stateless Mode:** For pure telemetry ingestion without curation, Arancini can be configured to forward all updates as-is, bypassing the state store.\n\n## Architecture: Arancini vs. Risotto\n\nWhile Risotto provides a robust standard async implementation, Arancini is built for massive scale:\n\n| Feature | Risotto (Legacy) | Arancini |\n|---|---|---|\n| Async Runtime | Tokio (Work-Stealing) | Monoio (Thread-per-Core) |\n| I/O Driver | Epoll / Kqueue | Linux `io_uring` |\n| State Locking | Global `Arc\u003cMutex\u003e` | Lock-Free Shards |\n| Messaging | Kafka / Redpanda | NATS JetStream |\n| Memory Path | Heap-allocated `Vec` | Registered `BufRing` |\n\n## Kernel Tuning for High Load\n\nTo achieve maximum throughput (\u003e500k updates/sec), ensure your Linux host is tuned for high-concurrency I/O:\n```bash\n# Increase file descriptor limits\nulimit -n 1048576\n\n# Tune TCP receive buffers for large bursts\nsysctl -w net.core.rmem_max=33554432\nsysctl -w net.ipv4.tcp_rmem=\"4096 87380 33554432\"\n```\n\n## Contributing \u0026 Development\n\nTo test the full pipeline locally, refer to the Integration Tests. The setup uses Docker Compose to spin up:\n\n1. **Routers:** BIRD and GoBGP instances.\n2. **Infrastructure:** NATS JetStream and ClickHouse.\n3. **Collector:** Arancini running in worker mode.\n\n## Running Tests\n```bash\ndocker compose -f integration/compose.yml up -d --build\n```\n\n---\n\nRefer to the Docker Compose [integration](./integration/) tests to try Arancini locally. The setup includes BIRD and GoBGP routers announcing BGP updates between them, and transmitting BMP messages to Arancini.\n\n## Linux Performance Validation\n\nFor Arancini deployments, run the tuning/socket validation checks:\n\n```bash\nbash integration/bench/run_2_6_linux_tuning_validation.sh\n```\n\nThis validates:\n- Runtime socket option enforcement in code (`SO_REUSEPORT`, `TCP_NODELAY`, backlog and `SO_RCVBUF` wiring).\n- Linux host tuning guidance (`sysctl`, file descriptor limits, and RSS/IRQ readiness checks).\n\n## Runtime Benchmark (Arancini)\n\nUse this script to benchmark Arancini runtime throughput with producer paths disabled:\n\n```bash\nROUTE_COUNT_PER_BIRD=2000 TARGET_RX_DELTA=2000 TIMEOUT_SECONDS=180 ARANCINI_WORKERS=4 \\\n  integration/bench/run_bird_saturating_runtime_benchmark.sh\n```\n\nThe script writes the report to:\n\n```bash\nintegration/bench/risotto-vs-arancini-bird-saturating-report.md\n```\n\nUse the report to capture current throughput and latency numbers for your target profile and host.\n\n## NATS JetStream mTLS\n\nArancini supports TLS and mutual TLS for the NATS JetStream sidecar path.\n\nExample:\n\n```bash\n./target/release/arancini \\\n  --nats-enable \\\n  --nats-server nats://nats.example.net:4222 \\\n  --nats-tls-required \\\n  --nats-tls-ca-cert-path /etc/arancini/nats/ca.pem \\\n  --nats-tls-client-cert-path /etc/arancini/nats/client.pem \\\n  --nats-tls-client-key-path /etc/arancini/nats/client-key.pem\n```\n\nOptional:\n- `--nats-tls-first` enables handshake-first mode when the NATS server is configured for it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarverauto%2Farancini","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarverauto%2Farancini","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarverauto%2Farancini/lists"}