Rust web framework comparison: any two, head to head
ntex is ahead of actix on 28 of the 32 tests they both run, and behind on 4. On the HTTP/1.1 composite ntex scores 6209 and actix 5307.
Pick any two of the 24 Rust entries. Requests per second is the best of three runs and the delta is the first column against the second; every row is the same profile at the same connection count, on the same machine. The fixed-rate profiles offer every entry the same request rate, so they are compared on their score out of 100 instead, which is CPU cost and latency at that rate. What each profile measures.
| Profile | Conns | ntex | actix | Delta | ntex p99 | actix p99 |
|---|---|---|---|---|---|---|
| Requests per second | ||||||
| Baseline | 4,096 | 3,396,907 | 2,905,625 | +17% | 1.85ms | 2.46ms |
| Pipelined | 4,096 | 23,155,552 | 18,763,571 | +23% | 3.75ms | 3.57ms |
| Short-lived | 4,096 | 2,650,693 | 1,144,727 | +132% | 3.32ms | 9.27ms |
| Async Delay | 32,000 | 2,262,581 | 2,014,158 | +12% | 18.40ms | 16.70ms |
| JSON Comp | 4,096 | 820,143 | 586,605 | +40% | 11.80ms | 27.20ms |
| JSON Comp | 16,384 | 798,075 | 573,534 | +39% | 29.10ms | 56.50ms |
| JSON TLS | 4,096 | 1,702,941 | 1,346,577 | +26% | 35.13ms | 65.46ms |
| Static TLS | 1,024 | 845,477 | 413,864 | +104% | 17.40ms | 37.73ms |
| Async DB | 1,024 | 327,285 | 324,684 | +1% | 17.70ms | 19.10ms |
| Fortunes | 1,024 | 204,710 | 184,341 | +11% | 7.71ms | 5.82ms |
| Baseline | 256 | 12,798,174 | 6,207,410 | +106% | 2.56ms | 5.00ms |
| Baseline | 1,024 | 12,415,217 | 4,722,351 | +163% | 9.08ms | 46.06ms |
| Static | 256 | 932,707 | 422,892 | +121% | 21.65ms | 39.40ms |
| Static | 1,024 | 933,580 | 402,279 | +132% | 62.07ms | 163.07ms |
| Baseline (h2c) | 256 | 13,173,789 | 6,671,590 | +97% | 2.55ms | 16.15ms |
| Baseline (h2c) | 1,024 | 12,924,792 | 4,961,422 | +161% | 7.24ms | 77.59ms |
| Baseline (h2c) | 4,096 | 12,418,509 | 4,500,687 | +176% | 29.71ms | 210.21ms |
| JSON (h2c) | 1,024 | 3,465,923 | 1,764,965 | +96% | 17.89ms | 48.72ms |
| JSON (h2c) | 4,096 | 3,182,382 | 1,616,163 | +97% | 63.36ms | 320.17ms |
| Echo | 512 | 3,932,723 | 3,646,407 | +8% | 310us | 249us |
| Echo | 4,096 | 4,055,738 | 3,660,925 | +11% | 1.40ms | 1.78ms |
| Echo | 16,384 | 3,705,983 | 3,473,363 | +7% | 5.42ms | 6.13ms |
| Echo Pipelined | 512 | 56,087,894 | 47,190,006 | +19% | 315us | 278us |
| Echo Pipelined | 4,096 | 58,501,267 | 46,405,884 | +26% | 1.66ms | 4.05ms |
| Echo Pipelined | 16,384 | 53,883,670 | 44,938,672 | +20% | 6.57ms | 4.65ms |
| Echo Short-lived | 512 | 2,259,611 | 1,170,845 | +93% | 557us | 177us |
| Echo Short-lived | 4,096 | 2,496,058 | 1,145,177 | +118% | 2.42ms | 214us |
| Fixed-rate profiles: score out of 100 | ||||||
| CON-1M | 1,000,000 | 76.5 | 71.7 | +7% | 138us | 136us |
| CON-1M-TLS | 1,000,000 | 74.4 | 75.8 | -2% | 111us | 110us |
| Latency-10K | 1,024 | 74.2 | 81.8 | -9% | 118us | 107us |
| Latency-1M | 1,024 | 81.7 | 82.3 | -1% | 177us | 187us |
| 8Gbit | 512 | 82.5 | 85.0 | -3% | 126us | 120us |
Common comparisons
ntex vs actix · ntex vs axum · ntex vs rama · actix vs axum · actix vs rama · axum vs rama
Questions
Is ntex faster than actix?
ntex is ahead of actix on 28 of the 32 tests they both run, and behind on 4. On the HTTP/1.1 composite ntex scores 6209 and actix 5307. Both run on the same machine, in the same round, against the same profiles.
Is ntex faster than axum?
ntex is ahead of axum on 9 of the 10 tests they both run, and behind on 1. On the HTTP/1.1 composite ntex scores 6209 and axum 2703. Both run on the same machine, in the same round, against the same profiles.
Is ntex faster than rama?
ntex is ahead of rama on 27 of the 28 tests they both run, and behind on 1. On the HTTP/1.1 composite ntex scores 6209 and rama 2148. Both run on the same machine, in the same round, against the same profiles.
Is actix faster than axum?
actix is ahead of axum on 9 of the 10 tests they both run, and behind on 1. On the HTTP/1.1 composite actix scores 5307 and axum 2703. Both run on the same machine, in the same round, against the same profiles.
Which Rust framework is fastest overall?
Among the Rust web frameworks, Proa holds the highest HTTP/1.1 composite, at 6383; among the Rust HTTP engines, tokio holds the highest HTTP/1.1 composite, at 3653; among the experimental Rust frameworks, veil-api holds the highest HTTP/1.1 composite, at 3911; among the Rust reverse proxies and static-file servers, veil holds the highest HTTP/1.1 composite, at 560. Each league is measured against its own leader, and the leagues do not all count the same profiles, so those numbers are not on one scale and the highest of them is not the fastest entry on the page: to set an entry of one league against an entry of another, pick the two in the table above. The composite is throughput over the whole suite; if a service is one shape of workload, compare that profile on its own in the table above, because the order changes.
Every Rust entry
- Proa
- ntex
- actix
- cpeak
- tako
- trillium-tuned
- trillium
- axum
- mq-bridge
- rama
- rocket
- salvo
- tokio
- tokio-uring
- hyper
- veil-api
- toxi
- veil
- roxygen
- sark
- tokio-uring-ws
- tokio-websockets
- tokio-ws
- wtx
Results updated · Rust composite ranking · Compare across languages · Other languages · Open the leaderboard