Skip to content

Commit 5608a1e

Browse files
committed
update readmes
1 parent 2ebf577 commit 5608a1e

72 files changed

Lines changed: 5531 additions & 543 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

frameworks/actix/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# actix
2+
3+
Actix-web 4 HTTP server with rustls for TLS/HTTP/2 support, compiled with thin LTO and `-C target-cpu=native`.
4+
5+
## Stack
6+
7+
- **Language:** Rust 1.88
8+
- **Framework:** Actix-web 4
9+
- **TLS:** rustls
10+
- **Build:** Multi-stage, `debian:bookworm-slim` runtime
11+
12+
## Endpoints
13+
14+
| Endpoint | Method | Description |
15+
|----------|--------|-------------|
16+
| `/pipeline` | GET | Returns `ok` (plain text) |
17+
| `/baseline11` | GET | Sums query parameter values |
18+
| `/baseline11` | POST | Sums query parameters + request body |
19+
| `/baseline2` | GET | Sums query parameter values (HTTP/2 variant) |
20+
| `/json` | GET | Processes 50-item dataset, serializes JSON |
21+
| `/compression` | GET | Gzip-compressed large JSON response |
22+
| `/db` | GET | SQLite range query with JSON response |
23+
| `/upload` | POST | Receives 1 MB body, returns byte count |
24+
| `/static/{filename}` | GET | Serves preloaded static files with MIME types |
25+
26+
## Notes
27+
28+
- Per-worker SQLite connections via thread-local storage
29+
- Backlog set to 4096 for connection queuing
30+
- Static files preloaded into memory at startup
31+
- Gzip compression level 1
Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,32 @@
11
# aspnet-minimal
22

3-
Minimal ASP.NET Core HTTP server using .NET 10 preview. Uses the built-in Kestrel web server with minimal API routing.
3+
Minimal ASP.NET Core HTTP server using .NET 10 preview with Kestrel and minimal API routing.
44

55
## Stack
66

7-
- **Runtime:** .NET 10 (preview, Alpine)
8-
- **Web server:** Kestrel (ASP.NET Core built-in)
9-
- **Routing:** Minimal API (`MapGet`/`MapPost`)
7+
- **Language:** C# / .NET 10 (preview, Alpine)
8+
- **Framework:** ASP.NET Core Minimal APIs
9+
- **Engine:** Kestrel
10+
- **Build:** Self-contained publish, `aspnet:10.0-preview-alpine` runtime
1011

1112
## Endpoints
1213

13-
- `GET /pipeline` — returns `ok` (plain text)
14-
- `GET /baseline11?a=N&b=N` — sums query parameter values
15-
- `POST /baseline11?a=N&b=N` — sums query parameters + request body (Content-Length and chunked)
14+
| Endpoint | Method | Description |
15+
|----------|--------|-------------|
16+
| `/pipeline` | GET | Returns `ok` (plain text) |
17+
| `/baseline11` | GET | Sums query parameter values |
18+
| `/baseline11` | POST | Sums query parameters + request body |
19+
| `/baseline2` | GET | Sums query parameter values (HTTP/2 variant) |
20+
| `/json` | GET | Processes 50-item dataset, serializes JSON |
21+
| `/compression` | GET | Gzip-compressed large JSON response |
22+
| `/db` | GET | SQLite range query with JSON response |
23+
| `/upload` | POST | Receives 1 MB body, returns byte count |
24+
| `/static/{filename}` | GET | Serves preloaded static files with MIME types |
1625

1726
## Notes
1827

19-
- Logging is disabled (`ClearProviders()`) for maximum throughput
20-
- Uses `StreamReader` for async body reading
21-
- Single-file implementation in `Program.cs`
28+
- HTTP/1.1 on port 8080, HTTP/1+2+3 on port 8443
29+
- Logging disabled (`ClearProviders()`) for throughput
30+
- Response compression middleware (gzip, fastest level)
31+
- HTTP/2 tuned: 256 max streams, 2 MB connection window
32+
- Split into Program.cs, Handlers.cs, AppData.cs, Models.cs

frameworks/bun/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# bun
2+
3+
Bun's built-in HTTP server using the JavaScriptCore engine with `reusePort` for multi-core scaling.
4+
5+
## Stack
6+
7+
- **Language:** TypeScript
8+
- **Runtime:** Bun (latest)
9+
- **Engine:** JavaScriptCore
10+
- **Build:** `oven/bun:latest` base
11+
12+
## Endpoints
13+
14+
| Endpoint | Method | Description |
15+
|----------|--------|-------------|
16+
| `/pipeline` | GET | Returns `ok` (plain text) |
17+
| `/baseline11` | GET | Sums query parameter values |
18+
| `/baseline11` | POST | Sums query parameters + request body |
19+
| `/baseline2` | GET | Sums query parameter values (HTTP/2 variant) |
20+
| `/json` | GET | Processes 50-item dataset, serializes JSON |
21+
| `/compression` | GET | Gzip-compressed large JSON response |
22+
| `/db` | GET | SQLite range query with JSON response |
23+
| `/upload` | POST | Receives 1 MB body, returns byte count |
24+
| `/static/{filename}` | GET | Serves preloaded static files with MIME types |
25+
26+
## Notes
27+
28+
- Built-in SQLite via `bun:sqlite` (read-only)
29+
- Dual server: HTTP on 8080, TLS on 8443
30+
- Gzip compression level 1
31+
- `reusePort` for kernel-level load balancing

