Implementation
Actix Web
Actix Web 4.19.0 · Rust · Rust · ranked
Scores
| Category | Position | Score | ± |
|---|---|---|---|
| Hello world | 1 | 1.15* | – |
| Database | 3–7 | 0.95* | ±5.4% |
| Application | 1 | 1.18* | – |
| Memory (high-water mark) | 1–5 | 1.00≈ | – |
| Startup | 1–13 | 1.00≈ | – |
Runner CPUs: EPYC 9V74, EPYC 9V74, EPYC 9V74
Settings
- Runtime
- Rust 1.99.1 (release build, thin LTO)
- Server
- actix-web HttpServer
- Workers
- Default: one worker per available CPU (2)
- Database layer
- SQLx 0.9 (Actix Web has no ORM)
- Templates
- Askama 0.16
- Logging
- none
- Dependency source
- –
- Status
- measured
Application endpoints: mechanisms
- Validation
- web::Path, web::Query, web::Json and web::Form extractors (type errors 400; a non-integer id 404, PathConfig's default); ranges checked by hand (422)
- CSRF
- token (library): actix-csrf 0.8 (double-submit cookie: random token in the __Host-Csrf-Token cookie, echoed in the form; Csrf<Form<_>> extractor)
- Session store
- cookie-encrypted (documented): actix-session 0.11 CookieSessionStore (private cookie, key shared by the workers)
Tier 1 endpoints
| Endpoint | req/s | vs Axum | Efficiency (req/CPU-s) | p99 (ms) | Errors | Limits |
|---|---|---|---|---|---|---|
| /text | 193,268 (147,269–196,295) | 1.16 | 97,347 | 0.99 | 0 | load-generator-bound 15/15 |
| /json | 189,727 (144,120–193,827) | 1.16 | 95,724 | 0.78 | 0 | load-generator-bound 15/15 |
| /db-single | 18,218 (13,943–18,518) | 0.99 | 13,210 | 7.90 | 0 | PostgreSQL-bound 15/15 |
| /html | 184,385 (140,792–188,459) | 1.16 | 93,038 | 0.91 | 0 | load-generator-bound 15/15 |
| /queries?queries=20 | 1,079 (842–1,115) | 0.99 | 825 | 133.84 | 0 | PostgreSQL-bound 15/15 |
| /fortunes | 21,597 (16,086–23,294) | 0.81 | 13,273 | 6.98 | 0 | PostgreSQL-bound 8/15 |
| GET /world/{id} | 17,116 (13,127–17,418) | 0.97 | 12,954 | 8.57 | 0 | PostgreSQL-bound 15/15 |
| GET /worlds | 13,569 (9,070–13,780) | 0.97 | 11,204 | 10.94 | 0 | PostgreSQL-bound 15/15 |
| POST /form | 118,297 (89,667–120,662) | 1.37 | 59,483 | 2.04 | 0 | |
| GET /me | 17,257 (12,866–17,547) | 1.81 | 12,003 | 9.07 | 0 | PostgreSQL-bound 15/15 |
| /updates?queries=20 | 477 (359–483) | 0.99 | 399 | 266.66 | 0 | PostgreSQL-bound 15/15 |
| PUT /world/{id} | 14,055 (10,829–14,399) | 0.99 | 11,962 | 10.33 | 0 | PostgreSQL-bound 15/15 |
Measured versions
actix-csrf0.8.0actix-http3.21.0actix-session0.11.0actix-web4.19.0argon20.6.0askama0.16.1sqlx0.9.0tokio1.54.1
Runner jobs
| Job | CPU model | Rounds | Status |
|---|---|---|---|
| 1 | EPYC 9V74 | 5 | measured |
| 2 | EPYC 9V74 | 5 | measured |
| 3 | EPYC 9V74 | 5 | measured |