v0.34.0_2

This commit is contained in:
Mateusz Gruszczyński committed 2026-10-18 06:13:42 +02:00
1 parent 434e789144
commit 9cfc4588cc
18 files changed
+392 -121

No files matched your search

+9
View File
@@ -6,6 +6,15 @@ controllable test **upstream**, used to verify streaming, non-replayable writes,
headers, cache policy and WebSocket frames. Performance measurements use nginx
as the shared upstream instead of Python.
## DEV 1 KiB follow-up on 0.34.0 (newer source)
See `docs/PROXY_1KB_HOTPATH_DEV_0.34.0.md`. The previous executable's 4-vs-64
idle-connection tuning experiment is real loopback evidence, but the *edited*
source has not been compiled. Its new default is 64 for new vhosts, whereas
explicitly saved `4` remains `4`. Keep the idle limit equal between before/after
*code* benchmarks; measure configuration tuning in a separate labelled series.
The source release is not eligible for a claim of 100k RPS or 80% nginx yet.
## Reverse-proxy optimization revision 0.34.0
After compiling the refreshed candidate, measure the same unmodified 0.33.8
@@ -42,6 +42,6 @@ for path in (ROOT / "src").rglob("*.rs"):
continue
assert len(path.read_text().splitlines()) <= 500, path
assert 'version = "0.34.0"' in src("Cargo.toml")
assert "max_idle_per_host: 4" in src("src/balance/model.rs")
assert "max_idle_per_host: 64" in src("src/balance/model.rs")
assert "pool_recycle_requests: 25_000" in src("src/balance/model.rs")
print("PASS 0.34.0 proxy hot-path source wiring, observability, preserved defaults and source-size limits (STATIC ONLY)")
print("PASS 0.34.0 proxy hot-path wiring, observability, bounded tuned defaults and source-size limits (STATIC ONLY)")
+16 -1
View File
@@ -5,6 +5,7 @@ These guards reject accidental removal of important branch/safety conditions.
They must be paired with ``cargo test`` and live black-box HTTP acceptance.
"""
from pathlib import Path
import json
ROOT = Path(__file__).resolve().parents[2]
@@ -88,8 +89,22 @@ assert "upstream_uri(&backend, &origin_suffix)" in route
assert "headers::strip_hop_by_hop" in route
assert "pool.select_wait(context.client_ip" in route or ".select_wait(context.client_ip" in route
assert "pool.select_member_wait(id)" in route
assert "max_idle_per_host: 4" in source("src/balance/model.rs")
assert "max_idle_per_host: 64" in source("src/balance/model.rs")
assert "pool_recycle_requests: 25_000" in source("src/balance/model.rs")
assert "(1..=64).contains(&k.max_idle_per_host)" in source("src/balance/model.rs")
assert "keepalive.max_idle_per_host ?? 64" in source("src/admin/web/vhosts/editor.js")
openapi = json.loads(source("src/admin/openapi.json"))
api_keepalive = openapi["components"]["schemas"]
assert any(isinstance(schema, dict) and "keepalive" in schema.get("properties", {})
and schema["properties"]["keepalive"].get("properties", {})
.get("max_idle_per_host", {}).get("default") == 64
for schema in api_keepalive.values())
assert "| `max_idle_per_host` | 64 | 1..64 |" in source("docs/VHOSTS.md")
assert '"keepalive": { "max_idle_per_host": 4 }' in source("src/balance/tests.rs")
assert "self.route.get_mut()" in source("src/proxy/body.rs")
assert "let client_ip = self" in source("src/proxy/body.rs")
assert "if !headers.contains_key(http::header::COOKIE)" in source("src/proxy/headers.rs")
assert "if !headers.contains_key(http::header::SET_COOKIE)" in source("src/proxy/headers.rs")
assert 'version = "0.34.0"' in source("Cargo.toml")
for file in (ROOT / "src").rglob("*.rs"):