sockets
Engine · C# · engine: System.Net.Sockets
HTTP/1.1 written directly on System.Net.Sockets, with no server library above it. One listening socket per core through SO_REUSEPORT, so a connection is accepted, read and answered on the same thread with no handoff. The request line and the three headers the profiles read are parsed off the read buffer with no allocation, and every response a read produced is appended to one write buffer and flushed in a single send, so a pipelined batch costs one syscall rather than one per request. HTTP/1.1 on :8080 and the same over TLS on :8081, terminated with SslStream. HTTP/1.1 only: HTTP/2 would mean HPACK and framing by hand and HTTP/3 a QUIC stack, neither of which says anything more about what the socket layer costs.
Achievements
🥈 1 Silver. 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 |
|---|---|---|---|
| 🥈 Silver | Test profile | Efficiency · Latency-1M | 2 of 21 |
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 | 9 of 21 | 3380 |
Every result
Alpha Round, 10 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 | 2,433,320 | 1.69ms | 5.13ms | 4830.4% | 294MiB |
| Connection | Pipelined | 4,096 | 30,017,731 | 2.18ms | 5.23ms | 6203.2% | 398MiB |
| Connection | Short-lived | 4,096 | 1,281,919 | 3.17ms | 15.00ms | 5548.4% | 870MiB |
| Concurrency | Async Delay | 32,000 | 1,403,860 | 22.59ms | 45.90ms | 4305.1% | 3.0GiB |
| Efficiency | Latency-10K | 1,024 | 9,980 | 73.3us | 97.0us | 104.0% | 82MiB |
| Efficiency | Latency-1M | 1,024 | 998,114 | 96.1us | 350.0us | 2953.5% | 89MiB |
| Workload | JSON Comp | 4,096 | 671,443 | 6.08ms | 13.70ms | 6213.7% | 926MiB |
| Workload | JSON Comp | 16,384 | 659,779 | 24.60ms | 60.70ms | 6052.1% | 2.3GiB |
| Workload | JSON TLS | 4,096 | 890,518 | 5.01ms | 95.41ms | 6197.8% | 1.2GiB |
| Workload | 8Gbit | 512 | 49,315 | 102.1us | 134.0us | 515.4% | 158MiB |
Compared with
The C# entries around sockets on the HTTP/1.1 composite, and the one leading them. The last column shows every profile side by side.
| Entry | Composite | vs sockets | |
|---|---|---|---|
| genhttp-ioxide | 6118 | +81% | head to head |
| minima-sync | 3723 | +10% | head to head |
| simplew | 3682 | +9% | head to head |
| genhttp-kestrel | 3002 | -11% | head to head |
| carter | 2989 | -12% | head to head |
Compare sockets with any C# entry · Compare sockets with any entry, in any language · Every C# entry, ranked
Results updated · How the benchmark is run · The machine · Add or fix an entry