libuvcpp
Emerging · C++ · engine: libuv · standard configuration · completeness 4/4
libuvcpp on the libuv event loop, one loop per available core. Routing, path and query params, static files and WebSocket through uvcpp_web_app, JSON serialized per request through the framework's bundled yyjson backend (uvcpp_json_builder, written by yyjson's own serializer, no pre-rendered bytes), gzip through the built-in response compression, async Postgres through uvcpp_db_pool, and gRPC unary calls through the uvcpp_grpc module. One process serves HTTP/1.1 and prior-knowledge h2c on 8080, h2c on 8082, HTTP/2 over TLS on 8443, and HTTP/3 on 8443/udp, all from the same build; the gateway-64 and production-stack profiles put a stock nginx edge in front of it and gateway-h3 a stock Caddy one.
Achievements
🥇 2 Gold · 🥉 3 Bronze. Top three of a field, taken in this entry's own league: the family composite, the same composite among entries written in the same language, and each test profile it is scored on. Every field is the one the badges publish, so a medal and a badge always say the same thing. How medals are awarded.
| Medal | Award | Field | Rank |
|---|---|---|---|
| 🥇 Gold | Within its language | C++ · HTTP/1.1 | 1 of 4 |
| 🥇 Gold | Test profile | Gateway · Production Stack | 1 of 7 |
| 🥉 Bronze | Family composite | Composite · Gateway | 3 of 8 |
| 🥉 Bronze | Family composite | Composite · HTTP/3 | 3 of 16 |
| 🥉 Bronze | Test profile | HTTP/2 · Static | 3 of 29 |
Composite rank
Each profile of a family is worth 1,000 to the entry that leads it, 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 | 14 of 85 | 4789 |
| HTTP/2 | 6 of 31 | 2260 |
| HTTP/3 | 3 of 16 | 1465 |
| Gateway | 3 of 8 | 2229 |
| gRPC | 5 of 10 | 1142 |
| WebSocket | 11 of 30 | 2025 |
Every result
Alpha Round, 42 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 | 1,802,593 | 2.27ms | 5.07ms | 6284.8% | 139MiB |
| Connection | Pipelined | 4,096 | 7,848,400 | 8.38ms | 10.60ms | 6474.9% | 150MiB |
| Connection | Short-lived | 4,096 | 1,480,567 | 2.74ms | 43.20ms | 6296.5% | 86MiB |
| Concurrency | Async Delay | 32,000 | 1,529,805 | 19.93ms | 24.60ms | 6125.0% | 489MiB |
| Efficiency | Latency-10K | 1,024 | 9,981 | 83.3us | 120.0us | 36.7% | 79MiB |
| Efficiency | Latency-1M | 1,024 | 997,805 | 145.6us | 312.0us | 4179.8% | 82MiB |
| Efficiency | Latency-500K/8 | 1,024 | 271,901 | 4536264.9us | 9293824.0us | 778.7% | 32MiB |
| Workload | JSON Comp | 4,096 | 285,759 | 14.01ms | 294.60ms | 6234.1% | 111MiB |
| Workload | JSON Comp | 16,384 | 291,220 | 34.62ms | 724.90ms | 6503.1% | 152MiB |
| Workload | JSON TLS | 4,096 | 619,671 | 6.52ms | 58.00ms | 6361.6% | 406MiB |
| Workload | 8Gbit | 512 | 49,340 | 112.4us | 147.0us | 309.1% | 209MiB |
| Workload | Static TLS | 1,024 | 571,215 | 1.79ms | 14.38ms | 6554.2% | 273MiB |
| Database | Async DB | 1,024 | 95,435 | 10.21ms | 39.70ms | 2796.2% | 185MiB |
| HTTP/2 | Baseline | 256 | 5,501,093 | 5.02ms | 28.45ms | 6319.2% | 110MiB |
| HTTP/2 | Baseline | 1,024 | 5,430,750 | 17.83ms | 103.49ms | 6284.9% | 172MiB |
| HTTP/2 | Static | 256 | 806,684 | 10.69ms | 61.94ms | 6459.0% | 240MiB |
| HTTP/2 | Static | 1,024 | 550,039 | 57.34ms | 243.84ms | 6240.6% | 507MiB |
| HTTP/2 | Baseline (h2c) | 256 | 5,889,601 | 4.51ms | 41.60ms | 6197.9% | 81MiB |
| HTTP/2 | Baseline (h2c) | 1,024 | 5,709,089 | 17.54ms | 457.39ms | 6424.8% | 164MiB |
| HTTP/2 | Baseline (h2c) | 4,096 | 5,489,431 | 70.66ms | 779.10ms | 6391.8% | 766MiB |
| HTTP/2 | JSON (h2c) | 1,024 | 1,187,769 | 26.88ms | 506.39ms | 6357.1% | 332MiB |
| HTTP/2 | JSON (h2c) | 4,096 | 1,130,987 | 112.44ms | 888.05ms | 6187.0% | 1.3GiB |
| HTTP/3 | Baseline | 64 | 3,239,525 | 1.18ms | 4.23ms | 3752.8% | 103MiB |
| HTTP/3 | Static | 64 | 238,175 | 17.31ms | 82.81ms | 4207.0% | 475MiB |
| gRPC | Unary | 256 | 3,837,633 | 6.78ms | 44.98ms | 6228.5% | 173MiB |
| gRPC | Unary | 1,024 | 3,600,218 | 27.30ms | 236.44ms | 6352.8% | 428MiB |
| gRPC | Unary TLS | 256 | 3,664,147 | 7.22ms | 60.27ms | 6168.1% | 165MiB |
| gRPC | Unary TLS | 1,024 | 3,517,793 | 27.85ms | 181.47ms | 6142.2% | 591MiB |
| Gateway | Gateway (H2) | 512 | 240,386 | 52.45ms | 4.83s | 5635.2% | 1.5GiB |
| Gateway | Gateway (H2) | 1,024 | 233,849 | 107.33ms | 4.88s | 5998.6% | 2.0GiB |
| Gateway | Gateway (H3) | 64 | 84,759 | 24.01ms | 84.19ms | 3578.1% | 415MiB |
| Gateway | Gateway (H3) | 256 | 62,533 | 127.00ms | 772.31ms | 2792.4% | 1.4GiB |
| Gateway | Production Stack | 256 | 256,279 | 17.06ms | 131.13ms | 4765.6% | 1.2GiB |
| Gateway | Production Stack | 1,024 | 208,500 | 73.82ms | 2.60s | 4284.8% | 2.0GiB |
| WebSocket | Echo | 512 | 2,892,280 | 176us | 418us | 6512.2% | 79MiB |
| WebSocket | Echo | 4,096 | 3,007,035 | 1.36ms | 2.30ms | 6314.7% | 131MiB |
| WebSocket | Echo | 16,384 | 2,673,301 | 5.44ms | 7.04ms | 6159.0% | 329MiB |
| WebSocket | Echo Pipelined | 512 | 33,213,203 | 246us | 592us | 6810.3% | 78MiB |
| WebSocket | Echo Pipelined | 4,096 | 32,736,147 | 1.99ms | 2.71ms | 6337.8% | 135MiB |
| WebSocket | Echo Pipelined | 16,384 | 29,129,603 | 7.85ms | 10.00ms | 6193.9% | 348MiB |
| WebSocket | Echo Short-lived | 512 | 1,633,110 | 202us | 605us | 5850.3% | 85MiB |
| WebSocket | Echo Short-lived | 4,096 | 1,832,895 | 378us | 818us | 6204.7% | 93MiB |
Compared with
The C++ web frameworks around libuvcpp 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 libuvcpp | |
|---|---|---|---|
| cinatra | 6349 | +33% | head to head |
| drogon | 4145 | -13% | head to head |
| cutelyst | 4098 | -14% | head to head |
Compare libuvcpp with any C++ entry · Compare libuvcpp with any entry, in any language · Every C++ entry, ranked
Results updated · How the benchmark is run · The machine · Add or fix an entry