The GitHub Actions job "Validate and test" on 
pekko-http.git/http2-server-max-connection-age-1.4.x has failed.
Run started by GitHub user Kreinoee (triggered by Kreinoee).

Head commit for run:
b071f22b9077fb6da9583ad092eebf2ea01efa32 / Anders Kreinøe <[email protected]>
feat: add max-connection-age setting for HTTP/2 server connections

Motivation:
Long-lived HTTP/2 connections (as used by gRPC) lead to an uneven load
distribution across server instances: clients stay connected to the
instances they found at connect time, and instances added later (after
a scale-out or a rolling deploy) receive no share of the existing
traffic. The server is the side that can retire a connection
gracefully, via GOAWAY. grpc-java offers this as maxConnectionAge;
pekko-http has no equivalent (akka/akka-grpc#967 is the corresponding
request on the Akka side).

Modification:
Backport to 1.4.x of the main-branch change adding a
`pekko.http.server.http2.max-connection-age` setting, default
`infinite` (disabled). When a server connection reaches the configured
age, the existing graceful termination path is triggered:
GOAWAY(NO_ERROR) is sent, streams that are in flight complete normally,
streams opened after the GOAWAY are refused with
RST_STREAM(REFUSED_STREAM), and the connection is closed once no
streams remain. The age is jittered per connection by a configurable
fraction, `max-connection-age-jitter` (default 0.1 = +/- 10%, the value
grpc-java applies; 0 disables jitter), so that connections that were
opened together are not all closed at the same time.
`triggerTermination` now accepts an infinite deadline, in which case no
forced-close timer is scheduled. Also corrects the termination debug
log, which printed the timer key instead of the deadline.

Branch adaptations relative to main: `@since` tags say 1.4.1, the MiMa
filter file lives in 1.4.x.backwards.excludes, and getMaxConnectionAge
converts the possibly-infinite duration inline because
JavaDurationConverter does not exist on this branch.

Result:
Operators can cap the lifetime of server-side HTTP/2 connections to
rebalance long-lived connections across server instances. Behavior is
unchanged by default.

Tests:
- sbt "http2-tests/test": 344 tests pass, including 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 identically on a clean
  checkout of 1.4.x in this environment (pegdown/parboiled parser
  bootstrap error) - environment issue, not caused by this change
- sbt "+http-core/mimaReportBinaryIssues": clean, with 5 new
  ReversedMissingMethodProblem filters for the added methods
- sbt scalafmtCheckAll scalafmtSbtCheck: clean
- sbt headerCreateAll: no changes
- manual end-to-end check against grpc-java 1.75.0, built from this
  branch: with max-connection-age = 5s, a client calling every 200 ms
  for 16 s saw 0 failures across the connection retirements, and a
  unary call that was in flight when the GOAWAY was sent completed
  normally

References:
Refs akka/akka-grpc#967 - equivalent request against akka-http/akka-grpc.
1.4.x companion of the main-branch pull request adding the same setting.

Report URL: https://github.com/apache/pekko-http/actions/runs/36037327476

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to