diff --git a/AGENTS.md b/AGENTS.md index e183624..5bc647b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,7 +2,7 @@ Read README.md, ROADMAP.md and docs/TEST_REPORT.md before making changes. The project name is RustProxy; the Cargo package/binary remains `rust-proxy` for -compatibility. Current source version: 0.33.7. +compatibility. Current source version: 0.33.8. ## Delivery diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f292c8..4f229d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,33 @@ > Operator-facing release history. Historical engineering notes are kept in > [`docs/CHANGELOG_TECHNICAL_ARCHIVE.md`](docs/CHANGELOG_TECHNICAL_ARCHIVE.md). +## 0.33.8 + +- Skip cache-only policy maps, request snapshots and ticket work when caching + is ineligible. Preserve independently enabled transformations, header policy, + security decisions, telemetry and runtime configuration reloads. +- Lazily allocate idle timers while preserving the original construction + deadline, progress resets, trailers, cancellation and permit lifetime. +- Retain only request headers consumed by compression, and use direct hex + formatting for request IDs while preserving per-request entropy and hashing. +- Shorten live-history mutex holds by cloning entries and releasing evicted + entries outside the lock; preserve retention, drop counters, live streaming + and external sink behavior. +- Reduce filesystem job context copies and root-descriptor duplication. Use + adaptive file reads up to 64 KiB, preserving pinned-root and symlink checks. +- Report validated local file end-of-stream on the final frame. Fix successful + HTTP/1 file responses reported as cancelled and full/empty file cache fills + that were never committed. Reject short or oversized local streams; keep + upstream end-of-stream and trailer handling unchanged. +- Correct inherited Host-port validation, long-form Expires parsing, retained + cache inventory, diagnostic-header spoof protection, escaped-JSON log + redaction and certificate-token authorization ordering. +- Repair obsolete test fixtures/assertions without relaxing existing behavior; + add actual process/transport regression, benchmark, profiling and soak runners + with exact configurations, checksums, raw samples and resource observations. +- Keep the existing LB panel and persistence schema. Performance outcomes are + documented separately in `docs/PERFORMANCE_0.33.8.md` and the evidence archive. + ## 0.33.7 - Apply the same theme-aware subdued `--muted` color used on small metric diff --git a/Cargo.lock b/Cargo.lock index 1616cc9..97ce6b5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1881,7 +1881,7 @@ dependencies = [ [[package]] name = "rust-proxy" -version = "0.33.7" +version = "0.33.8" dependencies = [ "anyhow", "arc-swap", diff --git a/Cargo.toml b/Cargo.toml index 889f186..c59084a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rust-proxy" -version = "0.33.7" +version = "0.33.8" edition = "2021" rust-version = "1.99" description = "RustProxy - independent reverse proxy with local administration" diff --git a/README.md b/README.md index a1da598..8d14ffb 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,38 @@ -# RustProxy 0.33.7 +# RustProxy 0.33.8 + +## 0.33.8: request-path performance and compatibility verification + +This release reduces unnecessary cache-policy work and header copies when +caching is disabled, creates body-idle timers only when a read actually waits, +and formats request IDs without a generic per-byte formatter. Request IDs retain +fresh operating-system entropy and the same SHA-256 construction. + +Live-log history moves entry cloning and eviction cleanup outside its mutex +critical section. Its bounded retention, best-effort insertion, drop counters, +live stream and external sinks retain their existing contracts. Saturation tests +record history losses explicitly alongside throughput and resource use. + +The Web Server uses a narrow filesystem context and borrows its pinned root +descriptor for nonempty paths. Adaptive reads are bounded at 64 KiB. A local +file-body wrapper reports completion with the last expected byte, fixing HTTP/1 +cache publication and complete-response accounting for ordinary and empty files. +Range, conditional, HEAD, sidecar, cancellation and short-file cases are covered +by additional tests; arbitrary upstream bodies retain their trailer semantics. + +Compatibility testing also fixes existing explicit-Host-port validation, +long-form `.htaccess` Expires parsing, expired cache inventory visibility, +reserved backend-diagnostic header protection, escaped-JSON secret redaction, +and certificate deployment authorization ordering. Obsolete tests are updated +to exercise the existing documented behavior, including scheme-isolated cache +keys, purge generations, private administration responses and bundled error pages. + +The LB panel, database schema, default TLS/caching policies and bounded pool +recycling retain their existing behavior. Live process regression, verified TLS, +H2/H3/QUIC and WebSocket runners, repeated nginx comparisons, resource sampling, +syscall profiling and a mixed-traffic soak are included in +[`scripts/performance/`](scripts/performance/README.md). See the +[verification contract](docs/TEST_REPORT.md) and the separately generated +[performance results](docs/PERFORMANCE_0.33.8.md) for measured outcomes and limits. ## 0.33.7: named dashboard presets, panel components and chart typography diff --git a/ROADMAP.md b/ROADMAP.md index 94c59c5..6dd2bac 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -1,5 +1,25 @@ # RustProxy roadmap +## 0.33.8 - Performance with retained functionality + +- [x] Reduce cache-disabled request-policy work, header copies, timer allocation + and request-ID formatting overhead without changing security or telemetry. +- [x] Move live-history cloning and eviction cleanup outside the mutex while + retaining bounded history, explicit loss counters, live streams and sinks. +- [x] Narrow filesystem job context, borrow pinned root descriptors and bound + adaptive static-file reads at 64 KiB; preserve range and symlink behavior. +- [x] Correct local HTTP/1 file completion for cache publication and accounting, + with explicit empty, short-read, cancellation and multipart coverage. +- [x] Reproduce baseline test failures and distinguish real inherited defects + from obsolete fixtures; correct both without weakening functional contracts. +- [x] Add repeatable live HTTP, verified TLS/H2/H3/WebSocket, nginx comparison, + resource sampling, syscall profiling and mixed-traffic soak runners. Measured + outcomes and limits are recorded in `docs/PERFORMANCE_0.33.8.md` and raw evidence. +- [ ] Complete deployment-specific 24-hour soak and remote-network testing with + actual PHP-FPM, Tinyauth and DNS infrastructure before production rollout. +- [ ] Evaluate further proxy pool/queue costs and a secure static-file sendfile + path from measured profiles; preserve TLS/H2/H3 and all observability semantics. + ## 0.33.7 - named dashboard presets, focused HTML extraction and chart typography - [x] Apply uniform 12px sentence-case labels to all Overview widgets, diff --git a/SHA256SUMS b/SHA256SUMS index 278e20e..45796b2 100644 --- a/SHA256SUMS +++ b/SHA256SUMS @@ -1,13 +1,13 @@ 61bf40a0572889dc8b0dda9eae4e93e44b0de9364b3c798106c85700ffb37c23 .dockerignore 4140a2956264b44f259e6a37fc00ba02097bbe68b09296e04d3d243c1287129b .env.example 9e6356475bf587091bab72246ec9e325b498f7e48a6220e9a18baa50d0a385a6 .gitignore -c793a8be7f4b76350e04ab36dbeec3792bb2dcf33c87a86f76fa2f330e26dd9f AGENTS.md -91edfded868ff72e97fbb34d08e1be2df5d5b8fa6582b534a8e4d109cd312acd CHANGELOG.md -d5dc2b778af98f52ad52a7515e2d1b4ba8c2e01a04cc6e02564377075b01c501 Cargo.lock -7fd5dd1ccae8fac77bbbea4bbf960f5cf762f712ff17a2e629a5dd8629eb7ff9 Cargo.toml +293fdbc2fc7318a9f544543c2ad518061ba1377edab1c73e93bd3c881d916195 AGENTS.md +38124997eb546aa2fb54c1b7801a127994a7911c469ae93b04b96e9816dec842 CHANGELOG.md +fcbd81ae693bf052a67a8815e227221a236e0486669e2b4668eece1f4e73bee7 Cargo.lock +8e72d66bf61579ceb5237d9195a4c09baf936abc9c9b541f17454c7946acdb58 Cargo.toml 25c7f3c8162cbf5cc156439774118a81dae9fdc52b611ec7e40c230fc99a772c Dockerfile -30708454b96c0dd57c9c621050ace58b92dbdbd85591c7b8199ebb54937dc372 README.md -e796ab6e379b3d71cf5d77ca3eb30bc6a320080af0c9e35f07c82737e09cbc2e ROADMAP.md +bcf49d2ed52433772e249d9d991fdaf7cc82636da4de30f098193c08c4b0d7b8 README.md +61870c209a50f1c683d221b3a11b18507b084c3b602111ef62f8bd90f285f51a ROADMAP.md da8311e3db945290666324a2f24bf4521b365272d7ac3f862ded1be993eea646 UPDATE_CHECK.toml f645f218dd062bf6cb54a8ee634290562cad364a4cccf09f16e3c8303582af8c build.rs ea8d091843f86f4c66a5c76b20268b2feb397070851b6e05c5bc7d7a8d9157eb deploy/README.md @@ -48,8 +48,9 @@ d8829cc68d982c933d04207cf7bc78cc918044c72e024e7ecad5220953bb3a79 docs/MEMORY_ST e36247774051aa9c83c1a2fda91c1f7857991dcaa4fa90320ca5b492e31dbcf8 docs/MIGRATION.md 5f090a190000c6badab2a74e5d4968e70c34de43b59c1452f5b05503b5c5c18a docs/MOCK_AUTH.md 1f85fac0e06e432ef6f744f0b5f9c1b7a27a1e9e1ad30dc1a218eab96b1caffe docs/MOCK_SERVER.md -e7516646dfb107d6240370f4e7460b1189f2eb21f398740381d5d102847bbfe6 docs/NOT_FOUND_HOSTS.md +be53a58afbeddbd7deb4b5f6447f2dc74db0327839bd83407c20915df98dcfa0 docs/NOT_FOUND_HOSTS.md 89a1af6c9fe10c572b211f9632ce256166e67990b5dacacf2ae07265d99a5172 docs/NPM_MIGRATION.md +02126c23264b3afdf1e639c0334d621520e7538ff92d60eb6398c5fb10a23f2e docs/PERFORMANCE_0.33.8.md e68d5a5cf0991de9308f78afb0264e02979f7463a5f395eb7a6e9ec2bd3a3d54 docs/PHP_FPM.md bc068a176056f5ea4d3b637071e644ed58a2140494c233ef22aa66e9700e3299 docs/PHP_FPM_ISOLATION.md ad6e3f003b820a4f45e30e39577d120a69d167c70910bda4891971759458c3dd docs/PROMETHEUS.md @@ -64,7 +65,7 @@ ec7e32fd19e6ba6ed1732f1f3dd92ac0860609e8c0bbd3c1998840cdfb24bf54 docs/SECURITY. 007537ee971463072b2482dfa4fdcf1955f837ced0b711d4eef3b6267d16d4f6 docs/SECURITY_AUDIT_0.31.0.md 4dcf3243a13d9ae1827b5cefdbb9e27bd6310321c50d4d5934527d44437df6ef docs/SETTINGS.md 8fc112cb45a2f35ef5b0dd4371aa6f43aca4df85db62c6ae02e56d74a3b702ae docs/STREAMS.md -e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 docs/TEST_REPORT.md +95148bfa1d2f8ff52b591c9acefc6c8992dadc4ebda43a195101d9b31d67a576 docs/TEST_REPORT.md cfb452d8496839e832b5fbacdd4e52525b0ecc3112fbb62340c1e580bd5c1717 docs/TODO.md 751c9b13b47d0959a8575d6e82bdecba988b950a374ba0b084fbba08b4b65ebe docs/TRANSFORM.md fe3ec6ca16ff933239c12dacf39dd7b45717c0551a8b9f6ce601bf78136c9e37 docs/TRANSPORT.md @@ -124,6 +125,24 @@ a641bd35400c56f3b68b0a92e97b602d06090f03972ca8f01fa744e90dd97403 scripts/deploy 2cc658faaa610b21b48942c59b955525539ad4503fd60f2a49c7e626a22faaff scripts/migration/migrate_npm.py a459d95bbb0076f33ade8b273b813308167f9d8d45242b309a2d18320ca0093c scripts/migration/migrate_npm_api.py 31ccad3ec3c880119f3b7002f0c6652f8b43634edad8ab3763cb0e4497d0bb1f scripts/migration/migrate_npm_core.py +afea7479fd10b7d723f147f6605283174ef81ff5e482f65819db4f01ffb02fe5 scripts/performance/README.md +0380406a059ee9ec27473f8a46435f638f73a6dc729382ae1561c08dbf7ccb53 scripts/performance/benchmark.py +9ac220163256e08513597c397c016a48345b114d7876b439259cc310b36c83fc scripts/performance/checks_cache.py +f09125d081d0eed9a44fdca75de14e6bbf09dcb00fe1f027ba2270f89e3ff192 scripts/performance/checks_policy.py +96e01db050987af431a4662fce34752842bb2575237fd3239bcfc10ae55def6b scripts/performance/checks_proxy.py +c1d8c184811ae8fb1960d1ada08d8a4a95405c3b83dd18e1a27d711b596140be scripts/performance/checks_static.py +1044eb8d225e2fa117d5435697abdf0a014aa2f9063d4b41566e74ef47d50a34 scripts/performance/common.py +0f1fa62ee3429509dc21fe1cbfa7159e38d260ada98bfc6376e8078c9840ef48 scripts/performance/concurrency_regression.py +044da66a00a04f558a6b6e6157db0a7656dd5ee22adf0b0a47482c7f951380e9 scripts/performance/lb_regression.py +1b601d68d15909d786ac63890731f0592bd9057a68993a1d90bc70d6618e6f82 scripts/performance/peer.py +830a360609e2b8ebbb1ef6f3d89e3e6151e8fefb36c3673d20df68ff8932eabb scripts/performance/profile_syscalls.py +ceb26650fc8b63d0107eb9100ccd572e5c70f7a0ce5cc533a94083e20485095d scripts/performance/regression.py +d6480962a23f55d19a54aba27648ca1b28b50f03afe2decbfa272efd142df756 scripts/performance/resources.py +f85dd0c29d5a96ad59a71e035ac4303c7b6a70a8d61280a15cdb966b32a218c7 scripts/performance/soak.py +fe6ff5bfd76ac7a2752a8a2e1e45c63e549c4a61c753008671e478df3ebff304 scripts/performance/telemetry.py +7c1ba46c623e1ade47b872fcdf4526a48ca85c56515dffeac626188b0357d23c scripts/performance/transport_clients.py +bd19431c89d7dcfe6743dffff9c4b16260a976d1936bdc4c11d4fcf6b3a7dda6 scripts/performance/transport_regression.py +1d747278da3fca093ed91c96d4a9480d0f711d0773d673906dbb56081635603c scripts/performance/wrk_report.lua b5b3135449f6be4e97088b76ef7cf2428e2de3c7944c9cbbcb1edd2016c0fd4a scripts/preflight.py 3d6a0503afc25beab79ddc86864bcbb15248ded7368d33aa64321b8cdff59933 scripts/resolve_dependencies_0312.sh 20124173452b4514bad8850c1637569a9a191882478451e549bd16b432605fc1 scripts/runtime/acme_provider.py @@ -153,6 +172,7 @@ b0136544af717b75df2cb107900ea65c3f945fdd0040369dbb93919008fb954c scripts/tests/ 12f2b18b0ed2171c49eb8cde2c2b88fc627054c2f574c04bd9847821b00cd4c1 scripts/tests/system_ram_meter_0332_browser_test.py 046b4282550f5cb4e53906665c91c7442be70fc68fd0743466fd832582f7c979 scripts/tests/test_stream_tcp.py f0b48ec0cc4411755cc0b4128eebce710375afa99344cb76198cf31074f8eb63 scripts/tests/test_stream_udp.py +6fa1667a844b7bc2adaa78738339b58ac6c94a6d6e7be34573433dcd323ae809 scripts/tests/upgrade_performance_test.py f0a2e3daa0a49aac54723cb5a281360e49a97c076281372c5cca2a85e096c02c scripts/tests/vhost_backend_popup_0337_browser_test.py 23cb1f790cd5cee1b76ecd85f6a2a44ef2e16b0840bf06beaa2ae13048063b2f scripts/tests/web_observability_0330_browser_test.py 3babdd0fd6e2998755ae88615112f6ea056f5c808245abb6de60fbda555594d1 scripts/tests/web_observability_0330_source_test.py @@ -167,14 +187,14 @@ a22e5ea6381a1eacafe650be0f5cd6e653773e31f6491a562fe0459a309fb7cc src/acl/tests. 587097620b2f25ce7c6f59f907b47660184b095e3040c7615e74509a82e7cdd8 src/acme/jobs.rs 3f158f46e80b403b658b4e9b1e3710e38c70e47b2d476b8223d9c394ffeeba95 src/acme/model.rs c5334de6c732d76b2bea7bfc17b3ac305a250bbaad31a5420d6a7d7abb200449 src/acme/providers.rs -b9e57db4bd80ef37564dfc533a96897d8a494671d53acea9fb4bf28d23ba370d src/acme/providers/tests.rs +d1dcb7bdfb7cfdc9c3b88cfb6908201c58532bc888744a13f45853079f214659 src/acme/providers/tests.rs 29ff0647417b0f1d50a4cc075ab51afecff9ddf47db3eb7948d51db5a38f33f3 src/acme/runtime_bootstrap.rs 87f64198770ae026c03a242fa542db2590ca734b02e756f1e5c28d66236f753a src/acme/runtime_env.rs f8075a5ef9ae5651d72a33ac0f0fd5b44ad0ae30f6e2d2318412177e0ed837f5 src/acme/runtime_versions.rs e38331a1b186b49fe9d04051de52b603e1fa028def37e4e2f52e386b4d7b29ac src/acme/tests.rs b6f38f3fd75d6685bbc882ed1077a38bf495cfcf01c397f69ed9b98be68b446f src/admin/access.rs b4a2a068acfa1143b0032b9cd072c19cf3fdda2580f0b932d11d6368cd2ab3ad src/admin/certificate_api.rs -019f4aa33e3596bc9c11ef8cf5703bcfffe46c15288c0eba83c8dd9e38055fb2 src/admin/certificates.rs +51f46a2cb3167c4e3a784dfbb59b8fe0e9d5d3d51365b26699498e31d0afb6a9 src/admin/certificates.rs b5f6d49f1add583cfc8cd4aa36ffe4db56dac4de3b151fe8239fe42f507019cc src/admin/dashboard_presets.rs 5e150d4ef0413a2f92db5b6631669933b84d4b4796633d01476c4b39188cd05c src/admin/documentation.rs 958546c43c05bf4bed8121b24db3b3096f9243f3c56a71e1762592b755684013 src/admin/documentation/documents.rs @@ -201,7 +221,7 @@ a40adfbaa908da3ea726d7aa3d45394a70a6a55b6fc0063270ec4d2a2f2026a3 src/admin/sess 4b8a0483ede651d08489a4d6e5bb616f06423094bbbefcee70b8755d65c04398 src/admin/status_live.rs c97881b17b7a42511868b0e48e2f25aab6fb5b613d538f5e1f1967508454e486 src/admin/status_system.rs cadd7dca29b9aad8c77c7bc23dd249ea37a15adfa4d636a8ef00273a91ce35dc src/admin/tail.rs -3d9dcf96d8f05f1f03ad41b6f53d2b743ce6f9fadd608745d04fced0efabb9af src/admin/tests.rs +ccea3b72782aa9d36e41b89f40a755289d285692155c27cc81a0968f8780fe2a src/admin/tests.rs 48fcd818c522fe80f2c7b2e218f87de6a7772ffd0a24e93502780b03ec78e335 src/admin/web/acme.js c0d08c5b8fc13dec9bf53fd842d224b9df3874fc3bdf31413e3ab182a8cec2aa src/admin/web/app/backend-dashboard.js a085ee336e6669229f3ad2f74536f19bd088412ca79bcaff30dff293f1e1baf9 src/admin/web/app/chart-scales.js @@ -279,7 +299,7 @@ c96a87e82ff0c1c9ce3d0cd5135903bb53af78d1c4fb6ebfe5fea503bf5644ea src/auth/store 76aa2afe9e7302be39b3512f30d0448d9134300f8ae930d64ada40cf3ad4a8a3 src/backup/archive.rs 732cd4f9ed38ae69f8bbae61b1db8baaa6f86b07ca21c41f24a206a30f0a96fc src/backup/ownership.rs 076350506215faec3cfe7d9de4e60baf29672cc22a41eabe601dcc510c257799 src/backup/snapshot.rs -a00571b409d305af86ab2a57a25434b5ab58706772df440d017fc1fec097f7b4 src/backup/tests.rs +5c19490d834d9971166b6b784a75b081bb95fd50c8c634ef3c87924dfffd4a19 src/backup/tests.rs f5afae218f3a6f91bc2f1f5a90094630ce5b7ca574de61807b5a317b13937ec2 src/backup/validation.rs 426a946b2c9e244f09f6cbc5f9664b8ad0737529a9bb5a3d549d27196a1f8043 src/balance.rs d3257fa5222dd4f70a82400f5060d3cbd33c13862a9320931361fe0e1c5bd452 src/balance/health.rs @@ -297,7 +317,7 @@ e022003be144598100389cf38d76f509b5dbcc035d5bae556bb9b94cc8bd30ba src/cache/cold 9fc18368e2ce278ef0ad2b73ff016aa24936c2186be371ca4010a1f6f63bb0ed src/cache/cold/startup.rs ea319b6e200b0c6ca93da5e2af7a3f86e3667cef918716f54f82b8012111b9bd src/cache/cold/worker.rs d51fa4f320be56c572f767617428c3f3838543cb0eeb7d1f8ae791e1a1ce9a71 src/cache/collapse.rs -27a35689fef639f1aea00d9f5a86adc981c0c304dc3e28e6da40494dffbb6bfa src/cache/dashboard.rs +284f1cc56113fbcc3b1e617103d75a7b70fd7d43e536d6017c15912154921424 src/cache/dashboard.rs 780c2654c67dbe176d8310678e6deec8022bcebfd85b95df7262069ed41f57b1 src/cache/fill.rs 675d18afb53f25c56cba49bbb431fa39ecd9d7bdd192c7b39b0698225de7a2a2 src/cache/invalidation.rs c1357a13658e1ed5158084d3a41ba9ea906512774a5863ce9c56cb508d3fa6c8 src/cache/invalidation/ban.rs @@ -306,7 +326,7 @@ b74945c7460b76ed7afcb02a45ede09d76f08e0703c47920b9b9d794d4b74980 src/cache/life bd831807ca4720b3a41a6ea1d9a6c0ed2d935225e2dacbd9313be064f2e4a20e src/cache/lookup.rs 88f6210c03d7a8e7a35be1f123c9c15675af6e6a599c50db927d99866851b634 src/cache/lookup/hot.rs 1779abcee77600c13050a2882f896a5b35625b1ae53737c2554179492ce0e40d src/cache/lookup/insert.rs -55a39fbcb8c034a98eaad44d9efc092902cd591ef167b8d8e14a56fd1a9f1794 src/cache/lookup/tiered.rs +107a589974b9689009a9bbf088818dfaec71cd1aab8676bbc6d0118359a54a31 src/cache/lookup/tiered.rs 58c03fde09e5eab40968679793b364f4f1cf5fd832bd79ebcdc92bb23871ad82 src/cache/mod.rs 0c8b0d550e94d4474dcdf991aa0340228dc5f2f904f39350e6e666a16f16fe87 src/cache/model.rs ba94226addfd6cdab67d666dc15b8412c4d117111e44639e503e89a95175d0a2 src/cache/model/cache.rs @@ -321,23 +341,23 @@ e26dce02df9c043329ca164fed215d271781bce8fb03240f528331bf3df6b9d7 src/cache/poli d426d341a7678f8ec70406d86052c97d0f49804bbcd8402951103d61a735b9da src/cache/policy/response.rs 7e2bcfbb2b57732cdc704d9df7a9298fb80e735e37984431bc936630e41e7f8a src/cache/range.rs 7ad96b3baae36ec49c90d03b380e749944fb3d54abb045c90db3a35f6b89b1c1 src/cache/tests.rs -981c33d8321c0d5482a00dc3cf0911e95fa69a29c68a2f5b6cd4cff27cec1cbd src/cache/tests/cold_tier_tests.rs -22cb9bf20a0d25bee30c1e2213dfe8278ad7d0d5d294275d47d4a6ff9ac646ab src/cache/tests/dashboard_tests.rs +a1c750a48b4562d88d904b45dee5c783d4bf0ae1a62e67719df6bb2a7374465b src/cache/tests/cold_tier_tests.rs +3842cdcf7c3414b9c30f5fbed927b93e835eec3ef96d4c6ee44250038b834276 src/cache/tests/dashboard_tests.rs d7a02eb7bad37e6a5524600aabb5e60ccf50e26c7a487e2806891c9d8acd48f3 src/cache/tests/http_invalidation_tests.rs 1db70ea5f3cc1f1543504a68498ba23cafce5f9bb48c4616a4bf70d9a536790e src/cache/tests/scope_tests.rs -9aa6bfdb88b5ea4ef0ecd72e8e3c6e82b5ab9b37051ad300b6a5dc12f8579ddd src/cache/tests/tests.rs -444d9a364339248bdb86f2285de6d7e598b880502e25a70be0ee877ff3e52ea7 src/cache/tests/v022_cache_tests.rs +ddbcf27a667d779065d7a654d8094910e92958d2b8862a2ec2a85ca41b7f21e5 src/cache/tests/tests.rs +af28534625859ff66011e10c54cff8f82c2cfa1c173c4d99b89c27c1437f0659 src/cache/tests/v022_cache_tests.rs a8a0ce446eb53ffdb8f8d97efa3e1344410dc3798b25f62b8817e8e160d28940 src/cache/tickets.rs -28f904cf4827294f2f759e6d3624608ed90059b64e42864e55dc9213824eb655 src/compression.rs -e2f58279499b7c3b47c65d3a7814bb5c7cd6506544d939875fbb0f91fa9aa59d src/compression/tests.rs +e0146bf5d2e2e33aedcccd9205e5bd457559c9d77dc7ce266f8c165d1b867f0f src/compression.rs +4bdbde197d135fee8be20e93427eba8ca7b60b801717ed7ca734319bedb6ef05 src/compression/tests.rs 7bc8285cb2012506fd1a38a71dffa561f885f4ab65a9b2a7c8344319e3cd1cf6 src/config.rs 34be288c858a037c7174f6c4dee23178b01b565aa9d65f0951f351e1685847df src/config/backend.rs beb831a208c4e5f7ebe8327686b1e0edc66608c7032f895cb4fc3366b189aae0 src/config/compile.rs 490d05d84b2fe349ddde54eae44880993fab70811652484dd9ba38b5069d603b src/config/internal_routing.rs a19fc675720c7c2dbf4bba706e1b1c30c83c6df1da3f29e3cbb3b82442e7246a src/config/model.rs f66c2388f31b19142c12469df23d43451e0f7c48b158d4996920282c06d32076 src/config/routing.rs -818545ad36af3ae8d56976f318349dd1f5264ef5665fbf94681a81b79003f8cb src/config/snapshot.rs -76cbb4f1339de9f13d441561a3c4ee6bc5ff06e90ff0f019b7f0239c74f9542d src/config/tests.rs +b25e212a493c6d9f6cd1d1136935182504163c7b8d7e776364389451ca2247aa src/config/snapshot.rs +f5431467dec55540f1f881541bf13d9402753680c7f83e3deb9d0e1fa747313e src/config/tests.rs 23541660151d9005555a07db6d491455d61b185f0cc70c3ec3a0bee2aef08dc3 src/db.rs 30f0b7269224a64e3f1ec9e6fbe9e27ddb1d308dc84cc9882e50545cf612695d src/db/certificate_api.rs 20ba52d3755c359d670968efa53b0604ff7cbed63a416f9f765b50a1f45074ac src/db/dashboard_presets.rs @@ -359,8 +379,8 @@ d3dc58628683472ef4d205fa5c42f0b7ef83cf90846146d96941cd3b36a40766 src/geoip/test 70091bdf6f38f03b6df8c8c4407c300677e57f293130122503f936500963d37c src/geoip/update.rs c1b49bef28d87712e4c46138e70b52c4bcfb1a00196579031fac043d0b4aaa7b src/geoip/update_http.rs 9a912dad0b8d1e10410fd95d0da3684656092ef85cf8b23eda4ffe7fb92921d8 src/geoip/update_tests.rs -13269be4ad8d3e4c91893753f654c3022e6f86d171c5d1ff21eda2d9185ec61f src/headers.rs -fbb6859780309f8cca1aeaba43fa67d13a1edf6f5a60c5c982d2067b71fb0846 src/headers/tests.rs +f6ebafafa82391f8cb3b5a09331f3762b6ca5a9fb64bafb5772cde3ab814dfcf src/headers.rs +e4f07bfb7eb75b6897ef812870caff158679a3046d64582428abe8c6df490dbe src/headers/tests.rs 9e21edc67a14ef8a2ce3dda0ed18784d0fd0be305973e5d216058b7ac802c6cb src/http3.rs eb57117938a447d9a6c2ec1806ebd9fecc640a68c88950a8b35fa9bad14d0dc6 src/http3/body.rs ed25da264a2d25b40c4fcddc97c626a3a43d4f3a9be6c6d31af58b9e4925c198 src/http3/diagnostics.rs @@ -369,11 +389,11 @@ f2a8c2a98f4ccfb708f9d75a48ec7b351232be9b8a4364b7e63ba14d28eead7c src/http3/sett a31db7eac12b578b1eb5a74fae98bbe36312da95b7d7173135dbc41fc454da21 src/http3/tests.rs 68fb5ab6a889995a66ad12cb6acf88c5d04f0aca572e2ae15f1a9cd171a5f24b src/lib.rs 2551189a3e5701371026c9abd2c5d44d37495f28fb67e220180421bfd315e3dd src/logging.rs -3849a09a7d7402dc4d867b646cda153c574327ddd3c707578ddb4dc6f95b1563 src/logging/error_runtime.rs -a16613114273c54b6d2a16a94fa8748550e91468585469642622bd2c86087baa src/logging/format.rs +18c8d74c21a47f234be93551d7264b1f8f8c00d1bbfbe555d91618c58cea0740 src/logging/error_runtime.rs +87948a511b680e1c274eb46d13b938b45792e63bd6cff1621afe3477708ad2a8 src/logging/format.rs f5815d778cc1785723faed4abb15f9880f22b6524b5289fe1e7158905aac0986 src/logging/model.rs 42fef80af50735cd566c6801dad86ba81be98cf4a8ec7d45c2ea26f53f556a22 src/logging/runtime.rs -03c50bd14fecd421b0901a5f0af891dc277e35420e32068781e3a6d78c88c24b src/logging/tests.rs +584782215ea78a88526cdb5515031d8d5b87910875e26c0024b93a06680f6791 src/logging/tests.rs 3836ed14b6710e183f048ee4d7807a35366c27a27338057fe4a2811129b63302 src/main.rs fc8e99eac83c083d65101f6402aacbcc8392d66508c31566a50de3ebcb12e7da src/main/admin_runtime.rs 42a9197475823f67c1ca762951ede5d7a2f10124bd6ed4d1a3365f4297be894c src/main/bootstrap.rs @@ -386,7 +406,7 @@ e5c2e9189777725f4afa1c3c052e4f75047ec3f2f486630d990f5d3c194bcc96 src/main/tasks 49b11df65b4fb0b5b727f9f867436584680b45e3f4fbd53f74bc0cab8b9a88ec src/metrics/vhost.rs a54b5b34ea65f29723b89b81bf7968a238e8247b9c9760f3430d3504cb1017c9 src/metrics/vhost/tests.rs a4702c95c7e5077c2ccff86e2e3216e1da6ff9ee4383ae199a0aff2f78db325f src/not_found.rs -668840e7bd70590e2e13f59b6d5b9e43ca7c877f3d07c71907baea91b5bba6cb src/not_found/tests.rs +c915d30bbd7032d867e7916b4cd45f3bb7e7604d3f4558f4383c59394b4300c6 src/not_found/tests.rs d66936cc15fd5d56566d40fa8cab93f80d94b05f10ac44478a30f63572a95e32 src/pages.rs da40e8ece87245efc49a0c4e750526b1d19fd97565856bd5caf641fcc1dfe18d src/pages/tests.rs 0dba7b6a33866cc7bbe05509b01961e545892645d1dad4eb88ac8a4bec65e3bf src/prometheus.rs @@ -397,29 +417,34 @@ d3c6b08088df0003144544936a55e2a3661aac85292821b594f00adfd19a2951 src/prometheus 028e1dd9f2ec2afaf699a6b21c2d4b0d96e76f11f5e4ed009c233dadf0f3be51 src/prometheus/traffic.rs e03f0d6b3f35dae6b98c394837aa0d17e4d73a8306767b4c607868bc00c30286 src/prometheus/vhosts_backends.rs fb2d8d45cd2e947f783eb981b37fa418c39fcb327a3af17a648fadea7f37f888 src/prometheus/web_php.rs -b5856fd38a957b2ca9c7e3606d84d13d5cfcf3a45b487b15ae1d2dc248cbda57 src/proxy/body.rs -16b9d4db3b20b2ab14c47ac14fcd18d3d8ca77c3ad9a1f37866ebfa60f379862 src/proxy/body/tests.rs -3d2c8462fd259c299ed26493cb2316d0b7349bd32fedc9b0c11e77b21d6faefc src/proxy/cache_helpers.rs +fb02fb31ab62ac47c998d418fb8fe2f1d810a451b68805f31d6ecc244ae20820 src/proxy/body.rs +b8fb54359a7c60e5a8bd8ca45a5a64641633c595f0deb84d6d906c31fbbc1312 src/proxy/body/tests.rs +c3dcd88f4b00a9dbcbb65f6fa70ee2ab98c2fba20e9a2dde3b8852306111836f src/proxy/cache_helpers.rs aa49c9928bb91e3d5bae0d340d88396a0417b9edec6192d41e1403533319a897 src/proxy/cache_http_invalidation.rs +676c1b325fd8e55bcdd86451c7d1d8b8d347ca00e8da6b3e5b148a58c376a9b4 src/proxy/cache_plan.rs +3404b03096862de1050088f62cdd811ea1ab61d191f902501173107f81f23b9b src/proxy/cache_plan/tests.rs 771cc1a38927f96e593b144dbab66cd64a5dc0ed42d54b1615c359845b2b7223 src/proxy/error_fallback.rs bf2e6bbd64fb45fceed54af0bff1c1e00da22b79c64dd8f5c23d2af0dbab0b7d src/proxy/forward/cache_lookup.rs cfa941b60b5d167ec9d8e2566ea3342b588d1a9078a6ca711ad6062ddf00fec9 src/proxy/forward/response.rs -3b220cfa474325bfe7853d62daf2c71059d0dc582ac749fe61e2864094545d63 src/proxy/forward/route_cache.rs -cea9e47ecb31b0e4c0bbe0eb83e0e53b5e7bdcb9930107b67a8c34eef01a3f49 src/proxy/forward/success_finish.rs -902cbf8dc3c1ec8d25411bc7fe0400d301f3a7cc885afada594e4eaee3bedd08 src/proxy/forward/success_prepare.rs -ce782dce2f7fe65ef93d08f88eb8277162ad9b975c1391da9c45869511196621 src/proxy/forward/upstream.rs -b05c4f5c009c5e410f472ceaa999fa3a9c7fb60364d5b62de219f0924c9d524e src/proxy/forward/web_source.rs +b4be19f2dccc97270f3596d7e56dc60237b7d4d254cd9362a355812026d90295 src/proxy/forward/route_cache.rs +96c97928986ca89c2d6d415d5b107b9cc7228410bae93a2c08c24974324f4d8d src/proxy/forward/success_finish.rs +0a921474ef2b93eabdaf3888651cf29130eace5ccb1e0f5d6bc25e6aa69280be src/proxy/forward/success_prepare.rs +a064cf54ee62a374c1753f7a64940990a591888efc4516a07942c52c4e0842e2 src/proxy/forward/upstream.rs +1f36225516caefc756a49bbdf37b227a7ea97b72ab78df021c9234e5c3dd41fc src/proxy/forward/web_source.rs a9c011061585c067f04f7885215d53e6c40474bdced15d2be5a5ba65190910a0 src/proxy/forward_entry.rs 9b25f5e3ea4443a63ee6f45d12e1957dd316fe8e85325fc00ea416faaab1025a src/proxy/h2_graceful.rs c438066616527a3108f2ad53e3698ae9b2a80961714394cdd0a450c92f99d992 src/proxy/headers.rs 5cb7522ceb9a9f083a15596ac4898559295e38d1138c80099577211de8a868ec src/proxy/headers/tests.rs -8d17b97d90fd6a749ba8d37a8d28c94e6d7302b6c86905f073e2dc595506961a src/proxy/mod.rs +3f25429418941eb72c3847125340db74684ad316eb278ecf658953026fd41f4f src/proxy/mod.rs 55133ceace2e5262d9c54fa41bea099a27b817d1e09c1cd0e2493fd9cee4da38 src/proxy/redirect_helpers.rs -ad701033f005c9c8c4b160f9b9b97bcabc17e936d8ade273a111937c483a125a src/proxy/tests/authority_tests.rs +c61738672f210e97333c8c89f9b35f8db454cbc1c36955288dfa4cfff2bbbc04 src/proxy/request_id.rs +6ff45990f6beb914e89924bec2c41022f3240a14357cf66ec4f8ada414a49767 src/proxy/request_id/tests.rs +8ad3619359f3befa14ea71ba43c638fea8f4d8a859cd07e4ed505731b8e32e72 src/proxy/tests/authority_tests.rs +1aa9bbbfb2659facdaeaf185e11221b1c8cd5fe6e23c7c1dacd3aa55e3db4fcb src/proxy/tests/cache_fast_path_tests.rs 0f2eacadf1447db8aa1c1a78005aa262e0f747096bfe7e0a0e41a2cd31a0d17f src/proxy/tests/h3_navigation_tests.rs d134b0eb617f82f9971b3f3461379ea37c57bd0079bf54748d0c434b2ef1b475 src/proxy/tests/http_invalidation_tests.rs 591b47fc40cbcb36d7c71998933dc873340dfcf2657e16c561ab64361c4dbab6 src/proxy/types.rs -1b58f39045e82b1a290435502f5bf8a52c208c283bfb0d13618e0a7d150bb6b1 src/proxy/upstream_helpers.rs +8b053027bbdbbebb624164d9c1b15b2b8f5a13b8a23a9e1477ef4e840ce0334f src/proxy/upstream_helpers.rs 2d9142e3ae95895b5271b4009ab48236a3a2074ce51179c021193b35777560e4 src/proxy/web_cache_revalidation.rs d7b4b809b12ee89293df45e9a64b1c9981fb3f89deaab3762f4a3ad3992dd7b1 src/proxy/web_cache_revalidation/tests.rs 69f775f6746b4c6d729dc10961dbef54168846f4ce9cf7fe453ab5a2b879c9b8 src/proxy/websocket.rs @@ -486,7 +511,7 @@ cf5195ab6bacccae0082da7b3f1bd0382b73fdeb3607f4ae569ca6daab9d10d0 src/transform/ fde2fa3aa94b30d8536afec1c11348cfbd922d0b5ff89e91d34266e8e3863e26 src/transform/model.rs a4e1d2aa2913587c250f251356431097b76995aee6e8bf9e35c4978a95491de1 src/transform/svg.rs 0f53c64f442390ee20a59087a10f8f9ffb58053263e9aa848ddabfae1a6f3f51 src/transform/svg/tests.rs -8ed4baeaf79edfa2a84912cc00f1d13c564e1b997efe6888d2e4b5a16aaa8905 src/transform/tests.rs +d1f3f53fedae0d8ef69eeee457f7d30ed5a670a1ed4ced60683400ee46680260 src/transform/tests.rs 6146c59f36cf419623747d497b3de685da6c84964df43317bebdcb21deb9ee09 src/update_check.rs c42d000d1d576721af3ffe930589388693001b8113554a7658f6dcbc665b5d1b src/update_check/tests.rs 92efcdaafb9f5a8514daf63d7fcde29be977d7bdcd90162eda0ce00d6967ffbd src/upstream.rs @@ -509,26 +534,29 @@ d9178aa934ee1a7236cb04d864fa842faf64156e9103786e3103c92bc4e18fde src/web_server 86c744216d7132d8294a6e90ba9be5fd871646006313d1c62506d40c81db9b12 src/web_server/fastcgi.rs 200cba8cb3482e49db73d2c60cb60786175177c7d4be2a566cd281fec7ba7fca src/web_server/fastcgi/protocol.rs cef44ccdf882d84892a64bdbfdc1ba01380fce5e5f86d2829b0f9613f738b964 src/web_server/fastcgi/response.rs -8186363315bd998919c6c783e6f7501528f257a5c0da77c5d60f423e8670db5e src/web_server/filesystem.rs -0aafd7f37c4fe784b047646e4ce5ddcb5fe821231a41ed0a9f519529385288a8 src/web_server/htaccess.rs -013830a79a78ce803ce776a9b333de406367751e0cea7e33c3f6a98e6600c243 src/web_server/htaccess/model.rs +e15361622683268c5606a39a9e5db3938e630999767898391226e94ad2e421e8 src/web_server/filesystem.rs +d4fec3682532b0f2d11a0aefcd024f69fb623a39922ddb6c528a2d2de265347d src/web_server/htaccess.rs +ca3cd376b313af1ce0ee65081b3327eb213f000d5a215aa4ee6b764de9702126 src/web_server/htaccess/model.rs 76de1d11df75f4a64556b2821fd0a1774d26c9f0ca0e5f2b5fcfad0722d43d47 src/web_server/htaccess/parse.rs 66260d159986d41eab0dfde2cb9f0713fc1cc209c2fb47e9023bd24fd37919e8 src/web_server/htaccess/rewrite.rs +8ca74d9cc4470045301f70eb4a9fbabd0dbfe74434429148d2230df9f996c06c src/web_server/htaccess/tests.rs 3341264f6e8041ac5a5d3c4b1601a69787386116019b5febc1a5e22bdb1186f9 src/web_server/metrics.rs 7b945065e636ca74147048aa53cc5b34028cced72a780fbaf0aa2499b00718fa src/web_server/mod.rs 67ab8bef567452f123c4b9b46a942b39c93f1f765c128edca7ee808ff1c5e304 src/web_server/request.rs -c5cb561b0f276e8082f904b9446fa5885f6b3c0608f25ea2ef425061e9f7f6b4 src/web_server/response.rs -cb461fb68c2740270edb9030a63e9d8c70c3ab241ba20d92f1a6e5b83915996e src/web_server/response/file.rs +d98c80663847d6d83073df074ebff65952755415574708abcc153bd8d3adfaa9 src/web_server/response.rs +c89e412584cf524cd1cd332ce555ff922a9e5549cd5d20b2e9a29393456be889 src/web_server/response/file.rs +ba793a140699956a9aef6bc79b0c731c481af8ab7ac3d816a28695743febcb30 src/web_server/response/file_body.rs +c2e54fd803a10f74490f183e8c030fd0e3e72f5de4e79c55bc393ab57d90ab9a src/web_server/response/file_body/tests.rs 20509f9302b79d3a7be76dda6edaf5711826d3ddf47d19ebe07cb289427ca328 src/web_server/response/headers.rs -9b58d6bb3ff1520060fc5aa86a3594f99192b1a8f8183255be1fb3ff35b4bb35 src/web_server/routing.rs +305c0109b4f869a99381a142853f9e2205f5c7c4f904b2dfa4643274bfc542af src/web_server/routing.rs 400e1c8aa2fe857d96036a64499fbc3de44c1e3a53811c5b25101fb843359792 src/web_server/security.rs -a082e1d32aeff7b64976c943251b0c6487409f191883bc822ac4a60bb4d33e7d src/web_server/serve.rs -6b3ade894f02fb68f3507e1ecc578f173050d97100d41261467faeb9fd10c31b src/web_server/tests.rs +54cf72a82e023fe46513b9cf3130adfef1cd96c40f790c533016b4825d542e06 src/web_server/serve.rs +bda82f531f61251772d3bb4bc67d98ca613aebd51b489b7cac1fd5086c653b1b src/web_server/tests.rs f00743af2cf4a5952caef7a1dcf68e7817b5599a252a9973e1c22045517c0b0e tests/fixtures/argon2id.json 1725c10331745dc04a07675784d385260da7b14567b8dba3cbae5e891eb5dadf tests/http2.rs 347a4ff9e028a1e999ad129590c355b5734cf928dd81e5099aea0c8aca8d5908 tests/http3.rs eecf680f001f2110dde4eceaccf2f922859a16c946a644f8854e8de4d3771f7c tests/policies.rs -728999110a6d8cacb62bc0399bc333fa23a66526ee23f563a3c93bf00e5fad19 tests/transport_config.rs +7a28cfdb43a3cecf90136cf8898c060c382af557ce4ff168a6672391a0e5c26b tests/transport_config.rs eca68a07c2b1e45fdb8f512294f5a432db3ae5a6aec8fb200b47f155cd9a31d6 tools/README.md 358c1e94dd2b4a756430e5335747f0b437345b1713670a9972c5bcf78b837ccb tools/audit/admin_audit.py 7c30c280d0b0a8bf855eeffab583ca34dc161255f7ef6124148aa979c17c26d3 tools/dev/memory_load.py diff --git a/docs/NOT_FOUND_HOSTS.md b/docs/NOT_FOUND_HOSTS.md index 09f4c11..1aa0e64 100644 --- a/docs/NOT_FOUND_HOSTS.md +++ b/docs/NOT_FOUND_HOSTS.md @@ -17,7 +17,7 @@ The response can be: - an empty/status-only response, - bounded custom HTML. -The status is selected rather than typed manually. Application-style pages expose only the bundled 401/403/404/429/503/504 templates. Placeholder, empty and custom-HTML modes expose the supported application error set: 400/401/403/404/408/413/429/500/502/503/504. HTTP/2 and HTTP/3 toggles are shown beside the listener controls because they apply to the selected frontend listeners. Host/listener ownership is +The status is selected rather than typed manually. Application-style pages use the bundled 400/401/403/404/408/410/413/429/500/502/503/504 templates. Placeholder, empty and custom-HTML modes expose the supported application error set: 400/401/403/404/408/413/429/500/502/503/504. HTTP/2 and HTTP/3 toggles are shown beside the listener controls because they apply to the selected frontend listeners. Host/listener ownership is validated against vhosts and redirect hosts, so two active configuration objects cannot claim the same frontend binding. diff --git a/docs/PERFORMANCE_0.33.8.md b/docs/PERFORMANCE_0.33.8.md new file mode 100644 index 0000000..5409a9a --- /dev/null +++ b/docs/PERFORMANCE_0.33.8.md @@ -0,0 +1,353 @@ +# RustProxy 0.33.8: performance and compatibility results + +RustProxy 0.33.8 substantially improves local static-file throughput in this +experiment: **5.23 times the rebuilt original for 64 KiB and 10.13 times for +1 MiB**. Small proxy and WWW responses improve by 15.71% and 10.41%, respectively. +Results are mixed for larger proxy responses: 64 KiB improves by 2.41%, while +1 MiB decreases by 2.77%. This is a first optimization package, with remaining +distance to nginx and visible memory and observability costs. It is not a +universal speedup, nginx-equivalence or production-capacity claim. [B1, B2] + +The changes preserve the LB panel, schema version 10, existing feature controls, +TLS/cache defaults and bounded pool recycling. Actual process tests verify the +release separately from throughput measurements. The complete package is the +unit of attribution; no experiment isolates the contribution of each edit. [F1, +F2, S1] + +## Executable and evidence identity + +The tested final executable is `rust-proxy 0.33.8`, SHA256: + +```text +24cc77a084ee1db4cd007f86c4b18b319bdc2e3f19afae7804739abff5e62a12 +``` + +The rebuilt original 0.33.7 uses the same Rust 1.99.1 compiler, locked dependency +versions and release profile. Its SHA256 is +`85a91318b41a405d1322cbfb84979e05490a7c2ad429ee7cb0c0836acca63899`. +The independently supplied 0.33.7 executable has SHA256 +`c68d63326ddf1e25911a583d994a213132dfb1b094425fc6cf358470299f0a92`. +Differences from the supplied executable therefore remain a separate comparison; +they cannot be assigned solely to source edits or solely to compiler provenance. +[B1, F1] + +The primary run finished at `2026-10-17T09:01:41Z`. All **2,077** files in its +sealed manifest were independently rehashed. The SHA256 of that `SHA256SUMS` +file is `5036d1f27a53dd6434b4be5a9be99a6e300f10821cffcc15b79f4da06ff147ee`; +`runs.json` is +`ebd9cc06d52496f776deefc48615598a64f018a10be5811ac89401b06e821e5e`. +This report was created after the release build; raw results identify the tested +binary independently of subsequent documentation. Evidence identifiers below +refer to workspace-relative paths in the accompanying verification package. [B2] + +## What changed, and what remains deferred + +The supplied PERF-00..08 plan is broader than this release. Its boundaries are: + +| Plan item | Implemented here | Remaining work | +|---|---|---| +| PERF-00: reproducible measurement | Real HTTP runners, interleaved comparison, resource/telemetry capture, exact payload checks, separate syscall tracing | Full concurrency sweep, remote generator/origin, allocator/cycle profiles and per-edit experiments | +| PERF-01: keep-alive tuning | Existing controls and default limits retained | Controlled idle-pool/recycle sweep; no claim from the old configuration-only experiment | +| PERF-02: compiled feature plan | Request-local cache eligibility plan, credited below | Broader immutable `CompiledRequestPlan` for all optional features | +| PERF-03: cache OFF path | Skip inapplicable cache-policy/key/header/revalidation preparation; retain bypass reasons and cache ON semantics | Further changes only with profiles and equivalent regression coverage | +| PERF-04: body/telemetry cost | Narrow compression-header copies, direct ID hex formatting, lazy idle timers, shorter history mutex section | Wider `Exchange`/analytics redesign and other locking changes | +| PERF-05: routing context | Existing validated snapshots retained | Shared validated route context and rewrite invalidation redesign | +| PERF-06: static I/O | Narrow filesystem job context, borrowed pinned root, reads capped at 64 KiB, precise local EOF | Buffer sweep, secure sendfile/io_uring and extra FD/content caches | +| PERF-07: pools/connections | Existing semantics tested with real peers | Pool/selection optimization; no LB UI additions | +| PERF-08: release gate | Listed laboratory checks and 30-minute soak completed; documented rollback | Memory plateau, deployment-specific 24-hour test and staged rollout | + +`CachePlan` avoids force-cache/cookie matching and request-policy work when +ineligible, while retaining diagnostic reasons, origin conditionals, privacy, +range/transform interactions and publication tickets. WWW requests move headers +into local serving when cache conditionals do not need a retained copy. +Compression copies only relevant header values when needed. Request IDs retain +fresh OS randomness, SHA-256 and their 64-character lowercase representation. +Idle deadlines and cancellation semantics remain even when timer allocation is +deferred until a pending read. [S1, F1] + +Filesystem jobs receive a narrow root context. Nonempty paths borrow the pinned +root descriptor for the first secure open, while root-directory operations keep +independent directory offsets. Local file bodies report EOF with their final +bounded DATA frame; short reads and cancellation do not publish complete cache +entries. Arbitrary upstream bodies are not declared complete from Content-Length +alone, preserving trailers and framing checks. [S1, F3] + +History entry cloning and destruction of evicted entries occur outside its +mutex. The 4,096-entry history, chronological retention, `try_lock` admission, +drop counter, live broadcast and configured sinks retain their contract. +Compatibility repairs also cover explicit Host ports, long-form `.htaccess` +Expires, expired cache inventory, reserved diagnostic headers, escaped-JSON +secret redaction and certificate authorization ordering. These are included in +package-level results, without separately assigned RPS gains. [F1, F4, S1] + +## Measurement method + +The primary matrix contains **120 measured samples**: proxy/WWW, three object +sizes, four executables and five interleaved repetitions. Each run has 15 seconds +of measurement after three seconds of excluded warm-up, using 64 actual +HTTP/1.1 keep-alive connections. Payloads are 1,040, 65,536 and 1,048,576 bytes; +cache is OFF and requests use identity encoding. [B1] + +Four frontend workers are pinned to CPUs 0–3, two origin workers to 4–5, and +four wrk threads share CPUs 6–8. All processes share one Linux host/kernel and +an eight-CPU cgroup quota. nginx 1.26.3 uses sendfile, access logging OFF, +upstream keep-alive 64 and `proxy_buffering off`. RustProxy retains its existing +history/analytics and request-policy work; nginx is a differently featured +reference. This is a warm local-file-cache experiment. [B1] + +Before measurement, the actual ACME/Python startup must finish: authenticated +status must be terminal, with no active jobs/configured issuers and one stable +RustProxy process for five seconds. The harness validates process identities, +nginx worker counts and affinity throughout sampling. A discarded early attempt +had incomplete nginx descendant accounting and is retained only as diagnostic +evidence. Earlier syscall traces without this quiescence gate are also excluded. +[B1, S1] + +Exact HTTP 200 and payload hashes are checked before and after every measured +run; aggregate transfer bytes receive a gross sanity check. wrk does not hash +every timed response and counts status errors above 399. All 120 runs passed +these checks, with **77,713,019 completed requests and zero reported errors**. +No completed sample was removed to improve the result. [B1, B2] + +## Throughput and repeatability + +The table reports median requests/second across all five runs. + +| Scenario | Supplied 0.33.7 | Rebuilt 0.33.7 | Final 0.33.8 | nginx | +|---|---:|---:|---:|---:| +| Proxy, 1,040 B | 27,341.75 | 25,350.63 | 29,334.12 | 170,610.16 | +| Proxy, 64 KiB | 20,485.54 | 20,246.28 | 20,735.07 | 35,393.29 | +| Proxy, 1 MiB | 4,428.31 | 4,588.06 | 4,461.19 | 2,730.23 | +| WWW, 1,040 B | 22,535.57 | 22,558.35 | 24,906.20 | 351,605.13 | +| WWW, 64 KiB | 3,960.03 | 3,990.22 | 20,856.67 | 203,709.91 | +| WWW, 1 MiB | 272.40 | 279.80 | 2,833.71 | 12,611.49 | + +Gains use `100 × (median final / median reference − 1)`. nginx attainment uses +`100 × median final / median nginx`. [B1, B2] + +| Scenario | Gain vs rebuilt | Gain vs supplied | nginx attainment | Paired gain range vs rebuilt | +|---|---:|---:|---:|---:| +| Proxy, 1,040 B | +15.71% | +7.29% | 17.19% | +6.40% to +17.52% | +| Proxy, 64 KiB | +2.41% | +1.22% | 58.58% | −4.54% to +14.40% | +| Proxy, 1 MiB | **−2.77%** | +0.74% | 163.40% | −2.77% to +5.48% | +| WWW, 1,040 B | +10.41% | +10.52% | 7.08% | +1.73% to +23.63% | +| WWW, 64 KiB | +422.70% | +426.68% | 10.24% | +385.45% to +477.68% | +| WWW, 1 MiB | +912.75% | +940.29% | 22.47% | +818.88% to +991.33% | + +The five final/rebuilt ratios, in scheduled repetition order, are: + +| Scenario | Rep 1 | Rep 2 | Rep 3 | Rep 4 | Rep 5 | +|---|---:|---:|---:|---:|---:| +| Proxy, 1,040 B | 1.0679 | 1.0767 | 1.0640 | 1.1752 | 1.0747 | +| Proxy, 64 KiB | 1.0160 | 0.9546 | 1.0789 | 1.0707 | 1.1440 | +| Proxy, 1 MiB | 0.9723 | 0.9770 | 0.9868 | 1.0548 | 0.9883 | +| WWW, 1,040 B | 1.0173 | 1.0210 | 1.0893 | 1.1092 | 1.2363 | +| WWW, 64 KiB | 5.3555 | 4.8545 | 5.7768 | 5.3480 | 5.2270 | +| WWW, 1 MiB | 10.2897 | 10.5518 | 9.1888 | 10.9133 | 9.2866 | + +Five pairs support the large WWW effect's direction and magnitude, but do not +provide a production confidence interval. Proxy 64 KiB has a small headline +improvement with one negative pair. Proxy 1 MiB is slower in four pairs, so the +modest regression remains explicit. For proxy-small, the paired median gain is +7.47%, different from the 15.71% ratio of variant medians; both statistics are +available. Its supplied comparison also contains one negative pair. Do not +average these scenario percentages into a universal speedup. [B2] + +## Latency, CPU and resources + +Values below are medians of per-run measurements; latency percentiles are not +pooled. Frontend CPU includes its threads and background work. [B2] + +| Scenario | p95 ms, rebuilt → final | p99 ms, rebuilt → final | CPU µs/request, rebuilt → final | +|---|---:|---:|---:| +| Proxy, 1,040 B | 4.093 → 3.591 | 5.066 → 4.707 | 147.05 → 127.41 | +| Proxy, 64 KiB | 6.188 → 5.921 | 36.594 → 37.245 | 182.66 → 178.44 | +| Proxy, 1 MiB | 29.206 → 30.222 | 49.315 → 50.747 | 861.28 → 885.37 | +| WWW, 1,040 B | 4.956 → 4.432 | 6.038 → 5.432 | 155.68 → 140.05 | +| WWW, 64 KiB | 27.929 → 5.217 | 35.301 → 6.393 | 657.26 → 171.85 | +| WWW, 1 MiB | 291.222 → 31.234 | 318.346 → 35.295 | 8,388.17 → 1,219.50 | + +WWW 64-KiB/1-MiB CPU cost per request falls 73.85%/85.46%, while p95 falls +81.32%/89.27%. Proxy 1-MiB CPU rises 2.80%, p95 rises 3.48% and p99 rises +2.90%. Proxy 64-KiB p99 also rises 1.78%; improvement is not uniform. [B2] + +| Scenario | Sampled peak RSS MiB, rebuilt → final | Peak FDs, rebuilt → final | +|---|---:|---:| +| Proxy, 1,040 B | 56.965 → 59.137 | 162 → 162 | +| Proxy, 64 KiB | 68.543 → 69.105 | 160 → 157 | +| Proxy, 1 MiB | 81.359 → 83.684 | 153 → 151 | +| WWW, 1,040 B | 77.441 → 77.727 | 124 → 123 | +| WWW, 64 KiB | 79.043 → 102.156 | 145 → 124 | +| WWW, 1 MiB | 78.473 → 118.664 | 145 → 145 | + +Large WWW responses cost **23.113 MiB and 40.191 MiB** additional sampled peak +RSS. Processes persist across scenarios, so this includes allocator/workload +history. The source-derived 7.5-MiB extra reader-capacity example is not total +measured memory cost. Candidate 1-MiB end RSS increases from 114.508 to 118.664 +MiB across five repetitions; these short runs do not prove a plateau. End FDs +remain 17–19 for large WWW, without an accumulating signal here. Peaks are +sampled, not absolute bounds; nginx process RSS can double-count shared pages. +[B2, B3] + +Only one cgroup throttle event occurs: 7,839 µs during nginx proxy-small; Rust +intervals record none. The nginx proxy-small origin consumes approximately +1.982 of its two CPUs, plausibly limiting that reference. nginx static 64-KiB +uses 2.573 of three generator CPUs. Rust proxy uses roughly 3.70–3.95 frontend +CPUs, with generator/origin aggregate use below their allocations. These bounds +and the shared kernel limit capacity interpretation. nginx static 64-KiB p95 +is 34.361 ms despite p50 0.215 ms; its corrected closed-loop histogram is not +a generic nginx latency verdict. [B2, B3] + +## Observability under saturation + +History still uses best-effort admission. Median rejected-history entries as a +percentage of wrk completions are shown separately from HTTP failures. [B2] + +| Scenario | Supplied | Rebuilt | Final | Final minus rebuilt, percentage points | +|---|---:|---:|---:|---:| +| Proxy, 1,040 B | 3.350984% | 3.325181% | 1.290544% | −2.034637 | +| Proxy, 64 KiB | 2.231502% | 2.203964% | 0.780042% | −1.423922 | +| Proxy, 1 MiB | 0.763138% | 0.765001% | 0.221602% | −0.543399 | +| WWW, 1,040 B | 3.908337% | 3.851348% | 1.504784% | −2.346564 | +| WWW, 64 KiB | 0.707405% | 0.700592% | 1.230427% | **+0.529835** | +| WWW, 1 MiB | 0.114600% | 0.120948% | 0.165351% | **+0.044403** | + +For WWW 64 KiB, every final fraction exceeds its paired baseline at 5.23-times +throughput. For 1 MiB, four fractions increase at 10.13-times throughput. These +are saturation comparisons, not fixed-arrival-rate experiments. The increases +must remain visible; this release does not guarantee zero history rejection. +History rejection does not itself reject live broadcast or external sinks. [B2, +F1] + +Analytics queue drops are zero in all Rust samples. Sink, error-file and +cold-cache queue drops are also zero, with those paths disabled in this primary +configuration; this does not prove their active throughput. Asynchronous +recorded analytics counts differ from wrk completions. Status/traffic snapshots +bracket load, postflight and possible in-flight work, making rate denominators +approximate. Raw counters, every repetition and aggregate weighted fractions are +retained; they are not presented as exact loss probabilities. [B1, B2] + +## Functional verification and inherited defects + +| Verification layer | Final result | Evidence | +|---|---|---| +| Rust suites | **706 passed**, zero failed, one optional ID timing microbenchmark ignored | F1 | +| Actual HTTP process regression | **152/152 cases passed** | F2 | +| Actual TLS/H2/H3/QUIC and H1 WebSocket tests | **111/111 assertions passed** | F3 | +| Two-origin LB behaviour | **17/17 cases passed** | F2 | +| Finite concurrency | **18 cases, 1,920 exact responses**, zero failures | F2 | +| Separate syscall experiment | **1,042 exact response checks** | P1 | + +The suites protect cache OFF/ON, privacy, Vary/scheme separation, purge barriers, +range/conditional/HEAD, compression/transforms, ACL/SSRF policy, administration +session/CSRF, streaming uploads, cancellation, non-replayed writes and leases +through EOF. History tests check exact fields, eviction accounting and real +file/live delivery during forced contention. SQL and disposable stopped-source +upgrade checks pass; UI checks remain simulated API tests. PHP coverage uses a +deterministic FastCGI peer, not a deployed PHP-FPM application. [F1–F4] + +Both original executables reproduced three live WWW failures: +`observability.static_complete_after_content_length`, `cache.static_hit` and +`cache.static_empty_hit`. All three pass on the final binary; the final expanded +original matrix retained 149 passes and those three failures. Precise local EOF +and initially empty-body handling restore complete-response accounting and cache +publication. Separately, the 22 original Rust failures were audited as six real +production defects, one missing embedded document and fifteen stale/incomplete +fixtures. Corrections retain privacy and invalidation guarantees. [F2, F4] + +The syscall experiment traced 500 measured static 64-KiB requests per binary, +plus warm-up/post-detach checks. Selected calls decreased from 60,374 to 7,502 +(87.57%); `read` decreased from 8,135 to 501. All 1,042 responses were exact, +and both traced processes detached and stopped cleanly. This supports a reduction +in observed system-call work; it is not an 87.57% throughput gain, allocation +profile or per-edit attribution. [P1] + +## Completed 30-minute mixed-traffic soak + +The final executable completed **1,800.000810 seconds** of paced HTTP/1.1 +proxy/static traffic at an offered 100 requests/s. All **180,000 workload +operations passed**, with zero response errors and zero scheduler-lateness +events. This includes **1,782 intentional client closes after 128 bytes**; +the remaining **178,218 operations** checked the complete expected response +body and status, including HEAD and ranges. A controlled close does not prove +that the server had not already sent the rest of the body. Every operation used +a new frontend TCP connection; this is not a long-lived keep-alive soak. [F5] + +All **14 cache toggles** passed **32 source/mode checks comprising 64 additional +GETs**, covering real HIT behaviour after enabling and bypass after disabling. +The fixture restored its base configuration, completed a 15-second cooldown, +and verified **backend active exchanges = 0**. All four recorded server/origin +processes and the disposable fixture directory were absent after teardown. +The final binary hash remained unchanged. [F5] + +| Observation | Final soak result | +|---|---| +| Analytics queue rejects | **0**; recorded-request delta **180,060**, including post-baseline cache probes and cooldown | +| History admission rejects | **31 observed**, from counter 0 at 0.001 s to 31 at 1,798.842 s; this counter was not resampled after cooldown | +| Upstream pool recycling | **1 observed rotation**; the normal bounded recycling policy remained active | +| Sampled RSS peak | **60.641 MiB** | +| RSS median, first minute after warm-up to final sampled minute | **52.273 → 60.016 MiB**, a **7.742 MiB increase** | +| Open file descriptors | **20 at start, 23 sampled peak, 18 after cooldown** | + +The final sampled minute includes the cooldown. RSS growth and the descriptive +linear fit of approximately 16.165 MiB/hour are observations over this short, +cache-toggling run, not an extrapolation or a diagnosis of a leak. This test +**does not establish a memory plateau**. There was no accumulating FD signal, +but low-rate correctness and resource observations do not establish stability +at the much higher saturation rates in the primary benchmark. There is no +matched baseline soak from which to attribute this RSS change to the patch. +The RSS/FD samples, both telemetry series and the independent interpretation +are retained. No 24-hour, TLS/H2/H3 or production-traffic soak was executed. [F5] + +## Reproduction and deployment boundary + +Use project entry points with the private umask they establish: + +```bash +./dev.sh check +CARGO_INCREMENTAL=0 ./dev.sh test +./dev.sh release +``` + +Set the executable/tool variables to reviewed absolute paths and use a fresh +results directory. Build the untouched baseline with the same toolchain/lock +before comparing it with the candidate: + +```bash +python3 -B scripts/performance/benchmark.py \ + --binary "supplied=$SUPPLIED_BINARY" --binary "before=$REBUILT_BASELINE" \ + --binary "after=$CANDIDATE_BINARY" --nginx "$NGINX_BINARY" --wrk "$WRK_BINARY" \ + --out "$RESULTS_DIR" --workers 4 --origin-workers 2 \ + --server-cpus 0-3 --origin-cpus 4-5 --client-cpus 6-8 --client-threads 4 \ + --concurrency 64 --modes proxy,static --sizes small,large,huge \ + --repeats 5 --duration 15 --warmup 3 +``` + +See `scripts/performance/README.md` for dependencies and separate regression, +transport, profile and soak commands. The offline analyzer refuses incomplete +or unsealed data. Its outputs include `comparisons.csv`, `paired-ratios.csv`, +`variants.csv`, `observability.csv` and `observability-paired.csv`. [B2] + +Remaining acceptance includes remote-network latency/loss, actual PHP-FPM, +Tinyauth and DNS infrastructure, H2/H3 WebSocket tunnels, deployment-specific +24-hour testing and staged rollout. No production deployment or service-manager +rollback was executed. The detailed script-specific upgrade/rollback review is +`verification/release-scope-and-rollback.txt`: current `update.sh` retains two +installed releases and three pre-update backups, conflicting with the older +installation document's no-pruning statement. Keep an independent recovery copy +outside automatic retention and restore matching code/state when needed. [S1] + +## Evidence index + +| ID | Workspace-relative evidence | +|---|---| +| B1 | `verification/benchmark-primary/`: `runs.json`, `schedule.json`, `environment.json`, `completion.json`, fixture configurations, raw responses/resources/telemetry and `SHA256SUMS` | +| B2 | `verification/analysis/benchmark-primary/analysis.json`, companion CSV/text files, and `verification/analysis/primary-review.txt` | +| B3 | `verification/static-primary-resource-review.txt` and `verification/primary-teardown-audit.json` | +| F1 | `verification/build/final-tests-summary.json`, `dev-test-final.log`; source `docs/TEST_REPORT.md` | +| F2 | `verification/finalrelease-summary.json`; `http-release/`, `lb-release/`, `concurrency-release/` reports beneath `verification/` | +| F3 | `verification/transport-release/release/report.json`; `verification/static-compatibility-audit.txt` | +| F4 | `verification/baseline-failure-audit.txt`; `verification/source_checks/results.json` | +| F5 | `verification/soak-release/`; `verification/soak-release-review.json` and `.txt`; `verification/soak-process-teardown.json` | +| P1 | `verification/syscalls-release/` and `verification/syscalls-release-analysis.txt` | +| S1 | `verification/release-scope-and-rollback.txt`; supplied `AGENT_PERFORMANCE_EXECUTION_PLAN.md`; implementation references listed in that review | diff --git a/docs/TEST_REPORT.md b/docs/TEST_REPORT.md index e69de29..dc6d564 100644 --- a/docs/TEST_REPORT.md +++ b/docs/TEST_REPORT.md @@ -0,0 +1,115 @@ +# RustProxy 0.33.8 verification report + +This report accompanies the performance and compatibility work on the supplied +0.33.7 source archive and executable. All measurements use disposable local +state. Production data, certificates, configuration and installed services are +not modified. Raw results and exact binary hashes are supplied in the separate +verification archive. The live runners are in `scripts/performance/`. + +## Scope and acceptance + +The target is reduced work per uncached reverse-proxy request and per local +static-file response while retaining routing, security, cache policy, streaming, +observability and administrative functionality. The LB panel, database schema, +default TLS policy, cache defaults and bounded connection recycling are unchanged. +The performance comparison requires the same compiler, locked dependencies, +release profile, CPU allocation, payloads and client configuration for the +unmodified source and the candidate. The supplied executable is also retained as +an independent compatibility baseline. + +Acceptance has separate layers: compilation and Rust tests; source/SQL/upgrade +checks; actual HTTP process tests; actual TLS/H2/H3/WebSocket tests; repeated +before/after/nginx throughput measurements; and a bounded mixed-traffic soak. +A passing source assertion or simulated DOM check is not a live runtime result. +Passing this matrix is not a claim that every possible deployment is covered. + +## Baseline findings + +The first candidate Rust run completed 658 tests successfully, with 22 failures +and one explicitly ignored formatting microbenchmark. An unmodified-source run +reproduces the old failures; the audit records each stale fixture and each actual +defect separately. The raw initial failed runs remain in the evidence archive. +Tests that expected obsolete behavior are corrected to exercise the currently +documented contract; security, cache invalidation and transport guarantees are +not weakened to obtain a passing result. + +The initial live HTTP matrix gave identical results for the supplied executable +and rebuilt 0.33.7: 145 passes, three failures and one skipped optional Brotli +decoder case. All three failures concerned local HTTP/1 file-body completion: +normal responses were recorded as cancelled, and full or empty files failed to +publish a cache entry. The candidate uses a bounded local-file body with accurate +end-of-stream reporting. Arbitrary upstream bodies retain their original trailer +and end-of-stream handling. + +The supplied executable passed 111 actual transport assertions covering verified +TLS, H2, H3/QUIC, stream multiplexing, uploads, cache behavior, ranges, validators +and HTTP/1 WebSocket data/control frames. The same runner is used for the final +candidate. The H3 client adapter accounts for HEAD semantics without disabling +GET body-length validation. + +## Compatibility checks + +The Rust suites exercise cache privacy, Vary and scheme separation, publication +generation barriers, stale access rules, disk tiers, header policies, ACL and +SSRF decision paths, timeout and permit lifetime, actual codecs, filesystem +bounds, symlink policies, range/conditional handling, SQL-backed administration, +TLS configuration, loopback upstream H1/H2 and raw H2 listener behavior. Stream +tests include real TCP/UDP peers. PHP tests use a deterministic FastCGI protocol +peer rather than an installed PHP-FPM application. + +The HTTP process runner checks exact response bytes and hashes, streaming before +the final upload chunk, non-replayable POST failures, client cancellation, +configuration reloads, scoped headers and security policy, administration +session/CSRF, cache OFF/ON and privacy behavior, compression and transformations. +The transport runner uses actual local TLS and QUIC connections and trusts the +fixture certificate explicitly. + +History-specific tests retain exact log fields, bounded chronological retention, +drop accounting and delivery to live subscribers and configured sinks during +forced history-lock contention. Cloning and destruction of evicted entries occur +outside the history mutex. This preserves the existing best-effort policy; +saturation measurements must still disclose actual history drops. + +SQL checks apply all ten migrations twice, exercise named dashboard presets and +account isolation, and verify the 16-preset bound and cascade behavior. The source +upgrade test uses disposable installations to check the stopped-process guard, +held lock rejection, data/configuration preservation, managed source replacement, +backup creation and symlink rejection. Existing JavaScript checks retain their +status as simulated UI checks; no browser acceptance is inferred from them. + +## Reproduction + +Use the project entry points, which set the private process umask required by +key-store and certificate fixtures: + +```bash +./dev.sh check +CARGO_INCREMENTAL=0 ./dev.sh test +python3 scripts/tests/dashboard_presets_sql_test.py +python3 scripts/tests/upgrade_performance_test.py +``` + +The isolated validation environment uses Rust 1.99.1 with the original locked +dependency versions, nginx 1.26.3 and wrk 4.2.0. See +`scripts/performance/README.md` for live regression, transport, profiling, +benchmark and soak commands. Supply explicit executable paths and new output +directories; preserve failed runs as evidence. + +## Measurement boundaries + +Throughput measurements use HTTP/1.1 keep-alive, cache OFF, identity encoding, +1040-byte, 64-KiB and 1-MiB objects, separate server/origin/client CPU sets, +interleaved variants and excluded warm-up. Resource samples retain CPU time, +RSS, file descriptors, generator errors and application drop counters. Medians +use all scheduled repetitions. Closed-loop wrk latency is not an open-loop SLA. +Syscall profiles are collected separately from timed throughput runs. + +Remaining deployment-specific checks include a 24-hour production-like soak, +remote-network latency and loss, actual PHP-FPM applications, external Tinyauth, +DNS rebinding against a real resolver, and HTTP/2 or HTTP/3 WebSocket tunnels. +The measured same-host comparison does not establish internet-facing capacity. + +Final executable-specific outcomes, run counts, percentages and resource costs +are recorded in the separately generated performance/evidence report after the +release build. This embedded document describes the test contract and baseline; +it does not substitute planned work for a completed measurement. diff --git a/rust-proxy b/rust-proxy new file mode 100755 index 0000000..7260d84 Binary files /dev/null and b/rust-proxy differ diff --git a/scripts/performance/README.md b/scripts/performance/README.md new file mode 100644 index 0000000..17b62a1 --- /dev/null +++ b/scripts/performance/README.md @@ -0,0 +1,276 @@ +# Live performance and regression harness + +These scripts exercise actual RustProxy executables through loopback sockets. +They do not simulate Rust request handling. The Python server in `peer.py` is a +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. + +## Requirements + +- Linux with readable `/proc`, Python 3.10+, executable RustProxy binaries. +- nginx and wrk for performance comparisons. Both paths are explicit; no + system-wide installation is required. +- `taskset` from util-linux for the benchmark's explicit CPU affinity and for + optional affinity settings in the other scripts. +- Optional Python `brotli` and `zstandard` decoders increase compression + acceptance coverage. A missing optional decoder is reported as **skipped**. +- Permission to bind unprivileged loopback sockets and start local processes. + In a sandbox without sockets or `/proc`, run in the approved local execution + environment. Do not replace real runtime results with a peer self-test. + +Each run creates a new private temporary data directory and initializes its own +administrator with a random password supplied only over stdin. Configurations +are applied through RustProxy's existing authenticated CLI/API and listener +changes receive a restart. No historical SQLite database is copied or edited. +TLS keys, databases and passwords are never written to the evidence directory. +Temporary state is outside the evidence tree and is removed on normal exit. +`fixture-cleanup.json` records the cleanup check. Interrupted runs can leave an +unrelated `/tmp/rustproxy-perf-*` directory; do not include it in a release. + +Before timed benchmark, soak or syscall-profile work, `wait_quiescent()` waits +for the existing authenticated ACME runtime API to report `ready` or +`unavailable`. A fresh RustProxy data directory can start a Python/Certbot +environment bootstrap even when no certificates have an issuer. The gate +requires no configured issuers, jobs or renewal observations, the same live Rust +PID and start time, and no child processes for five continuous seconds. It polls +every 0.5 seconds and fails after 180 seconds instead of measuring installation +work. Selected status, process count and timing evidence is saved in +`