Benchmarks¶
h2corn delivered 9.1–28× the throughput of the compared servers in the one-worker HTTP/1.1 GET comparison. All serve the same Starlette application over loopback; h2corn uses its profile-guided release wheel.
Connect on h2corn delivered 1.3–2.9× the throughput of grpc.aio across the five direction-resolved gRPC workloads, and 3.0× in the calibration-limited cleartext Duplex run; Download and Upload remained inconclusive on the shared host. These compare complete stacks using common Python handlers and protobuf codecs, not the host server in isolation.
Environment¶
Python 3.15.1 | Linux 7.3.5 | x86_64 · CPU: AMD Ryzen 9 5950X 16-Core Processor
gunicorn 26.2.0, h11 0.16.0, h2 4.4.1, h2corn 2.0.1, hypercorn 0.18.0, starlette 1.9.0, uvicorn 0.54.0, websockets 17.3.
Results¶
HTTP/1 GET (1 Worker)¶
Detailed results
| Server | Requests/s | Blocks | p50 latency (ms) | p99 latency (ms) | PSS (MB) | Throughput vs h2corn |
|---|---|---|---|---|---|---|
| h2corn | 52,978 | 6 | 1.761 | 5.246 | 61.3 | - |
| uvicorn | 4,570 | 6 | 21.427 | 31.100 | 27.5 | inconclusive (calibration-limited) |
| hypercorn | 1,939 | 6 | 50.185 | 88.778 | 52.1 | inconclusive (calibration-limited) |
| gunicorn | 6,199 | 6 | 15.991 | 20.780 | 41.3 | inconclusive (calibration-limited) |
Collection: calibration-limited.
HTTP/1 GET (4 Workers)¶
Detailed results
| Server | Requests/s | Blocks | p50 latency (ms) | p99 latency (ms) | PSS (MB) | Throughput vs h2corn |
|---|---|---|---|---|---|---|
| h2corn | 219,238 | 6 | 0.413 | 1.108 | 120.8 | - |
| uvicorn | 24,745 | 6 | 3.820 | 8.638 | 112.2 | inconclusive (calibration-limited) |
| hypercorn | 10,837 | 6 | 7.776 | 21.902 | 124.2 | inconclusive (calibration-limited) |
| gunicorn | 37,387 | 6 | 2.245 | 5.832 | 86.7 | inconclusive (calibration-limited) |
Collection: calibration-limited.
HTTP/1 GET over UDS (1 Worker)¶
Detailed results
| Server | Requests/s | Blocks | p50 latency (ms) | p99 latency (ms) | PSS (MB) | Throughput vs h2corn |
|---|---|---|---|---|---|---|
| h2corn | 98,347 | 6 | 0.961 | 1.835 | 61.3 | - |
| uvicorn | 7,952 | 6 | 12.123 | 16.162 | 27.5 | slower |
| hypercorn | 3,231 | 6 | 29.755 | 48.905 | 52.0 | slower |
| gunicorn | 11,706 | 6 | 8.318 | 11.941 | 41.2 | slower |
Collection: direction-resolved.
HTTP/1 GET over UDS (4 Workers)¶
Detailed results
| Server | Requests/s | Blocks | p50 latency (ms) | p99 latency (ms) | PSS (MB) | Throughput vs h2corn |
|---|---|---|---|---|---|---|
| h2corn | 226,901 | 6 | 0.434 | 1.060 | 123.4 | - |
| uvicorn | 27,061 | 6 | 3.493 | 7.447 | 113.6 | slower |
| hypercorn | 11,724 | 6 | 8.545 | 18.016 | 125.3 | slower |
| gunicorn | 41,255 | 6 | 2.254 | 5.226 | 88.1 | slower |
Collection: direction-resolved.
HTTP/1 Portable streaming download (1 Worker)¶
Detailed results
| Server | Requests/s | Blocks | p50 latency (ms) | p99 latency (ms) | PSS (MB) | Throughput vs h2corn |
|---|---|---|---|---|---|---|
| h2corn | 7,800 | 6 | 11.722 | 33.973 | 65.6 | - |
| uvicorn | 1,094 | 6 | 87.458 | 112.709 | 33.2 | slower |
| hypercorn | 748 | 6 | 124.579 | 165.123 | 59.0 | slower |
| gunicorn | 1,545 | 6 | 62.249 | 90.739 | 45.5 | slower |
Collection: direction-resolved.
HTTP/1 Portable streaming download (4 Workers)¶
Detailed results
| Server | Requests/s | Blocks | p50 latency (ms) | p99 latency (ms) | PSS (MB) | Throughput vs h2corn |
|---|---|---|---|---|---|---|
| h2corn | 21,228 | 6 | 4.034 | 14.977 | 139.3 | - |
| uvicorn | 4,659 | 6 | 18.274 | 39.585 | 123.8 | slower |
| hypercorn | 3,039 | 6 | 26.625 | 68.904 | 136.9 | slower |
| gunicorn | 6,992 | 6 | 12.599 | 26.184 | 89.9 | slower |
Collection: direction-resolved.
HTTP/1 Static file (1 Worker)¶
Detailed results
| Server | Requests/s | Blocks | p50 latency (ms) | p99 latency (ms) | PSS (MB) | Throughput vs h2corn |
|---|---|---|---|---|---|---|
| h2corn | 5,093 | 6 | 19.006 | 34.884 | 160.1 | - |
| uvicorn | 633 | 6 | 155.162 | 189.991 | 70.9 | inconclusive (calibration-limited) |
| hypercorn | 507 | 6 | 192.217 | 222.341 | 86.9 | inconclusive (calibration-limited) |
| gunicorn | failed | - | - | - | - | - |
Collection: calibration-limited.
HTTP/1 Static file (4 Workers)¶
Detailed results
| Server | Requests/s | Blocks | p50 latency (ms) | p99 latency (ms) | PSS (MB) | Throughput vs h2corn |
|---|---|---|---|---|---|---|
| h2corn | 15,513 | 6 | 5.326 | 19.001 | 405.5 | - |
| uvicorn | 2,328 | 6 | 42.187 | 73.610 | 210.3 | inconclusive (calibration-limited) |
| hypercorn | 1,945 | 6 | 46.756 | 98.135 | 216.5 | inconclusive (calibration-limited) |
| gunicorn | failed | - | - | - | - | - |
Collection: calibration-limited.
HTTP/1 Streaming POST (1 Worker)¶
Detailed results
| Server | Requests/s | Blocks | p50 latency (ms) | p99 latency (ms) | PSS (MB) | Throughput vs h2corn |
|---|---|---|---|---|---|---|
| h2corn | 5,497 | 6 | 139.839 | 945.951 | 130.7 | - |
| uvicorn | 1,245 | 6 | 757.148 | 1,174.816 | 74.4 | inconclusive (calibration-limited) |
| hypercorn | 660 | 6 | 1,280.803 | 1,974.727 | 115.8 | inconclusive (calibration-limited) |
| gunicorn | 2,080 | 6 | 283.161 | 3,249.999 | 69.2 | inconclusive (calibration-limited) |
Collection: calibration-limited.
HTTP/1 Streaming POST (4 Workers)¶
Detailed results
| Server | Requests/s | Blocks | p50 latency (ms) | p99 latency (ms) | PSS (MB) | Throughput vs h2corn |
|---|---|---|---|---|---|---|
| h2corn | 25,292 | 6 | 31.503 | 83.256 | 196.4 | - |
| uvicorn | 5,007 | 6 | 179.732 | 370.096 | 160.0 | inconclusive (calibration-limited) |
| hypercorn | 1,713 | 6 | 212.914 | 1,219.546 | 203.0 | inconclusive (calibration-limited) |
| gunicorn | 8,520 | 6 | 110.329 | 192.358 | 125.5 | inconclusive (calibration-limited) |
Collection: calibration-limited.
HTTP/1 WebSocket (1 Worker)¶
Detailed results
| Server | Sessions/s | Blocks | p50 session (ms) | p99 session (ms) | PSS (MB) | Throughput vs h2corn |
|---|---|---|---|---|---|---|
| h2corn | 10,561 | 6 | 8.633 | 20.851 | 73.1 | - |
| uvicorn | 872 | 6 | 104.857 | 298.684 | 61.2 | inconclusive (calibration-limited) |
| hypercorn | 849 | 6 | 113.218 | 190.524 | 58.9 | inconclusive (calibration-limited) |
| gunicorn | 1,708 | 6 | 42.914 | 532.766 | 236.7 | inconclusive (calibration-limited) |
Collection: calibration-limited.
HTTP/1 WebSocket (4 Workers)¶
Detailed results
| Server | Sessions/s | Blocks | p50 session (ms) | p99 session (ms) | PSS (MB) | Throughput vs h2corn |
|---|---|---|---|---|---|---|
| h2corn | 12,945 | 6 | 6.649 | 21.197 | 145.5 | - |
| uvicorn | 3,203 | 6 | 28.842 | 72.937 | 160.1 | inconclusive (calibration-limited) |
| hypercorn | 3,406 | 6 | 27.766 | 62.201 | 139.7 | inconclusive (calibration-limited) |
| gunicorn | 5,797 | 6 | 12.179 | 82.508 | 742.2 | inconclusive (calibration-limited) |
Collection: calibration-limited.
HTTP/2 GET (1 Worker)¶
Detailed results
| Server | Requests/s | Blocks | p50 latency (ms) | p99 latency (ms) | PSS (MB) | Throughput vs h2corn |
|---|---|---|---|---|---|---|
| h2corn | 56,831 | 6 | 1.726 | 2.940 | 63.6 | - |
| uvicorn | unsupported | - | - | - | - | - |
| hypercorn | 1,246 | 6 | 76.389 | 145.446 | 57.4 | inconclusive (calibration-limited) |
| gunicorn | unsupported | - | - | - | - | - |
Collection: calibration-limited.
HTTP/2 GET (4 Workers)¶
Detailed results
| Server | Requests/s | Blocks | p50 latency (ms) | p99 latency (ms) | PSS (MB) | Throughput vs h2corn |
|---|---|---|---|---|---|---|
| h2corn | 143,653 | 6 | 0.613 | 2.088 | 131.6 | - |
| uvicorn | unsupported | - | - | - | - | - |
| hypercorn | 5,674 | 6 | 15.238 | 40.542 | 132.6 | inconclusive (calibration-limited) |
| gunicorn | unsupported | - | - | - | - | - |
Collection: calibration-limited.
HTTP/2 GET multiplexed (1 Worker)¶
Detailed results
| Server | Requests/s | Blocks | p50 latency (ms) | p99 latency (ms) | PSS (MB) | Throughput vs h2corn |
|---|---|---|---|---|---|---|
| h2corn | 33,623 | 6 | 0.243 | 1.261 | 59.4 | - |
| uvicorn | unsupported | - | - | - | - | - |
| hypercorn | 1,924 | 6 | 4.927 | 7.579 | 49.3 | inconclusive (calibration-limited) |
| gunicorn | unsupported | - | - | - | - | - |
Collection: calibration-limited.
HTTP/2 Portable streaming download (1 Worker)¶
Detailed results
| Server | Requests/s | Blocks | p50 latency (ms) | p99 latency (ms) | PSS (MB) | Throughput vs h2corn |
|---|---|---|---|---|---|---|
| h2corn | 7,426 | 6 | 11.459 | 108.176 | 72.3 | - |
| uvicorn | unsupported | - | - | - | - | - |
| hypercorn | 441 | 6 | 185.176 | 287.406 | 66.3 | slower |
| gunicorn | unsupported | - | - | - | - | - |
Collection: direction-resolved.
HTTP/2 Portable streaming download (4 Workers)¶
Detailed results
| Server | Requests/s | Blocks | p50 latency (ms) | p99 latency (ms) | PSS (MB) | Throughput vs h2corn |
|---|---|---|---|---|---|---|
| h2corn | 22,227 | 6 | 3.764 | 14.372 | 145.5 | - |
| uvicorn | unsupported | - | - | - | - | - |
| hypercorn | 2,005 | 6 | 41.214 | 110.891 | 149.0 | slower |
| gunicorn | unsupported | - | - | - | - | - |
Collection: direction-resolved.
HTTP/2 Static file (1 Worker)¶
Detailed results
| Server | Requests/s | Blocks | p50 latency (ms) | p99 latency (ms) | PSS (MB) | Throughput vs h2corn |
|---|---|---|---|---|---|---|
| h2corn | 3,874 | 6 | 24.089 | 55.599 | 164.5 | - |
| uvicorn | unsupported | - | - | - | - | - |
| hypercorn | 320 | 6 | 294.506 | 402.299 | 108.0 | inconclusive (calibration-limited) |
| gunicorn | unsupported | - | - | - | - | - |
Collection: calibration-limited.
HTTP/2 Static file (4 Workers)¶
Detailed results
| Server | Requests/s | Blocks | p50 latency (ms) | p99 latency (ms) | PSS (MB) | Throughput vs h2corn |
|---|---|---|---|---|---|---|
| h2corn | 9,726 | 6 | 8.608 | 34.285 | 432.4 | - |
| uvicorn | unsupported | - | - | - | - | - |
| hypercorn | 979 | 6 | 88.850 | 231.853 | 222.4 | inconclusive (calibration-limited) |
| gunicorn | unsupported | - | - | - | - | - |
Collection: calibration-limited.
HTTP/2 Streaming POST (1 Worker)¶
Detailed results
| Server | Requests/s | Blocks | p50 latency (ms) | p99 latency (ms) | PSS (MB) | Throughput vs h2corn |
|---|---|---|---|---|---|---|
| h2corn | 4,394 | 6 | 171.659 | 1,023.350 | 151.2 | - |
| uvicorn | unsupported | - | - | - | - | - |
| hypercorn | failed | - | - | - | - | - |
| gunicorn | unsupported | - | - | - | - | - |
Collection: no-comparison.
HTTP/2 Streaming POST (4 Workers)¶
Detailed results
| Server | Requests/s | Blocks | p50 latency (ms) | p99 latency (ms) | PSS (MB) | Throughput vs h2corn |
|---|---|---|---|---|---|---|
| h2corn | 25,601 | 6 | 30.187 | 97.972 | 240.9 | - |
| uvicorn | unsupported | - | - | - | - | - |
| hypercorn | 888 | 6 | 1,075.800 | 1,635.828 | 254.1 | inconclusive (calibration-limited) |
| gunicorn | unsupported | - | - | - | - | - |
Collection: calibration-limited.
gRPC Environment¶
Python 3.15.1 | Linux 7.3.5 | x86_64 · CPU: AMD Ryzen 9 5950X 16-Core Processor
connectrpc 0.13.0, grpcio 1.85.4, grpclib 0.4.9, hypercorn 0.18.0, protobuf-py 0.7.0, protobuf-py-ext 0.7.0.
gRPC Results¶
gRPC Download¶
Detailed results
| Server | Median messages/s | Blocks | Median complete RPC/s | Median completed RPCs/trial | p50 latency (ms) | p99 latency (ms) | PSS (MB) | Throughput vs h2corn |
|---|---|---|---|---|---|---|---|---|
| Connect / h2corn | 7,726 | 12 | 483 | 488.5 | 15.678 | 39.791 | 60.7 | - |
| Connect / Hypercorn | 2,523 | 12 | 158 | 160 | 46.617 | 72.910 | 57.4 | slower |
| grpc.aio | 5,762 | 12 | 360 | 366.5 | 20.605 | 42.176 | 53.9 | inconclusive |
| grpclib | not selected | - | - | - | - | - | - | - |
Collection: maximum-look.
gRPC Duplex¶
Detailed results
| Server | Median messages/s | Blocks | Median complete RPC/s | Median completed RPCs/trial | p50 latency (ms) | p99 latency (ms) | PSS (MB) | Throughput vs h2corn |
|---|---|---|---|---|---|---|---|---|
| Connect / h2corn | 38,746 | 6 | 605 | 2,428 | 12.783 | 24.767 | 62.7 | - |
| Connect / Hypercorn | 7,845 | 6 | 123 | 494.5 | 66.409 | 105.845 | 36.9 | inconclusive (calibration-limited) |
| grpc.aio | 13,108 | 6 | 205 | 824.5 | 37.999 | 68.350 | 56.2 | inconclusive (calibration-limited) |
| grpclib | 10,365 | 6 | 162 | 650 | 49.470 | 75.519 | 29.5 | inconclusive (calibration-limited) |
Collection: calibration-limited.
gRPC TLS-Duplex TLS¶
Detailed results
| Server | Median messages/s | Blocks | Median complete RPC/s | Median completed RPCs/trial | p50 latency (ms) | p99 latency (ms) | PSS (MB) | Throughput vs h2corn |
|---|---|---|---|---|---|---|---|---|
| Connect / h2corn | 43,509 | 6 | 680 | 685 | 11.743 | 19.409 | 68.0 | - |
| Connect / Hypercorn | 8,611 | 6 | 135 | 140 | 60.645 | 84.221 | 39.3 | slower |
| grpc.aio | 15,182 | 6 | 237 | 240.5 | 33.423 | 48.392 | 57.0 | slower |
| grpclib | not selected | - | - | - | - | - | - | - |
Collection: direction-resolved.
gRPC TLS-U32 TLS¶
Detailed results
| Server | Median RPC/s | Blocks | Median completed RPCs/trial | p50 latency (ms) | p99 latency (ms) | PSS (MB) | Throughput vs h2corn |
|---|---|---|---|---|---|---|---|
| Connect / h2corn | 4,877 | 6 | 19,529 | 11.862 | 46.132 | 59.1 | - |
| Connect / Hypercorn | 1,174 | 6 | 4,742 | 52.769 | 97.492 | 40.4 | slower |
| grpc.aio | 2,328 | 6 | 9,363.5 | 26.160 | 54.382 | 61.2 | slower |
| grpclib | not selected | - | - | - | - | - | - |
Collection: direction-resolved.
gRPC U0¶
Detailed results
| Server | Median RPC/s | Blocks | Median completed RPCs/trial | p50 latency (ms) | p99 latency (ms) | PSS (MB) | Throughput vs h2corn |
|---|---|---|---|---|---|---|---|
| Connect / h2corn | 1,537 | 6 | 3,076.5 | 0.463 | 3.257 | 60.4 | - |
| Connect / Hypercorn | 987 | 6 | 1,975.5 | 0.938 | 2.287 | 36.7 | slower |
| grpc.aio | 971 | 6 | 1,942 | 0.816 | 3.856 | 52.7 | slower |
| grpclib | not selected | - | - | - | - | - | - |
Collection: direction-resolved.
gRPC U32¶
Detailed results
| Server | Median RPC/s | Blocks | Median completed RPCs/trial | p50 latency (ms) | p99 latency (ms) | PSS (MB) | Throughput vs h2corn |
|---|---|---|---|---|---|---|---|
| Connect / h2corn | 6,478 | 6 | 6,509 | 9.624 | 25.517 | 67.7 | - |
| Connect / Hypercorn | 1,619 | 6 | 1,660 | 39.732 | 55.926 | 38.0 | slower |
| grpc.aio | 3,412 | 6 | 3,474 | 18.560 | 25.917 | 58.1 | slower |
| grpclib | 2,966 | 6 | 3,016 | 21.550 | 28.897 | 30.0 | slower |
Collection: direction-resolved.
gRPC U64K¶
Detailed results
| Server | Median RPC/s | Blocks | Median completed RPCs/trial | p50 latency (ms) | p99 latency (ms) | PSS (MB) | Throughput vs h2corn |
|---|---|---|---|---|---|---|---|
| Connect / h2corn | 2,688 | 6 | 2,693 | 5.681 | 13.036 | 65.0 | - |
| Connect / Hypercorn | 605 | 6 | 618.5 | 25.265 | 45.919 | 39.3 | slower |
| grpc.aio | 2,285 | 6 | 2,296 | 6.863 | 12.137 | 73.0 | slower |
| grpclib | 1,254 | 6 | 1,266.5 | 12.468 | 24.173 | 32.5 | slower |
Collection: direction-resolved.
gRPC Upload¶
Detailed results
| Server | Median RPC/s | Blocks | Median completed RPCs/trial | p50 latency (ms) | p99 latency (ms) | PSS (MB) | Throughput vs h2corn |
|---|---|---|---|---|---|---|---|
| Connect / h2corn | 624 | 12 | 1,250 | 12.342 | 25.647 | 71.2 | - |
| Connect / Hypercorn | 114 | 12 | 232 | 68.678 | 98.272 | 39.3 | slower |
| grpc.aio | 579 | 12 | 1,162.5 | 13.166 | 25.164 | 167.7 | inconclusive |
| grpclib | not selected | - | - | - | - | - | - |
Collection: maximum-look.
Reading the results¶
Rates are medians; dots show individual trials and whiskers their observed range. Headline ratios use paired trials. Each scenario uses six fresh-start blocks, extended up to twelve for unresolved comparisons, with server order rotated on an unpinned, shared host. Paired comparisons report 95% intervals; host drift still limits their interpretation. “Inconclusive” does not mean equal.
Latency curves show medians of per-trial percentiles under closed-loop load, not production arrival-rate guarantees. Memory is sampled peak proportional set size (PSS) across the supervisor and workers; short peaks can be missed. Responses are checked, and failed or unstable comparisons are identified in the detailed results.
HTTP tests use standard asyncio, direct connections without TLS or a proxy, Uvicorn's h11 parser, and Gunicorn's Python HTTP parser. HTTP/2 uses cleartext prior knowledge.
The benchmark source and raw results and trial evidence provide exact commands, calibration rules, configurations, and observations.
HTTP workload notes¶
- Multiplexed HTTP/2 uses ten concurrent streams on one connection.
- Static files are 128 KiB Starlette
FileResponseobjects, usinghttp.response.pathsendwhere supported. Gunicorn 26.2.0 fails the reused-connection check, so its file results are reported as failed. - Streaming downloads yield eight 16 KiB chunks. Streaming POSTs upload 1 KiB and receive three chunks with 20 ms of application delay.
- WebSocket trials connect, echo one text message, and disconnect: they measure session turnover, not sustained message throughput.
gRPC setup¶
Each stack uses one serving process, standard asyncio, one HTTP/2 client connection, and no message compression. TLS rows terminate TLS 1.3 directly at each server. The same Go client drives every stack.
Unary and Upload report complete RPCs/second; Download and Duplex report response messages/second. Latency percentiles use histogram upper bounds with one-percent buckets.
gRPC workload notes¶
U0, U32, and U64K are unary calls with 0-byte, 32-byte, and 64 KiB payloads. Upload and Download transfer sixteen 64 KiB messages per RPC; Duplex exchanges 64 messages of 256 bytes in each direction. TLS rows repeat U32 and Duplex. The grpclib comparison covers U32, U64K, and Duplex.
Known gRPC failures¶
Valid-request checks passed for all measured workloads. Cancellation passed for h2corn and grpc.aio but timed out on Hypercorn. Released Connect failed the reserved-flag and truncated-suffix checks. Throughput results do not imply that these error paths conform.
The gRPC records and evidence retain exact configurations, verified counts, and failure details.