Implementation
Phoenix
Phoenix 1.8.16 · Elixir · Full-stack frameworks · ranked
Scores
| Category | Position | Score | ± |
|---|---|---|---|
| Hello world | 10 | 0.16* | ±29.7% |
| Database | 3–7 | 0.87* | ±19.1% |
| Application | 7 | 0.56* | ±19.5% |
| Memory (high-water mark) | 9 | 0.41 | ±3.3% |
| Startup | 1–13 | 0.93≈ | ±16.2% |
Runner CPUs: EPYC 9V74, EPYC 7763, EPYC 9V45
Settings
- Runtime
- Elixir 1.20.5 on Erlang/OTP 29.1.2 (mix release)
- Server
- Bandit 1.14 (Phoenix's default adapter)
- Workers
- One BEAM node; one scheduler online per CPU the container may use (2)
- Database layer
- Ecto 3.14 with Postgrex, pool of DB_POOL_SIZE (16) connections
- Templates
- HEEx
- Logging
- Logger level :warning (no request lines)
- Dependency source
- –
- Status
- measured
Application endpoints: mechanisms
- Validation
- Schemaless Ecto changesets for the query string, the JSON body and the form: 422; the id cast with Ecto.Type.cast: 400 for a non-integer; malformed JSON 400
- CSRF
- token (built-in): protect_from_forgery (:browser pipeline, Plug.CSRFProtection): token in the signed cookie session, masked _csrf_token field; 403
- Session store
- postgresql (generator): mix phx.gen.auth: a session token in the signed cookie session, looked up in users_tokens joined with users (one query); bcrypt_elixir on users.password_bcrypt
Tier 1 endpoints
| Endpoint | req/s | vs Axum | Efficiency (req/CPU-s) | p99 (ms) | Errors | Limits |
|---|---|---|---|---|---|---|
| /text | 29,205 (19,437–60,710) | 0.17 | 14,616 | 5.42 | 0 | |
| /json | 27,532 (18,611–57,924) | 0.17 | 13,772 | 5.40 | 0 | |
| /db-single | 13,814 (9,072–27,358) | 0.75 | 6,927 | 10.22 | 0 | |
| /html | 20,672 (14,824–44,967) | 0.13 | 10,340 | 9.28 | 0 | |
| /queries?queries=20 | 1,385 (892–2,633) | 1.25 | 698 | 96.86 | 0 | PostgreSQL-bound 10/15 |
| /fortunes | 11,447 (7,732–22,198) | 0.42 | 5,728 | 11.93 | 0 | |
| GET /world/{id} | 13,686 (8,788–27,409) | 0.77 | 6,860 | 10.31 | 0 | |
| GET /worlds | 10,346 (7,019–19,400) | 0.74 | 5,180 | 13.81 | 0 | |
| POST /form | 12,768 (9,490–28,769) | 0.18 | 6,391 | 14.34 | 0 | |
| GET /me | 8,628 (6,068–17,361) | 0.94 | 4,320 | 16.34 | 0 | |
| /updates?queries=20 | 632 (433–1,228) | 1.33 | 320 | 206.09 | 0 | PostgreSQL-bound 15/15 |
| PUT /world/{id} | 7,947 (5,401–15,315) | 0.56 | 3,994 | 18.02 | 0 |
Measured versions
bandit1.14.1db_connection2.10.2ecto3.14.3ecto_sql3.14.0elixir1.20.5otp29.1.2phoenix1.8.16phoenix_html4.4.0phoenix_live_view1.2.13plug1.20.3postgrex0.22.4thousand_island1.6.0
Runner jobs
| Job | CPU model | Rounds | Status |
|---|---|---|---|
| 1 | EPYC 9V74 | 5 | measured |
| 2 | EPYC 7763 | 5 | measured |
| 3 | EPYC 9V45 | 5 | measured |