NexusLBNexusLBv0.0.2-pre
NexusLB Official Logo
Engineered in Pure Safe Rust • Zero Buffer Overflows

Next-Generation
Adaptive Load Balancing.

Out-delivers NGINX with 118,872 req/s throughput, sub-millisecond median latencies, and consumes 88.6% less memory with atomic zero-downtime hot reloads.

Explore Benchmark ShowdownRead Documentation
Peak Throughput
118,872
Requests/sec (+43% vs UltraBalancer)
Median Latency
525 µs
20.2% lower latency than NGINX
Resident RAM
2.6 MB
-88.6% leaner than NGINX (8 workers)
Hot Reload Time
< 1 µs
Lock-free ArcSwap zero dropped requests
$./target/release/nexuslb start --config nexuslb.yaml
2026-09-26T14:10:00Z INFO nexuslb: Starting NexusLB v0.0.2
2026-09-26T14:10:00Z INFO nexuslb: I/O Engine: tokio [4 workers assigned]
2026-09-26T14:10:00Z INFO nexuslb_network: Listening on 0.0.0.0:8080 (SO_REUSEPORT, TCP_NODELAY)
2026-09-26T14:10:00Z INFO nexuslb_api: Admin REST API listening on 127.0.0.1:9091
2026-09-26T14:10:00Z INFO nexuslb: Ready for production traffic. Press Ctrl+C to terminate.

Head-to-Head Benchmark Showdown

Benchmarked on identical Apple Silicon hardware running against identical HTTP/1.1 mock services across multiple concurrency levels.

Concurrency:
Throughput (Requests / Second)Higher is better
NexusLB +3.8% faster
NexusLB v0.0.2111,470 req/s
NGINX (Production v1.31)107,363 req/s
Median Latency P50 (Microseconds)Lower is better
NexusLB 20.2% lower latency
NexusLB v0.0.2525 µs
NGINX (Production v1.31)658 µs
Resident Memory Footprint RSS (MB)Lower is better
NexusLB 88.5% leaner
NexusLB v0.0.22.6 MB
NGINX (Production v1.31)22.7 MB

Dynamic Scheduling in Action

Watch how NexusLB adaptively steers traffic around degraded backends in real time compared to blind round-robin proxies.

Algorithm Selector
Chaos Injection

Inject a 950ms GC spike on Node 3. Notice how Adaptive routing steers traffic away, while Round Robin blindly routes 25% of traffic into the stall.

Client Ingress Stream (120 req/s)
node-01
UP
Lat: 45 µs
Conns: 12
Reqs: 0
node-02
UP
Lat: 50 µs
Conns: 14
Reqs: 0
node-03
UP
Lat: 48 µs
Conns: 15
Reqs: 0
node-04
UP
Lat: 46 µs
Conns: 13
Reqs: 0

Zero Allocation. Lock-Free. Safe Rust.

Every microsecond matters. NexusLB combines low-level OS capabilities with modern Rust concurrency abstractions to deliver unmatched performance.

5x–10x Faster

SIMD Vectorized Header Parsing

Uses 128-bit vector instructions (SSE/AVX/NEON) to parse HTTP headers in bulk, replacing slow character-by-character C state machines.

Zero Allocation

Lock-Free Buffer & Connection Pools

Pre-allocated ArrayQueue pools eliminate malloc/free syscall overhead on the hot path, achieving true zero-allocation request forwarding.

< 1 µs Swap

Atomic Zero-Downtime Hot Reload

Reconfigure routes, pools, and SSL certs via POST /reload or SIGHUP in under 1 µs using ArcSwap with zero dropped in-flight requests.

Built-In

Active Health & Circuit Breakers

Native background HTTP/TCP health probing and 3-state circuit breakers isolate failing backends without requiring paid enterprise licenses.

Cross-Platform

Pluggable Multi-Engine Architecture

Seamlessly switch between high-concurrency Tokio, Linux kernel io_uring, and bare-metal kernel-bypass AF_XDP for maximum throughput.

Sub-ms HIT

RFC 7234 In-Memory Cache

High-speed in-memory LRU cache with conditional ETag revalidation serving cached responses with 304 Not Modified in microseconds.

Zero Packet Loss

TLS Termination & Dynamic SNI

Hardware-accelerated TLS 1.3 / HTTP/2 termination using PrefixedStream, supporting wildcard domains and dynamic certificate reloads.

10Hz Live Stats

Real-Time Terminal Dashboard

