sober
Experimental · Sober · engine: std/http · standard configuration · completeness 4/4
Sober's standard library HTTP server (std/http on std/net, TLS 1.3 from std/tls), default configuration: HTTP/1.1, and HTTP/2 with prior knowledge (h2c) on 8082 where each stream runs its handler in its own task. One task per connection; one io_uring and one SO_REUSEPORT listener per worker — each worker accepts on its own ring and runs the connection itself (epoll fallback), with workers pinned one per CPU. Routes are a plain table ([]http.Route with method, :param / *rest patterns, Mount / Merge, before / after middleware), JSON through std/json, gzip through the built-in compression: option of the server. /async-db through std/pg, the standard library's own PostgreSQL client (wire protocol 3.0, extended query, SCRAM-SHA-256) and its connection pool (pg.OpenPool / pg.With) sized from DATABASE_MAX_CONN. Static ELF with no libc, FROM scratch.
Achievements
🥇 2 Gold · 🥉 1 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 | Test profile | Concurrency · Async Delay | 1 of 32 |
| 🥇 Gold | Test profile | Concurrency · CON-1M | 1 of 13 |
| 🥉 Bronze | Family composite | Composite · HTTP/1.1 | 3 of 36 |
Composite rank
Each profile of a family is worth its weight × 1,000 to the entry that leads it - 1, or 0.5 apiece for two profiles that measure one thing - 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.
Protocol compliance
The conformance suites this entry subscribes to, run against it on the benchmark machine: Http11Probe on HTTP/1.1, h2spec on HTTP/2, h3spec on HTTP/3 and Autobahn on WebSocket. A score, not part of the composite. How it works.
| Suite | Tool | Passed | Failed |
|---|---|---|---|
| HTTP/1.1 | http11probe d50d818 | 159 of 159 (100%) | 0 |
| HTTP/2 | h2spec 2.6.0 | 146 of 146 (100%) | 0 |
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 | 3,945,125 | 1.04ms | 1.48ms | 6224.9% | 131MiB |
| Connection | Pipelined | 4,096 | 31,105,888 | 2.11ms | 2.78ms | 6723.0% | 125MiB |
| Connection | Short-lived | 4,096 | 2,702,322 | 1.38ms | 1.91ms | 5978.4% | 157MiB |
| Concurrency | Async Delay | 32,000 | 2,906,390 | 11.01ms | 12.40ms | 6283.7% | 384MiB |
| Concurrency | CON-1M | 1,000,000 | 249,972 | 50.0us | 75.0us | 493.9% | 8174.7MiB |
| Concurrency | CON-1M-TLS | 1,000,000 | 249,961 | 88.0us | 114.0us | 1856.8% | 21.9GiB |
| Efficiency | Latency-10K | 1,024 | 9,977 | 90.3us | 114.0us | 30.9% | 96MiB |
| Efficiency | Latency-1M | 1,024 | 997,577 | 91.1us | 165.0us | 2241.0% | 128MiB |
| Workload | JSON Comp | 4,096 | 814,507 | 5.02ms | 17.60ms | 6706.4% | 210MiB |
| Workload | JSON Comp | 16,384 | 790,293 | 20.71ms | 55.30ms | 6730.5% | 508MiB |
| Workload | JSON TLS | 4,096 | 1,811,152 | 1.27ms | 51.69ms | 5733.2% | 273MiB |
| Workload | 8Gbit | 512 | 49,311 | 92.9us | 113.0us | 191.1% | 147MiB |
| Database | Async DB | 1,024 | 266,224 | 3.84ms | 33.40ms | 3315.3% | 372MiB |
| HTTP/2 | Baseline | 256 | 10,247,296 | 1.89ms | 4.29ms | 5279.5% | 150MiB |
| HTTP/2 | Baseline | 1,024 | 11,345,683 | 6.78ms | 17.44ms | 6211.5% | 322MiB |
| HTTP/2 | Static | 256 | 151,159 | 53.93ms | 112.09ms | 6089.1% | 590MiB |
| HTTP/2 | Static | 1,024 | 129,019 | 242.11ms | 439.54ms | 6377.5% | 1.5GiB |
| HTTP/2 | Baseline (h2c) | 256 | 12,272,208 | 1.18ms | 2.99ms | 3771.9% | 146MiB |
| HTTP/2 | Baseline (h2c) | 1,024 | 12,397,425 | 4.14ms | 7.68ms | 3882.3% | 250MiB |
| HTTP/2 | Baseline (h2c) | 4,096 | 11,642,380 | 19.82ms | 70.16ms | 3860.8% | 585MiB |
| HTTP/2 | JSON (h2c) | 1,024 | 2,647,514 | 11.94ms | 21.33ms | 6358.2% | 361MiB |
| HTTP/2 | JSON (h2c) | 4,096 | 2,420,025 | 52.24ms | 70.20ms | 6328.7% | 1.1GiB |
Compare sober with any entry, in any language · Every Sober entry, ranked
Results updated · How the benchmark is run · The machine · Add or fix an entry