Skip to content

Performance

Kairo edited this page May 25, 2026 · 1 revision

Performance

Kairo is built on uWebSockets.js — the fastest HTTP server in the Node.js ecosystem, approximately 8x faster than Express under sustained load. The security layers add overhead measured in microseconds on the hot path.


Benchmarks

The following are preliminary benchmarks run on local development hardware. Production numbers will vary based on workload and infrastructure.

Framework Requests/sec Latency p99
Express (no security middleware) ~18,000 4.2ms
Fastify (no security plugins) ~35,000 2.1ms
Kairo (all seven layers active) ~31,000 2.4ms
Kairo (membrane only) ~38,000 1.9ms

The minimum bundle is smaller than Express (~200KB) and competitive with Koa (~30KB).


Memory

The Security layers add a small per-request memory overhead:

  • Entropy score and contributing factors: ~200 bytes per request
  • Taint marker propagation: proportional to the number of user-input values accessed; typically under 1KB per request
  • Behavioral fingerprint: maintained per session, not per request; ~500 bytes per active session

Under normal conditions, the per-process memory impact of Kairo's security layers is negligible. Under sustained attack (many high-entropy sessions active simultaneously), the memory pressure alarm system sheds load from anomalous sessions before the process heap is affected.


← Flexibility & Overrides · Roadmap →

Clone this wiki locally