Implementation

Django

Django 6.1.3 · Python · Full-stack frameworks · ranked

frameworks/django on GitHub

Scores

Score relative to Axum (1.00×, higher is better) and position among the 14 ranked implementations; Stability: pass.
CategoryPositionScore±
Hello world120.030*±15.0%
Database11–130.25*±32.0%
Application11–130.13*±17.2%
Memory (high-water mark)70.54±0.6%
Startup1–130.90±16.2%

Runner CPUs: EPYC 7763, EPYC 7763, EPYC 7763

Settings

Runtime
Python 3.15.2
Server
Gunicorn 27 (gthread worker)
Workers
BENCH_WORKERS (2) processes x 8 threads
Database layer
Django ORM with psycopg 3.3 (C extension); persistent connections (CONN_MAX_AGE), one per thread, 16 in total
Templates
Django templates (cached loader)
Logging
none (Gunicorn's access log is off; Django logs only warnings and errors)
Dependency source
–
Status
measured

Notes

Application endpoints: mechanisms

Validation
<int:id> path converter (404); Django forms for the query string (Form(request.GET)), the JSON body (Form(json.loads(body)), plus a JSON integer check) and the form (Form(request.POST)): 422; malformed JSON 400
CSRF
token (built-in): CsrfViewMiddleware: secret in the csrftoken cookie, masked csrfmiddlewaretoken field, Origin checked when present; 403
Session store
postgresql (built-in): django.contrib.auth (LoginView, AuthenticationMiddleware) with the database session backend (django_session); custom user model on users, BCryptPasswordHasher

Tier 1 endpoints

Medians over every round (lowest and highest round in brackets); vs Axum: the median of the per-round ratios on the same runners.
Endpointreq/svs AxumEfficiency (req/CPU-s)p99 (ms)ErrorsLimits
/text3,700 (3,548–3,796)0.031,85188.800
/json3,574 (3,430–3,682)0.031,78990.440
/db-single1,873 (1,775–1,916)0.1593794.200
/html3,192 (3,034–3,272)0.031,59797.270
/queries?queries=20234 (222–240)0.30117691.010
/fortunes1,376 (1,297–1,401)0.07688134.070
GET /world/{id}1,669 (1,601–1,693)0.14837103.200
GET /worlds1,207 (1,146–1,224)0.12605147.590
POST /form2,148 (2,026–2,195)0.041,076121.860
GET /me1,073 (1,010–1,092)0.16537166.560
/updates?queries=20130 (122–133)0.39651,252.000
PUT /world/{id}1,179 (1,111–1,204)0.12592137.780

Measured versions

Runner jobs

Each job ran on its own GitHub-hosted runner; the CPU model differs between jobs.
JobCPU modelRoundsStatus
1EPYC 77635measured
2EPYC 77635measured
3EPYC 77635measured