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
| Server | Best For |
|---|---|
:jetty | General purpose, battle-tested |
:undertow | High-performance, non-blocking |
:http-kit | WebSockets, lightweight |
:aleph | Maximum throughput, Netty-based |
:immutant | Legacy 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-kitor: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
| CPU | AMD Ryzen AI 7 350 (16 cores) |
| RAM | 30GB |
| OS | Linux 6.17 |
| Java | 25 |
Throughput
| Server | Tier 0 (raw) | Tier 1 (minimal) | Tier 2 (reitit) | Middleware Overhead |
|---|---|---|---|---|
| http-kit | 533k req/s | 513k req/s | 529k req/s | 0.8% |
| undertow | 457k req/s | 429k req/s | 424k req/s | 7.2% |
| jetty | 456k req/s | 406k req/s | 382k req/s | 16.2% |
Latency (p99)
| Server | Tier 0 | Tier 1 | Tier 2 |
|---|---|---|---|
| http-kit | 0.52ms | 0.54ms | 0.53ms |
| jetty | 0.78ms | 0.83ms | 0.86ms |
| undertow | 5.24ms | 5.30ms | 5.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:
| Tier | Configuration | Purpose |
|---|---|---|
| Tier 0 (raw) | Zero middleware, static response | Measures server ceiling |
| Tier 1 (minimal) | wrap-params, wrap-keyword-params, wrap-exceptions | Basic middleware cost |
| Tier 2 (reitit) | Full Reitit router + middleware stack | Production-like setup |
Run your own benchmarks:
bb bench my-app jetty
bb bench my-app undertow
bb bench my-app http-kit
Next Steps
- Configuration - Full configuration options
- Deployment - Deploy to VPS or local sandbox
- Logging - Configure structured logging