mongoose
Engine · C
Cesanta Mongoose — the embedded C networking library, run on the server side of its own event loop. One mg_mgr per core over SO_REUSEPORT listeners; HTTP/1.1, WebSocket and TLS (OpenSSL backend) all come from the library, with the entry supplying only the handlers.
Achievements
🥇 1 Gold · 🥈 2 Silver · 🥉 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 3 |
| 🥈 Silver | Family composite | Composite · WebSocket | 2 of 10 |
| 🥈 Silver | Test profile | Workload · 8Gbit | 2 of 10 |
| 🥉 Bronze | Family composite | Composite · HTTP/1.1 | 3 of 27 |
| 🥉 Bronze | Test profile | Concurrency · Async Delay | 3 of 7 |
| 🥉 Bronze | Test profile | WebSocket · Echo Short-lived | 3 of 5 |
Composite rank
Each profile of a family is worth 100 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 | 3 of 27 | 5939 |
| WebSocket | 2 of 10 | 2759 |
Every result
Alpha Round, 17 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 | 3,707,598 | 1.10ms | 1.91ms | 6314.5% | 178MiB |
| Connection | Short-lived | 4,096 | 2,701,933 | 1.43ms | 11.70ms | 6105.7% | 180MiB |
| Concurrency | Async Delay | 32,000 | 2,668,972 | 11.88ms | 13.90ms | 4897.5% | 1.1GiB |
| Efficiency | Latency-10K | 1,024 | 9,981 | 84.0us | 123.0us | 32.6% | 71MiB |
| Efficiency | Latency-1M | 1,024 | 997,592 | 96.3us | 167.0us | 2393.1% | 71MiB |
| Efficiency | Latency-500K/8 | 1,024 | 474,223 | 467277.9us | 2722816.0us | 821.2% | 51MiB |
| Workload | JSON TLS | 4,096 | 1,102,964 | 3.69ms | 44.64ms | 6589.0% | 495MiB |
| Workload | 8Gbit | 512 | 49,363 | 98.5us | 126.0us | 300.8% | 138MiB |
| Workload | Static TLS | 1,024 | 611,058 | 1.71ms | 30.58ms | 6764.1% | 174MiB |
| WebSocket | Echo | 512 | 3,954,919 | 128us | 323us | 6479.4% | 51MiB |
| WebSocket | Echo | 4,096 | 4,022,433 | 1.02ms | 1.69ms | 6464.3% | 179MiB |
| WebSocket | Echo | 16,384 | 3,838,015 | 4.23ms | 6.23ms | 6129.8% | 616MiB |
| WebSocket | Echo Pipelined | 512 | 58,271,516 | 139us | 335us | 6426.2% | 51MiB |
| WebSocket | Echo Pipelined | 4,096 | 59,017,072 | 1.11ms | 1.85ms | 6528.3% | 181MiB |
| WebSocket | Echo Pipelined | 16,384 | 56,446,992 | 4.60ms | 6.84ms | 6452.3% | 625MiB |
| WebSocket | Echo Short-lived | 512 | 2,123,165 | 146us | 506us | 5537.2% | 70MiB |
| WebSocket | Echo Short-lived | 4,096 | 2,533,448 | 928us | 1.73ms | 5998.1% | 217MiB |
Compared with
The C entries around mongoose on the HTTP/1.1 composite, and the one leading them. The last column shows every profile side by side.
| Entry | Composite | vs mongoose | |
|---|---|---|---|
| nginx | 4710 | -21% | head to head |
| h2o | 3936 | -34% | head to head |
Compare mongoose with any C entry · Compare mongoose with any entry, in any language · Every C entry, ranked
Results updated · How the benchmark is run · The machine · Add or fix an entry