frameworks/caddy/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# caddy
2+
3+
Caddy web server with a custom Go handler module for all benchmark endpoints, native HTTP/2 and HTTP/3 support.
4+
5+
## Stack
6+
7+
- **Language:** Go 1.24
8+
- **Framework:** Caddy 2.9.1 + custom `httparena` module
9+
- **Build:** `xcaddy` builder, `debian:bookworm-slim` runtime
10+
11+
## Endpoints
12+
13+
| Endpoint | Method | Description |
14+
|----------|--------|-------------|
15+
| `/pipeline` | GET | Returns `ok` (plain text) |
16+
| `/baseline11` | GET/POST | Sums query parameter values (+ body for POST) |
17+
| `/baseline2` | GET | Sums query parameter values (HTTP/2 variant) |
18+
| `/json` | GET | Processes 50-item dataset, serializes JSON |
19+
| `/compression` | GET | Gzip-compressed large JSON response |
20+
| `/db` | GET | SQLite range query with JSON response |
21+
| `/upload` | POST | Receives 1 MB body, returns byte count |
22+
| `/static` | GET | Serves preloaded static files |
23+
24+
## Notes
25+
26+
- Custom Caddy module registered via `caddy.RegisterModule`
27+
- Connection pool sized to `runtime.NumCPU()`
28+
- Gzip encoding level 1 via Caddy config
29+
- Both HTTP and HTTPS listeners via Caddyfile

frameworks/deno/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# deno
2+
3+
Deno HTTP server using `deno serve --parallel` with a zero-dependency native fetch handler.
4+
5+
## Stack
6+
7+
- **Language:** TypeScript
8+
- **Runtime:** Deno 2.2.2
9+
- **Engine:** V8
10+
- **Build:** `denoland/deno:2.2.2` base
11+
12+
## Endpoints
13+
14+
| Endpoint | Method | Description |
15+
|----------|--------|-------------|
16+
| `/pipeline` | GET | Returns `ok` (plain text) |
17+
| `/baseline11` | GET | Sums query parameter values |
18+
| `/baseline11` | POST | Sums query parameters + request body |
19+
| `/baseline2` | GET | Sums query parameter values (HTTP/2 variant) |
20+
| `/json` | GET | Processes 50-item dataset, serializes JSON |
21+
| `/compression` | GET | Gzip-compressed large JSON response |
22+
| `/db` | GET | SQLite range query with JSON response |
23+
| `/upload` | POST | Receives 1 MB body, returns byte count |
24+
25+
## Notes
26+
27+
- `deno serve --parallel` for multi-core scaling
28+
- SQLite via `jsr:@db/sqlite@0.12`
29+
- Gzip compression via Node.js zlib compat layer (level 1)
30+
- Thread-local database connections

frameworks/drogon/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# drogon
2+
3+
Drogon C++ web framework with async callbacks, built with `-flto` and `-march=native` optimizations.
4+
5+
## Stack
6+
7+
- **Language:** C++17
8+
- **Framework:** Drogon v1.9.10
9+
- **Build:** Ubuntu 24.04, CMake, `-flto -march=native`
10+
11+
## Endpoints
12+
13+
| Endpoint | Method | Description |
14+
|----------|--------|-------------|
15+
| `/pipeline` | GET | Returns `ok` (plain text) |
16+
| `/baseline11` | GET | Sums query parameter values |
17+
| `/baseline11` | POST | Sums query parameters + request body |
18+
| `/baseline2` | GET | Sums query parameter values (HTTP/2 variant) |
19+
| `/json` | GET | Processes 50-item dataset, serializes JSON |
20+
| `/compression` | GET | Gzip-compressed large JSON response |
21+
| `/db` | GET | SQLite range query with JSON response |
22+
| `/upload` | POST | Receives 1 MB body, returns byte count |
23+
| `/static` | GET | Serves preloaded static files |
24+
25+
## Notes
26+
27+
- Thread-local SQLite connections
28+
- jsoncpp for JSON parsing/serialization
29+
- Static files preloaded into memory at startup
30+
- Multi-threaded event loop

