Features

Features

Rate Limiting

Nvelox provides two levels of rate limiting:

  • Connection rate limiting — at the listener level via rate_limit (connections/sec)
  • Per-IP request rate limiting — at the listener level via ip_rate_limit (requests/sec + burst)
Per-IP rate limiting
listeners:
  - name: https_public
    protocol: https
    bind: ":8443"
    tls:
      cert: /etc/nvelox/tls/server.crt
      key: /etc/nvelox/tls/server.key
    ip_rate_limit:
      requests_per_second: 100
      burst: 200
Connection rate limiting
listeners:
  - name: tcp_api
    protocol: tcp
    bind: ":8080"
    rate_limit:
      connections_per_second: 50
      burst: 100

Circuit Breaker

Prevent cascading failures by tripping a circuit when backend error rates exceed a threshold. The breaker transitions through three states:

  • Closed — Normal operation, requests flow freely
  • Open — Requests are rejected immediately (fast fail)
  • Half-Open — Limited probe requests (half_open_max) to test recovery
  • enabled — Enable circuit breaker
  • threshold — Error percentage to trip the circuit
  • timeout — Time in open state before transitioning to half-open
  • half_open_max — Probe requests allowed in half-open state
Circuit breaker
backends:
  - name: api_servers
    balance: roundrobin
    circuit_breaker:
      enabled: true
      threshold: 50       # 50% failure rate trips the circuit
      timeout: 60s        # stay open for 60s before half-open
      half_open_max: 3    # allow 3 probe requests
    servers:
      - "10.0.1.10:8080"

Response Caching

Cache backend responses in memory with TTL-based expiration. Configured per listener.

  • enabled — Enable caching
  • max_size — Maximum cache size (e.g. 256MB)
  • default_ttl — Time-to-live for cached entries
  • methods — HTTP methods to cache (default: GET)
Response caching
listeners:
  - name: https_public
    protocol: https
    bind: ":8443"
    tls:
      cert: /etc/nvelox/tls/server.crt
      key: /etc/nvelox/tls/server.key
    cache:
      enabled: true
      max_size: 256MB
      default_ttl: 300s
      methods:
        - GET

Compression

Reduce bandwidth with automatic response compression. Configured per listener.

  • enabled — Enable compression
  • types — Content types to compress
  • min_length — Minimum response size to compress (bytes)
Compression config
listeners:
  - name: https_public
    protocol: https
    bind: ":8443"
    tls:
      cert: /etc/nvelox/tls/server.crt
      key: /etc/nvelox/tls/server.key
    compression:
      enabled: true
      types:
        - text/html
        - application/json
        - text/css
        - application/javascript
      min_length: 1024

Lua Scripting

Embed custom Lua scripts for advanced request/response manipulation. Scripts run in a sandboxed Lua VM with hooks at key points in the request lifecycle. Configure per-route using scripts.

  • request_script — Path to Lua script for request modification
  • response_script — Path to Lua script for response modification
Lua scripting
listeners:
  - name: https_public
    protocol: https
    bind: ":8443"
    tls:
      cert: /etc/nvelox/tls/server.crt
      key: /etc/nvelox/tls/server.key
    routes:
      - match:
          path_prefix: /api/
        backend: api_servers
        scripts:
          request_script: /etc/nvelox/scripts/modify_request.lua
          response_script: /etc/nvelox/scripts/log_response.lua

WebSocket Proxying

Nvelox transparently handles WebSocket upgrades on HTTP/HTTPS listeners. No special configuration is needed — upgrade requests are detected automatically and the connection is bidirectionally proxied.

WebSocket (no special config needed)
listeners:
  - name: https_public
    protocol: https
    bind: ":8443"
    tls:
      cert: /etc/nvelox/tls/server.crt
      key: /etc/nvelox/tls/server.key
    routes:
      - match:
          path_prefix: /ws/
        backend: ws_servers
        # WebSocket upgrade is handled automatically

Access Logging

Configure access and error log output paths in the top-level logging section.

  • level — Log level (debug, info, warn, error)
  • access_log — Path to access log file
  • error_log — Path to error log file
Logging config
logging:
  level: info
  access_log: /var/log/nvelox/access.log
  error_log: /var/log/nvelox/error.log
Iris