HttpArena
Comparisons

Python web framework comparison: any two, head to head

aiohttp is quicker than starlette on 10 of the 13 profiles they both run, and behind on 3. On the HTTP/1.1 composite they score 2044 and 1604.

Pick any two of the 16 Python entries. Requests per second is the best of three runs and the delta is the first column against the second; every row is the same profile at the same connection count, on the same machine. What each profile measures.

ProfileConnsaiohttp req/secstarlette req/secDeltaaiohttp p99starlette p99
Baseline4,096590,654399,413+48%13.00ms14.50ms
Pipelined4,0961,071,731487,988+120%114.60ms220.60ms
Short-lived4,096506,608361,088+40%129.90ms60.00ms
Async Delay32,000538,785315,041+71%69.00ms234.40ms
Latency-10K1,0249,9829,980+0%287.0us461.0us
Latency-1M1,024645,022410,755+57%10342400.0us13242368.0us
Latency-500K/81,024102,97162,708+64%15839232.0us17276928.0us
JSON Comp4,096101,899130,650-22%249.60ms415.30ms
JSON Comp16,38499,450126,853-22%2.77s700.80ms
JSON TLS4,096240,408185,089+30%103.00ms219.31ms
8Gbit51249,38149,387-0%434.0us769.0us
Static TLS1,02482,56322,998+259%47.21ms263.52ms
Async DB1,024102,11988,740+15%52.20ms79.90ms

Common comparisons

aiohttp vs starlette · aiohttp vs sanic · aiohttp vs litestar · starlette vs sanic · starlette vs litestar · sanic vs litestar

Questions

Is aiohttp faster than starlette?

aiohttp is quicker than starlette on 10 of the 13 profiles they both run, and behind on 3. On the HTTP/1.1 composite they score 2044 and 1604. Both run on the same machine, in the same round, against the same profiles.

Is aiohttp faster than sanic?

sanic is quicker than aiohttp on 6 of the 9 profiles they both run, and behind on 2. On the HTTP/1.1 composite they score 2044 and 1602. Both run on the same machine, in the same round, against the same profiles.

Is aiohttp faster than litestar?

aiohttp is quicker than litestar on 9 of the 13 profiles they both run, and behind on 3. On the HTTP/1.1 composite they score 2044 and 1487. Both run on the same machine, in the same round, against the same profiles.

Is starlette faster than sanic?

sanic is quicker than starlette on 9 of the 9 profiles they both run. On the HTTP/1.1 composite they score 1604 and 1602. Both run on the same machine, in the same round, against the same profiles.

Which Python framework is fastest overall?

fastpysgi-wsgi holds the highest HTTP/1.1 composite of the Python entries, at 3148. The composite is throughput over the whole suite; if a service is one shape of workload, compare that profile on its own in the table above, because the order changes.

Every Python entry

Results updated · Python composite ranking · Compare across languages · Other languages · Open the leaderboard