frameworks/flask/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# flask
2+
3+
Flask web framework on Gunicorn with sync workers, scaled to available CPU cores.
4+
5+
## Stack
6+
7+
- **Language:** Python 3.13
8+
- **Framework:** Flask
9+
- **WSGI server:** Gunicorn (sync workers)
10+
- **Build:** `python:3.13-slim` base
11+
12+
## Endpoints
13+
14+
| Endpoint | Method | Description |
15+
|----------|--------|-------------|
16+
| `/pipeline` | GET | Returns `ok` (plain text) |
17+
| `/baseline11` | GET | Sums query parameter values |
18+
| `/baseline11` | POST | Sums query parameters + request body |
19+
| `/baseline2` | GET | Sums query parameter values (HTTP/2 variant) |
20+
| `/json` | GET | Processes 50-item dataset, serializes JSON |
21+
| `/compression` | GET | Gzip-compressed large JSON response |
22+
| `/db` | GET | SQLite range query with JSON response |
23+
| `/upload` | POST | Receives 1 MB body, returns byte count |
24+
25+
## Notes
26+
27+
- Workers = `os.sched_getaffinity(0) * 2` (respects Docker CPU limits)
28+
- Thread-local SQLite connections via `threading.local()`
29+
- Gzip compression level 1
30+
- Keepalive timeout 120s

frameworks/flask/gunicorn_conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import multiprocessing
1+
import os
22

33
bind = '0.0.0.0:8080'
4-
workers = multiprocessing.cpu_count()
4+
workers = len(os.sched_getaffinity(0)) * 2
55
keepalive = 120

frameworks/genhttp/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# genhttp
2+
3+
Lightweight embeddable C# web server using the GenHTTP library on the Kestrel engine.
4+
5+
## Stack
6+
7+
- **Language:** C# / .NET 10 (preview, Alpine)
8+
- **Framework:** GenHTTP
9+
- **Engine:** Kestrel
10+
- **Build:** Self-contained musl publish, `runtime-deps:10.0-preview-alpine`
11+
12+
## Endpoints
13+
14+
| Endpoint | Method | Description |
15+
|----------|--------|-------------|
16+
| `/pipeline` | GET | Returns `ok` (plain text) |
17+
| `/baseline11` | GET | Sums query parameter values |
18+
| `/baseline11` | POST | Sums query parameters + request body |
19+
| `/baseline2` | GET | Sums query parameter values (HTTP/2 variant) |
20+
| `/json` | GET | Processes 50-item dataset, serializes JSON |
21+
| `/compression` | GET | Gzip-compressed large JSON response |
22+
| `/db` | GET | SQLite range query with JSON response |
23+
| `/upload` | POST | Receives 1 MB body, returns byte count |
24+
| `/static/{filename}` | GET | Serves preloaded static files with MIME types |
25+
26+
## Notes
27+
28+
- Functional routing via `Inline.Create()`
29+
- Compression and routing modules
30+
- Self-contained single-file deployment

frameworks/go-fasthttp/README.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,29 @@
11
# go-fasthttp
22

3-
HTTP server built with [fasthttp](https://github.com/valyala/fasthttp), a high-performance HTTP library for Go that avoids `net/http` overhead through zero-allocation design and buffer reuse.
3+
High-performance Go HTTP server using fasthttp with zero-allocation design and buffer reuse.
44

55
## Stack
66

7-
- **Runtime:** Go 1.22
8-
- **Web server:** fasthttp
9-
- **Routing:** Manual path switch
7+
- **Language:** Go 1.24
8+
- **Framework:** fasthttp
9+
- **Build:** `golang:1.24-alpine``alpine:3.19` runtime
1010

1111
## Endpoints
1212

13-
- `GET /pipeline` — returns `ok` (plain text)
14-
- `GET /baseline11?a=N&b=N` — sums query parameter values
15-
- `POST /baseline11?a=N&b=N` — sums query parameters + request body (Content-Length and chunked)
13+
| Endpoint | Method | Description |
14+
|----------|--------|-------------|
15+
| `/pipeline` | GET | Returns `ok` (plain text) |
16+
| `/baseline11` | GET | Sums query parameter values |
17+
| `/baseline11` | POST | Sums query parameters + request body |
18+
| `/json` | GET | Processes 50-item dataset, serializes JSON |
19+
| `/compression` | GET | Gzip-compressed large JSON response |
20+
| `/db` | GET | SQLite range query with JSON response |
21+
| `/upload` | POST | Receives 1 MB body, returns byte count |
1622

1723
## Notes
1824

19-
- fasthttp processes one request at a time per connection, so pipelining throughput gains are minimal
20-
- Uses `VisitAll` for zero-copy query parameter iteration
21-
- Statically compiled (`CGO_ENABLED=0`) with Alpine base image
25+
- One goroutine listener per CPU core via `SO_REUSEPORT`
26+
- `modernc.org/sqlite` for CGO-free database access
27+
- Compression via `compress/flate` (level 1)
28+
- Zero-copy query parameter iteration with `VisitAll`
29+
- Baseline11 is the default route handler

0 commit comments

Comments
 (0)