Servers

Rakiba supports multiple Ring-compatible HTTP servers. All servers are swappable via configuration, allowing you to choose the best fit for your performance and feature requirements.

Server Options

Configure your server in rakiba.edn:

{:server :jetty}  ; or :undertow, :http-kit, :aleph, :immutant
ServerBest For
:jettyGeneral purpose, battle-tested
:undertowHigh-performance, non-blocking
:http-kitWebSockets, lightweight
:alephMaximum throughput, Netty-based
:immutantLegacy WildFly integration

Choosing a Server

Use this guide to select the right server for your needs:

  • Default choice: :jetty - Mature, well-documented, excellent tooling support
  • WebSockets: :http-kit - Native WebSocket support with minimal overhead
  • High throughput: :http-kit or :undertow - Both handle 400k+ req/s
  • Low latency: :http-kit - Sub-millisecond p99 latency
  • Async/reactive: :aleph - Manifold-based, ideal for streaming
  • Enterprise/WildFly: :immutant - When you need JBoss integration

Benchmark Results

All benchmarks were conducted to measure real-world performance across different middleware configurations.

Test Environment

CPUAMD Ryzen AI 7 350 (16 cores)
RAM30GB
OSLinux 6.17
Java25

Throughput

ServerTier 0 (raw)Tier 1 (minimal)Tier 2 (reitit)Middleware Overhead
http-kit533k req/s513k req/s529k req/s0.8%
undertow457k req/s429k req/s424k req/s7.2%
jetty456k req/s406k req/s382k req/s16.2%

Latency (p99)

ServerTier 0Tier 1Tier 2
http-kit0.52ms0.54ms0.53ms
jetty0.78ms0.83ms0.86ms
undertow5.24ms5.30ms5.25ms

Key Findings

  • http-kit has highest throughput (533k req/s) and negligible middleware overhead (<1%)
  • Reitit routing cost is minimal - adds virtually no overhead vs basic middleware
  • All servers handle 380k+ req/s with full middleware stack
  • Latency remains sub-millisecond for http-kit across all tiers

Benchmark Methodology

Benchmarks measure performance across three tiers to isolate server overhead from middleware and routing costs:

TierConfigurationPurpose
Tier 0 (raw)Zero middleware, static responseMeasures server ceiling
Tier 1 (minimal)wrap-params, wrap-keyword-params, wrap-exceptionsBasic middleware cost
Tier 2 (reitit)Full Reitit router + middleware stackProduction-like setup

Run your own benchmarks:

bb bench my-app jetty
bb bench my-app undertow
bb bench my-app http-kit

Next Steps