Table of contents

Accept a request and return HTML response with a custom dynamic header

The test simulates just a single HTML response.

Sorted by max req/s

Framework Requests/sec Latency 50% (ms) Latency 75% (ms) Latency Avg (ms)
blacksheep 1.0.3 16808 3.42 4.83 3.77
muffin 0.69.5 14586 3.84 5.60 4.36
starlette 0.14.2 13966 4.13 5.87 4.55
falcon 3.0.0 13413 4.15 6.12 4.73
fastapi 0.63.0 9068 6.30 9.09 7.03
sanic 21.3.4 7733 7.12 10.72 8.28
aiohttp 3.7.4.post0 7226 8.67 8.88 8.86
quart 0.14.1 3168 20.55 21.70 20.20
django 3.2 1526 41.41 46.36 41.92

Parse uploaded file, store it on disk and return a text response

The test simulates multipart formdata processing and work with files.

Sorted by max req/s

Framework Requests/sec Latency 50% (ms) Latency 75% (ms) Latency Avg (ms)
blacksheep 1.0.3 5240 9.83 16.21 12.28
muffin 0.69.5 3842 13.32 22.21 16.65
sanic 21.3.4 3663 14.10 23.16 17.45
falcon 3.0.0 3106 17.85 26.85 20.67
starlette 0.14.2 2164 32.20 38.58 29.53
aiohttp 3.7.4.post0 2078 30.36 30.82 30.78
fastapi 0.63.0 1910 38.48 42.72 33.44
quart 0.14.1 1206 53.37 55.29 53.04
django 3.2 828 76.00 87.62 77.17

Parse path params, query string, JSON body and return a json response

The test simulates a simple JSON REST API endpoint.

Sorted by max req/s

Framework Requests/sec Latency 50% (ms) Latency 75% (ms) Latency Avg (ms)
blacksheep 1.0.3 9032 6.36 9.12 7.05
falcon 3.0.0 8800 5.86 9.61 7.24
muffin 0.69.5 8326 6.26 10.11 7.65
starlette 0.14.2 7416 7.00 11.35 8.60
sanic 21.3.4 6401 8.18 13.06 10.01
fastapi 0.63.0 5709 8.87 14.92 11.17
aiohttp 3.7.4.post0 4313 14.64 14.94 14.84
quart 0.14.1 2045 30.88 31.96 31.28
django 3.2 1287 49.51 55.12 49.66

Composite stats

Combined benchmarks results

Sorted by completed requests

Framework Requests completed Avg Latency 50% (ms) Avg Latency 75% (ms) Avg Latency (ms)
blacksheep 1.0.3 466200 6.54 10.05 7.7
muffin 0.69.5 401310 7.81 12.64 9.55
falcon 3.0.0 379785 9.29 14.19 10.88
starlette 0.14.2 353190 14.44 18.6 14.23
sanic 21.3.4 266955 9.8 15.65 11.91
fastapi 0.63.0 250305 17.88 22.24 17.21
aiohttp 3.7.4.post0 204255 17.89 18.21 18.16
quart 0.14.1 96285 34.93 36.32 34.84
django 3.2 54615 55.64 63.03 56.25