fastapi
Flagship · Python · engine: uvicorn · standard configuration · completeness 4/4
FastAPI async web framework on Uvicorn (uvloop)
Composite rank
Each profile of a family is worth its weight × 1,000 to the entry that leads it - 1, or 0.5 apiece for two profiles that measure one thing - and the composite is the sum over the family, less 2.5% for each of routing, middleware, request and response the entry does not do for you - its completeness factor, which the WebSocket and gRPC families do not carry. The field is this entry's own league: engines and reverse proxies are scored apart from frameworks. How it works.
| Family | Rank | Composite |
|---|---|---|
| HTTP/1.1 | 75 of 88 | 860 |
Every result
Alpha Round, 11 runs. Requests per second is the best of three; latency, CPU and memory come from that run.
| Category | Profile | Conns | Req/sec | Avg | p99 | CPU | Memory |
|---|---|---|---|---|---|---|---|
| Connection | Baseline | 4,096 | 298,664 | 13.66ms | 21.30ms | 6502.1% | 4.9GiB |
| Connection | Pipelined | 4,096 | 343,195 | 187.01ms | 261.60ms | 6375.1% | 5.0GiB |
| Connection | Short-lived | 4,096 | 273,929 | 10.52ms | 79.20ms | 6328.2% | 6.2GiB |
| Concurrency | Async Delay | 32,000 | 190,420 | 160.33ms | 284.60ms | 6138.4% | 6.0GiB |
| Efficiency | Latency-10K | 1,024 | 9,982 | 331.9us | 590.0us | 274.3% | 4.9GiB |
| Efficiency | Latency-1M | 1,024 | 301,330 | 6756142.8us | 14585856.0us | 6348.5% | 4.9GiB |
| Workload | JSON Comp | 4,096 | 101,178 | 36.47ms | 537.40ms | 6450.8% | 5.1GiB |
| Workload | JSON Comp | 16,384 | 98,959 | 98.36ms | 717.50ms | 6439.6% | 5.2GiB |
| Workload | JSON TLS | 4,096 | 133,489 | 29.72ms | 131.52ms | 6229.7% | 5.1GiB |
| Workload | 8Gbit | 512 | 49,117 | 374.3us | 903.0us | 1310.5% | 4.9GiB |
| Workload | Static TLS | 1,024 | 22,711 | 45.14ms | 171.42ms | 6657.3% | 5.5GiB |
Compared with
The Python web frameworks around fastapi on the HTTP/1.1 composite, and the one leading them. Entries of other leagues are left out: a composite does not carry from one league to another. The last column shows every profile side by side.
| Entry | Composite | vs fastapi | |
|---|---|---|---|
| mq-bridge-py | 1571 | +83% | head to head |
| sanic | 1018 | +18% | head to head |
| litestar | 963 | +12% | head to head |
| robyn | 607 | -29% | head to head |
| slimeweb | 428 | -50% | head to head |
Compare fastapi with any Python entry · Compare fastapi with any entry, in any language · Every Python entry, ranked
Results updated · How the benchmark is run · The machine · Add or fix an entry