Interactive terminal TUI (nexuslb top) and Prometheus exporter for zero-overhead, sub-millisecond observability.

Cloud Native

Extensible Filter Pipeline

JWT authentication, header injection, and distributed tracing (W3C traceparent OpenTelemetry) evaluated before backend dispatch.

NexusLB Configuration Builder

Customize routing, protocols, algorithms, and security filters, then copy a production-ready nexuslb.yaml.

Runtime Settings
TLS Termination & SNI
Includes HTTP->HTTPS 301 redirect
Route JWT Authentication
Validates Bearer tokens on /api/*
Sliding-Window Rate Limiting
120,000 global, 1,500/client RPS
Non-Blocking JSON Logging
128k ring buffer background thread
nexuslb.yaml
server:
  listen:
    - "0.0.0.0:8080"
  workers: "auto"
  engine: "tokio"        # "tokio", "io-uring", or "xdp"
  reuse_port: true
  tcp_nodelay: true

load_balancer:
  algorithm: "adaptive"
  default_pool: "api-cluster"

backends:
  - name: "srv-01"
    address: "10.0.1.10:8080"
    weight: 100
    protocol: "http1"
    pool: "api-cluster"
  - name: "srv-02"
    address: "10.0.1.11:8080"
    weight: 100
    protocol: "http1"
    pool: "api-cluster"

health_check:
  enabled: true
  interval: "5s"
  timeout: "2s"
  http_path: "/healthz"
  expected_status: 200

tls:
  enabled: true
  cert_path: "/etc/nexuslb/certs/fullchain.pem"
  key_path: "/etc/nexuslb/certs/privkey.pem"
  redirect_http_to_https: true

routes:
  - name: "api-secure"
    path: "/api/*"
    pool: "api-cluster"
    filters:
      jwt_secret: "prod-secret-token"
      add_headers:
        X-Proxy: "NexusLB"
      remove_headers:
        - "X-Internal-Secret"

rate_limit:
  enabled: true
  global_rps: 120000
  client_rps: 1500

access_log:
  enabled: true
  format: "json"
  target: "stdout"

admin:
  enabled: true
  address: "127.0.0.1:9091"

metrics:
  enabled: true
  address: "0.0.0.0:9090"
Documentation/1. Getting Started
Module 1 of 8

1. Getting Started

Zero-dependency setup, binary compilation, and running your first proxy in under 60 seconds.

Installation & System Requirements

NexusLB runs on macOS (Apple Silicon & Intel) and Linux (x86_64, aarch64, ARMv7). It compiles into a completely self-contained single binary with zero external runtime dependencies.

  • Rust 1.80+ (stable toolchain recommended)
  • Linux kernel 5.1+ required for io_uring and AF_XDP engines; Tokio engine runs universally on all platforms including macOS
  • OpenSSL is NOT required (native pure-Rust rustls cryptographic engine)
For production deployments on Linux, compiling with 'RUSTFLAGS="-C target-cpu=native"' enables SIMD vectorized httparse instructions (AVX2/NEON), boosting header parsing throughput by 12–18%.
bash
# Clone and compile with Maximum Fat LTO optimization
git clone https://github.com/Aazann/NexusLB.git
cd NexusLB

# Build optimized release binary
cargo build --release -p nexuslb-cli

# Verify version and target architecture
./target/release/nexuslb version

60-Second Quickstart

Bootstrap a production-ready Layer 7 reverse proxy routing between local microservices.

bash
# 1. Start two mock backend HTTP servers on ports 8081 and 8082
python3 -m http.server 8081 &
python3 -m http.server 8082 &

# 2. Start NexusLB using the default configuration
./target/release/nexuslb start --config nexuslb.yaml

# 3. Test HTTP proxy forwarding with active metrics
curl -i http://localhost:8080/

# 4. In a separate terminal, launch the live operator dashboard
./target/release/nexuslb top

CLI Command Reference

The nexuslb binary exposes subcommands for running, inspecting, and hot-reloading active daemon processes.

CommandFlags / OptionsDescription
nexuslb start--config <PATH>, --engine <tokio|io-uring|xdp|auto>, --workers <N>Starts proxy server with specified engine
nexuslb top--admin-addr <ADDR> (default: 127.0.0.1:9091)Interactive 10 Hz curses operator terminal
nexuslb reload--admin-addr <ADDR>, --token <TOKEN>Triggers sub-microsecond atomic config swap
nexuslb status--admin-addr <ADDR>Queries running status and active upstream pools
nexuslb versionNoneOutputs binary build target, commit, and engines