Skip to main content

Overview

RAXE is designed for production workloads with sub-millisecond latency and high throughput.

P50 Latency

0.37ms

P95 Latency

0.49ms

Throughput

~1,200/sec

Benchmark Results

Latency by Configuration

Throughput

Memory Usage


Performance Modes

RAXE provides three performance modes to balance speed and detection:

Fast Mode

L1 rules only, optimized for latency.
Characteristics:
  • ~0.4ms average latency
  • 85% detection rate
  • Zero ML overhead
  • Best for: High-volume APIs, real-time chat

Balanced Mode (Default)

L1 + L2 with async parallel execution.
Characteristics:
  • ~3.5ms average latency
  • 95% detection rate
  • ML runs in parallel with rules
  • Best for: Production applications

Thorough Mode

All detection layers with maximum coverage.
Characteristics:
  • ~5ms average latency
  • 95%+ detection rate
  • Additional rule variations checked
  • Best for: Security-critical applications

Optimization Tips

1. Use AsyncRaxe for High Throughput

2. Enable Caching

AsyncRaxe includes built-in caching for repeated scans:

3. Disable L2 for Speed-Critical Paths

4. Use Thread Pools for Sync Code

5. Warm Up on Startup

First scan has initialization overhead. Warm up during startup:

6. Lazy L2 Loading

When you only need rules (no ML scanning), disable L2 to skip ONNX model loading entirely:
CLI commands like raxe rules list and raxe doctor automatically skip ML loading when it’s not needed, keeping non-scan commands fast (~0.5s startup).

CLI Startup Time

RAXE uses lazy L2 loading: the ML model is only loaded when scanning is required. Non-scan commands skip model initialization entirely.

Latency Breakdown

L1 (Rule-Based) Detection

L2 (ML-Based) Detection

Combined Pipeline


Hardware Recommendations

Minimum Requirements

  • CPU: 2 cores
  • RAM: 512MB
  • Python: 3.10+
  • CPU: 4+ cores (for parallel L1/L2)
  • RAM: 2GB+
  • SSD: For scan history database

High-Throughput

  • CPU: 8+ cores
  • RAM: 4GB+
  • Use AsyncRaxe with high concurrency

Monitoring Performance

Built-in Profiling

CLI Profiling

Output:

Statistics

Shows aggregate performance over time.

Benchmarking Your Setup

Run the built-in benchmark:
Or in Python:

Performance Guarantees

RAXE is designed to avoid performance regressions:
  • No catastrophic backtracking: All 515+ regex patterns are REDOS-safe
  • Bounded memory: Fixed-size buffers, no unbounded allocations
  • Timeouts: Configurable scan timeouts prevent runaway processing
  • Circuit breaker: Graceful degradation under extreme load

What’s Next

Configuration

Tune performance settings

Async SDK

High-throughput async scanning