go-stdlib
Flagship · Go · engine: net/http · tuned configuration · completeness 2/4
The Go standard library net/http server with no framework, default configuration. Routing through the ServeMux method and wildcard patterns of Go 1.22, JSON through encoding/json, gzip written by hand with compress/gzip because the standard library ships no compression middleware. HTTP/2 is net/http's own: over TLS through ALPN on 8443, and with prior knowledge on 8082 through http.Server.Protocols.
Achievements
🥇 1 Gold. 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 | Test profile | Efficiency · Latency-10K | 1 of 109 |
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.
Every result
Alpha Round, 22 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 | 505,478 | 8.11ms | 162.00ms | 3369.7% | 221MiB |
| Connection | Pipelined | 4,096 | 1,128,606 | 42.58ms | 2.01s | 3969.0% | 409MiB |
| Connection | Short-lived | 4,096 | 153,754 | 26.05ms | 276.90ms | 2000.1% | 62MiB |
| Concurrency | Async Delay | 32,000 | 705,624 | 44.73ms | 125.50ms | 5441.0% | 1.3GiB |
| Efficiency | Latency-10K | 1,024 | 9,983 | 82.8us | 119.0us | 74.0% | 77MiB |
| Efficiency | Latency-1M | 1,024 | 460,046 | 5380815.7us | 10711040.0us | 3024.3% | 116MiB |
| Efficiency | Latency-500K/8 | 1,024 | 211,694 | 5751703.5us | 11390976.0us | 756.7% | 57MiB |
| Workload | JSON Comp | 4,096 | 214,801 | 18.50ms | 415.00ms | 5290.0% | 521MiB |
| Workload | JSON Comp | 16,384 | 222,803 | 71.96ms | 287.70ms | 5475.6% | 1.2GiB |
| Workload | JSON TLS | 4,096 | 326,856 | 131.24ms | 1.92s | 4959.3% | 301MiB |
| Workload | 8Gbit | 512 | 49,048 | 388.3us | 2411.0us | 1086.8% | 85MiB |
| Workload | Static TLS | 1,024 | 158,779 | 25.39ms | 405.90ms | 3842.8% | 192MiB |
| Database | Async DB | 1,024 | 89,302 | 11.27ms | 27.00ms | 4058.9% | 176MiB |
| HTTP/2 | Baseline | 256 | 531,366 | 47.28ms | 817.19ms | 4924.4% | 341MiB |
| HTTP/2 | Baseline | 1,024 | 528,248 | 150.46ms | 4.59s | 4704.0% | 958MiB |
| HTTP/2 | Static | 256 | 178,916 | 44.47ms | 1.34s | 4931.2% | 386MiB |
| HTTP/2 | Static | 1,024 | 205,216 | 130.18ms | 4.44s | 5648.1% | 1.3GiB |
| HTTP/2 | Baseline (h2c) | 256 | 532,726 | 47.20ms | 791.27ms | 5019.1% | 340MiB |
| HTTP/2 | Baseline (h2c) | 1,024 | 541,574 | 143.08ms | 4.11s | 5076.2% | 967MiB |
| HTTP/2 | Baseline (h2c) | 4,096 | 455,754 | 622.20ms | 4.98s | 4012.3% | 2.5GiB |
| HTTP/2 | JSON (h2c) | 1,024 | 314,833 | 87.03ms | 4.62s | 5905.5% | 737MiB |
| HTTP/2 | JSON (h2c) | 4,096 | 290,046 | 337.27ms | 4.95s | 5669.0% | 1.5GiB |
Compared with
The Go web frameworks around go-stdlib 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 go-stdlib | |
|---|---|---|---|
| fiber-tuned | 5859 | +189% | head to head |
| echo | 2091 | +3% | head to head |
| gin | 2080 | +3% | head to head |
| chi | 2021 | -0% | head to head |
| zinc | 1939 | -4% | head to head |
Compare go-stdlib with any Go entry · Compare go-stdlib with any entry, in any language · Every Go entry, ranked
Results updated · How the benchmark is run · The machine · Add or fix an entry