3.31 · Guides
FIELD NOTE · 2026-11-17 16:55:42 +0100 · Linux-7.2.11-arch1-1-x86_64-with-glibc2.44
Benchmarks¶
One API. Two server setups.¶
Four framework stacks served the same small API and PostgreSQL data. These measurements describe one machine and one benchmark session; they do not rank frameworks or predict production performance.
Read this first
Hinoki is pre-alpha. The run used one host, warm data and loopback networking. It is not a framework ranking or a production claim. Unstable samples stay visible as withheld results.
Results¶
Switch the server setup to compare each stack on its documented server or compare the three ASGI stacks on Granian. Each chart starts at zero and uses its own scale; read exact values and run ranges in the tables below.
Each framework runs on the server it documents: Hinoki on Granian, FastAPI and Django Ninja on Uvicorn, Django Bolt on its own Actix server. A difference here can come from the server as well as from the framework.
LIST
GET /posts?page=1&page_size=20
Published posts with their author, newest first, in a page envelope with the total: one COUNT and one joined SELECT.
Django Bolt · Actix: median 1,681, range 1,676 to 1,696 requests per second; Hinoki · Granian: median 1,624, range 1,571 to 1,647 requests per second; FastAPI · Uvicorn: median 1,557, range 1,515 to 1,559 requests per second; Django Ninja · Uvicorn: median 985, range 981 to 986 requests per second.
Bars show median requests per second; the table below gives the lowest and highest run.
| Stack | Requests/s | p50 ms | p99 ms | CV | Unexpected | Runs |
|---|---|---|---|---|---|---|
| Django Bolt · Actix | 1,6811,676–1,696 | 37.6 | 66.7 | 0.5% | 0 | 5 |
| Hinoki · Granian | 1,6241,571–1,647 | 37.8 | 66.8 | 1.8% | 0 | 5 |
| FastAPI · Uvicorn | 1,5571,515–1,559 | 25.4 | 33.9 | 1.4% | 0 | 5 |
| Django Ninja · Uvicorn | 985981–986 | 65.0 | 91.3 | 0.2% | 0 | 5 |
DETAIL
GET /posts/{id}
One published post with its author: one joined SELECT.
Hinoki · Granian: median 10,150, range 10,078 to 10,285 requests per second; Django Bolt · Actix: median 4,918, range 4,864 to 4,955 requests per second; FastAPI · Uvicorn: median 3,307, range 2,745 to 3,385 requests per second; Django Ninja · Uvicorn: median 1,817, range 1,803 to 1,819 requests per second.
Bars show median requests per second; the table below gives the lowest and highest run.
| Stack | Requests/s | p50 ms | p99 ms | CV | Unexpected | Runs |
|---|---|---|---|---|---|---|
| Hinoki · Granian | 10,15010,078–10,285 | 6.2 | 10.8 | 0.8% | 0 | 5 |
| Django Bolt · Actix | 4,9184,864–4,955 | 12.5 | 24.2 | 0.7% | 0 | 5 |
| FastAPI · Uvicorn | 3,3072,745–3,385 | 11.8 | 40.8 | 8.1% | 0 | 5 |
| Django Ninja · Uvicorn | 1,8171,803–1,819 | 34.5 | 49.0 | 0.3% | 0 | 5 |
HEALTH
GET /health
Static JSON, no database: a diagnostic of the framework and server path.
Django Bolt · Actix: median 66,235, range 65,738 to 68,194 requests per second; Hinoki · Granian: median 35,839, range 35,511 to 36,961 requests per second; FastAPI · Uvicorn: median 18,164, range 17,907 to 18,621 requests per second; Django Ninja · Uvicorn: median 4,695, range 4,634 to 4,744 requests per second.
Bars show median requests per second; the table below gives the lowest and highest run.
| Stack | Requests/s | p50 ms | p99 ms | CV | Unexpected | Runs |
|---|---|---|---|---|---|---|
| Django Bolt · Actix | 66,23565,738–68,194 | 0.9 | 1.2 | 1.6% | 0 | 5 |
| Hinoki · Granian | 35,83935,511–36,961 | 1.7 | 4.0 | 1.9% | 0 | 5 |
| FastAPI · Uvicorn | 18,16417,907–18,621 | 3.4 | 6.2 | 1.5% | 0 | 5 |
| Django Ninja · Uvicorn | 4,6954,634–4,744 | 13.4 | 21.0 | 1.0% | 0 | 5 |
All listed stacks passed the response and SQL statement-count verifier before measurement. Requests in flight at the end of a sample were aborted by oha; they are not counted as unexpected responses.
Run environment
Run on 2026-11-17 16:55:42 +0100. Intel(R) Core(TM) i5-10300H CPU @ 2.50GHz; 8 logical CPUs; Linux-7.2.11-arch1-1-x86_64-with-glibc2.44. Load average at start: 0.90, 1.74, 1.71. 4 server processes on CPUs 0-3; load generator on CPUs 6-7; 64 concurrent connections; 10 s warm-up; 5 measured runs of 20 s; postgres (PostgreSQL) 17.12 (Debian 17.12-1.pgdg13+1); oha 1.17.0.
Hinoki, FastAPI and Django Ninja run on one Granian version and configuration, which takes the server out of the comparison. Django Bolt is not in this slice because it does not expose ASGI.
LIST
GET /posts?page=1&page_size=20
Published posts with their author, newest first, in a page envelope with the total: one COUNT and one joined SELECT.
FastAPI · Granian: median 1,638, range 1,618 to 1,644 requests per second; Hinoki · Granian: median 1,613, range 1,611 to 1,618 requests per second; Django Ninja · Granian: median 1,026, range 1,019 to 1,030 requests per second.
Bars show median requests per second; the table below gives the lowest and highest run.
| Stack | Requests/s | p50 ms | p99 ms | CV | Unexpected | Runs |
|---|---|---|---|---|---|---|
| FastAPI · Granian | 1,6381,618–1,644 | 38.5 | 64.0 | 0.6% | 0 | 5 |
| Hinoki · Granian | 1,6131,611–1,618 | 39.4 | 66.0 | 0.2% | 0 | 5 |
| Django Ninja · Granian | 1,0261,019–1,030 | 62.6 | 96.8 | 0.5% | 0 | 5 |
DETAIL
GET /posts/{id}
One published post with its author: one joined SELECT.
Hinoki · Granian: median 10,464, range 10,322 to 10,511 requests per second; FastAPI · Granian: median 3,778, range 3,706 to 3,794 requests per second; Django Ninja · Granian: median 2,026, range 2,022 to 2,031 requests per second.
Bars show median requests per second; the table below gives the lowest and highest run.
| Stack | Requests/s | p50 ms | p99 ms | CV | Unexpected | Runs |
|---|---|---|---|---|---|---|
| Hinoki · Granian | 10,46410,322–10,511 | 6.0 | 11.1 | 0.7% | 0 | 5 |
| FastAPI · Granian | 3,7783,706–3,794 | 17.3 | 28.5 | 1.0% | 0 | 5 |
| Django Ninja · Granian | 2,0262,022–2,031 | 31.2 | 53.2 | 0.2% | 0 | 5 |
HEALTH
GET /health
Static JSON, no database: a diagnostic of the framework and server path.
FastAPI · Granian: median 39,129, range 38,892 to 39,276 requests per second; Hinoki · Granian: median 36,416, range 35,651 to 37,332 requests per second; Django Ninja · Granian: median 5,397, range 5,237 to 5,483 requests per second.
Bars show median requests per second; the table below gives the lowest and highest run.
| Stack | Requests/s | p50 ms | p99 ms | CV | Unexpected | Runs |
|---|---|---|---|---|---|---|
| FastAPI · Granian | 39,12938,892–39,276 | 1.6 | 3.7 | 0.4% | 0 | 5 |
| Hinoki · Granian | 36,41635,651–37,332 | 1.6 | 3.8 | 2.1% | 0 | 5 |
| Django Ninja · Granian | 5,3975,237–5,483 | 11.2 | 20.9 | 1.8% | 0 | 5 |
All listed stacks passed the response and SQL statement-count verifier before measurement. Requests in flight at the end of a sample were aborted by oha; they are not counted as unexpected responses.
Run environment
Run on 2026-11-17 17:28:20 +0100. Intel(R) Core(TM) i5-10300H CPU @ 2.50GHz; 8 logical CPUs; Linux-7.2.11-arch1-1-x86_64-with-glibc2.44. Load average at start: 0.90, 7.72, 8.49. 4 server processes on CPUs 0-3; load generator on CPUs 6-7; 64 concurrent connections; 10 s warm-up; 5 measured runs of 20 s; postgres (PostgreSQL) 17.12 (Debian 17.12-1.pgdg13+1); oha 1.17.0.
What was measured¶
One service, two tables and deterministic seed data: 100 authors and 10,000 posts, 80% published. Every stack had to match a PostgreSQL oracle and the same SQL statement count per request before measurement.
| Scenario | Request | What the service does |
|---|---|---|
list |
GET /posts?page=1&page_size=20 |
Published posts with their author, newest first, in a page envelope with the total: one COUNT and one joined SELECT. |
detail |
GET /posts/{id} |
One published post with its author: one joined SELECT. |
health |
GET /health |
Static JSON, no database: a diagnostic of the framework and server path. |
create |
POST /posts |
Validate the body, insert, return the post with its author: one INSERT and one author SELECT. |
| Stack | ORM and driver | Server | Versions |
|---|---|---|---|
| Hinoki | Hinoki ORM (Rust, tokio-postgres) | Granian (ASGI) | hinoki 0.0.1, granian 2.8.8 |
| FastAPI | SQLAlchemy async, asyncpg | Uvicorn with uvloop | fastapi 0.162.7, sqlalchemy 2.1.8, asyncpg 0.32.0, uvicorn 0.54.0 |
| Django Ninja | Django async ORM, psycopg 3 pool | Uvicorn with uvloop | django-ninja 1.8.0, django 6.1.3, psycopg 3.3.9 |
| Django Bolt | Django async ORM, psycopg 3 pool | its own Actix server | django-bolt 0.13.0 |
How to read the numbers¶
- Requests per second and latency are one measurement. Every run keeps 64 connections busy, so higher latency means fewer requests per second; the two do not confirm each other.
- Each chart starts at 0 and shows the median requests per second. Bars are sorted from highest to lowest within a workload and server setup. Each panel has its own scale; use the tables for exact values and the lowest-to-highest run range.
- p50 and p99 are medians of per-run percentiles, not percentiles of all requests pooled together. A range is descriptive, not a confidence interval.
- CV is the coefficient of variation of requests per second across runs. Above 15% for any stack, the scenario is not reported: the samples are too unstable to compare, and the raw files are kept.
- What this does not cover: TLS, proxies, authentication, compression, memory, cold data, larger tables or other hardware. Pool sizes are equal per process, but each library schedules work differently.
Reproduce¶
cd benchmarks/comparative
uv sync --locked
VIRTUAL_ENV=$PWD/.venv uvx maturin develop --release --uv --manifest-path ../../crates/bindings/Cargo.toml
uv run --locked python run.py --server-mode documented --out results/YYYY-MM-DD/documented
uv run --locked python run.py --server-mode same-granian --out results/YYYY-MM-DD/same-granian
uv run --locked python report.py results/YYYY-MM-DD/documented results/YYYY-MM-DD/same-granian > ../../docs/benchmarks.md
Raw oha JSON, environment records, server logs, per-worker CPU time and verification output are kept in benchmarks/comparative/results/2026-11-17/. Setup details, the database container and the rules for repeating an unstable scenario are in benchmarks/comparative/README.md.