[docs] API: curl examples end to end on loopback, §8.4 reload answer with load numbers, UI contract deviations
This commit is contained in:
@@ -113,6 +113,16 @@ Identity gate, tunnel, Domi templates, ACME server, HTTP/3, migrating public sit
|
||||
3. Does Pingora build on Windows? If not, develop in WSL2 and note it in CLAUDE.md. (phase 1)
|
||||
**Answer: it compiles and the unit tests run on Windows (MSVC, Rust 1.99), but the README calls Windows support "preliminary by community's best effort only".** Unix-only parts include graceful upgrade, the in-process runner and the integration tests. Caddy and Pebble are not on this Windows box. So the edge integration tests, the diff suite and the ACME test run in WSL2 Debian, as noted in CLAUDE.md. One gotcha: libz-ng-sys's CMake build fails under a very deep CARGO_TARGET_DIR (MSBuild path length). [S github.com/cloudflare/pingora README; local builds 2026-11-07]
|
||||
4. Pingora graceful reload behaviour under load. (phase 2)
|
||||
**Answer: no Pingora graceful upgrade for config changes; edge swaps its config in process.** A reload builds a complete new runtime from the config file (secrets, certificates, share-link key) and installs it with one atomic pointer swap (`arc-swap`); listeners, TLS sessions and keep-alive connections are untouched, each request keeps the runtime it started with, and the next request on the same connection uses the new one. A config that fails to build is refused and the old one keeps serving; listen addresses change only with a restart. Control triggers it through edge's admin Unix socket (mode 0660, never a TCP port) as a *trial* that edge reverts by itself unless control confirms it in time, so a control crash mid-apply cannot strand edge on an unverified config. Pingora's graceful upgrade (new process takes the listening sockets, old one drains for the grace period) stays for binary upgrades only: it needs a second process and fd passing, and idle keep-alive connections on the old process are closed after the drain, which clients see as a reset on their next request; it was not measured. [J]
|
||||
Measured (`crates/edge/tests/reload.rs`, debug build, WSL2 Debian, 16 cores, one local upstream; alternating two configs that differ in a response header, `POST /v1/reload` every 100 ms, each client one TLS keep-alive connection sending requests back to back):
|
||||
|
||||
| Clients | Duration | Reloads | Requests | Errors | Connection resets | Connections that saw both configs | p50 / p99 / max latency |
|
||||
|--:|--:|--:|--:|--:|--:|--:|:--|
|
||||
| 32 | 10 s | 98 | 30,198 | 0 | 0 | 32/32 | 10.5 / 17.2 / 132 ms |
|
||||
| 64 | 30 s | 294 | 95,229 | 0 | 0 | 64/64 | 20.0 / 31.9 / 190 ms |
|
||||
| 128 | 30 s | 292 | 87,796 | 0 | 0 | 128/128 | 43.1 / 69.1 / 215 ms |
|
||||
|
||||
Reproduce: `IANITOR_RELOAD_CLIENTS=64 IANITOR_RELOAD_SECS=30 cargo test -p ianitor-edge --test reload -- --exact unix::reload_under_load_drops_nothing --nocapture`. Not measured: a release build, HTTP/2 clients, long-lived websockets across reloads (they keep the runtime they started with until they close), and Pingora graceful upgrade for comparison. [S local runs 2026-11-07]
|
||||
5. Authelia forward-auth endpoint and headers to mirror exactly. (phase 1)
|
||||
**Answer: `GET /api/authz/forward-auth` (ForwardAuth implementation; legacy `/api/verify` not used).** Edge sends X-Forwarded-Method, -Proto, -Host, -URI (required) and X-Forwarded-For, and always sets them itself. It also forwards the client's headers (Cookie, Authorization) without hop-by-hop headers or body. A 2xx answer copies Remote-User, Remote-Groups, Remote-Email and Remote-Name onto the request (client copies removed). Any other answer (302 portal, 401 + WWW-Authenticate, 403) goes back to the client verbatim. An unreachable, silent (10 s deadline), oversized (>1 MiB), broken or `101` auth answer fails closed with 502; 1xx heads are skipped. Client-sent Remote-* headers are always stripped on forward-auth hosts, whatever copy_headers says. This mirrors `caddy adapt` output for Authelia's documented `forward_auth` snippet; tested against a mock, not a real Authelia. [S authelia.com/reference/guides/proxy-authorization, authelia.com/integration/proxies/caddy]
|
||||
6. Custos CSR-signing operation with match-code approval. (phase 3)
|
||||
|
||||
Reference in New Issue
Block a user