Kreinoee opened a new pull request, #1317:
URL: https://github.com/apache/pekko-http/pull/1317
### Motivation
Backport of #1316 to the 1.4.x line, so that the setting is usable before
2.0.0 ships.
See that PR for the full motivation: a `max-connection-age` for HTTP/2
server connections, the
server-side counterpart of grpc-java's `maxConnectionAge`
(akka/akka-grpc#967 is the corresponding
request on the Akka side).
### Modification
Cherry-pick of the single commit on #1316, with the branch-specific
adaptations:
- `@since` tags say `1.4.1` (this line) instead of `2.0.0` (main), following
the precedent of
max-header-list-size (#1247).
- The MiMa filter file lives in `1.4.x.backwards.excludes`.
- `getMaxConnectionAge` converts the possibly-infinite Scala duration inline
(`ChronoUnit.FOREVER.getDuration` for infinite), because
`JavaDurationConverter` does not exist on
this branch.
### Result
Same as #1316: operators can cap the lifetime of server-side HTTP/2
connections to
rebalance long-lived connections across server instances. Behavior is
unchanged by default.
Verified against a real grpc-java (1.75.0) client, same setup as on #1316
but built from
this branch: with `max-connection-age = 5s`, a client issuing a unary call
every 200 ms for 16 s
observed 0 failures across the connection retirements (the server saw 3
distinct client
connections), and a unary call that was in flight when the GOAWAY was sent
completed normally on the
connection being drained.
### Tests
- `sbt "http2-tests/test"`: pass, including the 2 new directional tests for
max-connection-age in
`Http2ServerSpec`
- `PR_TARGET_BRANCH=origin/1.4.x sbt validatePullRequest`: all tasks pass
except `docs/Compile/paradox`,
which fails in this environment on a clean checkout of `1.4.x` too (see
the docs/paradox note below)
- `sbt "+http-core/mimaReportBinaryIssues"`: clean
- `sbt scalafmtCheckAll scalafmtSbtCheck`: clean
- `sbt docs/paradox`: environment failure unrelated to this change (fails
identically on a clean
checkout of `1.4.x` with `Error creating extended parser class ...
org.pegdown.ParserWithDirectives`)
- manual end-to-end check against grpc-java 1.75.0 (see Result)
### References
Backport of #1316. Refs akka/akka-grpc#967.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]