@@ -123,13 +123,12 @@ messages from clients.
1231232 . River MUST support a configurable timeouts for:
124124 1 . Connections
125125 2 . Requests
126+ 3 . Successful health checks
1261273 . River MUST support pooling of connections, including:
127128 1 . Reuse of TCP sessions for all HTTP versions
128129 2 . Reuse of HTTP2.0 streams for HTTP2.0
1291304 . River MUST support health checks of upstream servers
130- 1 . ** TODO: “Configurable TTL override & cache drop upon health check failure for backends'
131- hostnames in DNS. (i.e. allow lower TTLs than the DNS standard; re-resolve DNS if health
132- checks fail)”**
131+ 5 . River MUST support the disabling of use of an upstream server based on failed health checks
1331325 . River MUST support load balancing of upstream servers
1341336 . River MUST support sending information for protocols used for pre-proxying, including:
135134 1 . v1 and v2 of the PROXY protocol
@@ -173,9 +172,8 @@ application.
173172 given service
1741733 . River MUST support the use of SRV records to provide a list of upstream servers for a given
175174 service
176- 4 . ** TODO: xDS?**
177- 5 . River MUST have a configurable timeout for re-polling poll-based service discovery mechanisms
178- 6 . River MUST support the use of DNS TTL as timeout value for re-polling poll-based service
175+ 4 . River MUST have a configurable timeout for re-polling poll-based service discovery mechanisms
176+ 5 . River MUST support the use of DNS TTL as timeout value for re-polling poll-based service
179177 discovery mechanisms
180178
181179### 2.4 - Request Path Control
@@ -217,18 +215,18 @@ direction between downstream client and upstream server
217215 7 . Response Body (partial response fragments)
2182162 . River MUST support rejecting a connection by returning an error response
2192173 . River MUST support CIDR/API range-based filtering allow and deny lists
220- 4 . River MUST support rate limiting of requests or response on the basis of one or more of the
221- following:
222- 1 . TODO
223- 5 . River MUST support removal of HTTP headers on a glob or regex matching basis
224- 6 . River MUST support addition of fixed HTTP headers to a request
225- 7 . TODO: Do we need some kind of metadata/template/context based content matching or filling?
226- 8 . TODO: Normalization of headers/bodies?
227- 1 . EX: URL/URI normalization using browser rules
228- 2 . Some kind of OWASP list for this?
229- 9 . TODO: Support External Authentication Requests?
230- * Make subrequest to auth provider - NGINX (free module, maybe 3rd party? - need the name)
231- * < https://nginx.org/en/docs/http/ngx_http_auth_request_module.html >
218+ 4 . River MUST support rate limiting of requests or responses on the basis of one or
219+ more of the following:
220+ 1 . A fixed rate per second
221+ 2 . A "burst" rate - allowing for short increases above the fixed rate
222+ 5 . River MUST support application of rate limiting of requests or responses on the per-endpoint
223+ basis.
224+ 6 . River MUST support removal of HTTP headers on a glob or regex matching basis
225+ 7 . River MUST support addition of fixed HTTP headers to a request
226+ 8 . River MUST support the normalization of request and response headers and bodies, including:
227+ 1 . URI normalization
228+ 2 . Text encoding
229+
232230
233231### 2.5 - Observability
234232
@@ -311,3 +309,81 @@ without user interaction.
311309 2 . The number of days until the certificate will expired
3123106 . The application MUST support API Version 2 of the ACME protocol
3133117 . The application MAY support API Version 1 of the ACME protocol
312+
313+ ## 3 - Development Practices
314+
315+ The following are development practice requirements for initial implementers of River.
316+
317+ ### 3.1 - Documentation Practices
318+
319+ These requirements relate to the technical documentation of River.
320+
321+ 1 . The implementers MUST maintain complete developer-facing documentation, or "doc comments"
322+ 1 . This MAY be achieved using the ` #![deny(missing_docs)] ` directive or similar flags in CI
323+ testing
324+ 2 . The implementers MUST maintain a separate user-facing documentation, describing usage,
325+ configuration, installation, and other details and examples.
326+ 1 . This MAY be achieved using a tool such as ` mdBook ` , creating a user facing "Book" for River
327+ 3 . The implementers MUST automatically publish the developer- and user- facing documentation for
328+ all released versions
329+ 4 . The implementers MUST automatically publish the developer- and user- facing documentation for
330+ the main development branch
331+ 1 . This MAY be on a per-pull request basis, or on a scheduled basis e.g. once per day.
332+ 5 . The implementers MUST document how to build developer- and user- facing documentation
333+
334+ ### 3.2 - Benchmarking Practices
335+
336+ These requirements relate to the performance benchmarking of River. No specific performance
337+ metrics are required or specified here, instead weight is placed on measurements over time, allowing
338+ improvements or regressions to be visible and measurable throughout the development process.
339+
340+ 1 . The implementers MUST maintain a test suite of performance tests, expected to exercise:
341+ 1 . Typical Use Cases
342+ 2 . Unusual or "Worst Case" use cases
343+ 3 . Use cases previously reported as performance regressions
344+ 2 . The implementers MUST run and record the results of performance tests on a regular basis, such
345+ as on every pull request, or on a scheduled daily/weekly basis.
346+ 3 . The performance tests MUST track the following metrics:
347+ 1 . Peak and Average CPU usage during test execution
348+ 2 . Peak and Average Memory usage during test execution
349+ 3 . CPU and Wall Clock time of test execution
350+ 4 . The performance tests MAY track the following "perf counter" metrics:
351+ 1 . Branch prediction failures
352+ 2 . Page faults
353+ 3 . Cache Misses
354+ 4 . Context Switches
355+ 5 . The implementers MUST document how to build and execute performance tests
356+ 6 . The implementers MAY provide a suite of comparison tests, executing a subset of performance tests
357+ against contemporary reverse proxy applications, such as NGINX or Apache.
358+
359+ ### 3.3 - Continuous Integration Practices
360+
361+ These requirements document tooling practices expected for the development of River.
362+
363+ 1 . The implementers MUST provide a set of automated checks that are required to pass prior to merges
364+ to the main development branch. These automated checks MAY include:
365+ 1 . Code Formatting checks, e.g. ` cargo fmt `
366+ 2 . Code linting checks, e.g. ` cargo clippy `
367+ 3 . Unit test execution, e.g. ` cargo test `
368+ 4 . Documentation build steps (for user- and developer- facing documentation)
369+ 5 . Integration test execution
370+ 5 . Performance test execution
371+ 2 . The implementers MUST provide a set of automated checks that are required to run on a periodic
372+ basis. These automated checks MAY include:
373+ 1 . Building against the latest stable, beta, or nightly versions of the Rust compiler and
374+ toolchain
375+ 2 . Performance test execution
376+ 3 . Documentation build steps
377+ 4 . Documentation publishing steps
378+ 2 . The implementers MUST provide and document the process for running all automated checks locally,
379+ in order to allow contributors to perform these checks prior to submitting a Pull Request.
380+
381+ ### 3.4 - Contribution Practices
382+
383+ 1 . The implementers MUST provide and enforce a Code of Conduct for contribution
384+ 1 . The implementors MAY use the [ Contributor Covenant] to achieve this goal
385+ 2 . The implementers MUST provide and maintain a Contribution guide for third party contributions
386+ 3 . The implementers MUST provide and maintain a security policy, to allow for private disclosure
387+ of vulnerabilities
388+
389+ [ Contributor Covenant ] : https://www.contributor-covenant.org/version/1/3/0/code-of-conduct/
0 commit comments