You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by GitBox <gi...@apache.org> on 2026/09/24 18:17:22 UTC

[GH] (pekko-http/http2-server-max-connection-age): Workflow run "Validate and test" is working again!

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

Head commit for run:
686b4879323403555526015d161d8c3c43b17185 / Anders Kreinøe <an...@dixa.com>
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:
Add 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.

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": 376 tests pass, including 2 new directional
  tests for max-connection-age in Http2ServerSpec
- sbt validatePullRequest: passes
- sbt "+http-core/mimaReportBinaryIssues": clean, with 5 new
  ReversedMissingMethodProblem filters for the added methods
- sbt checkCodeStyle: clean; sbt headerCreateAll: no changes
- sbt docs/paradox: builds, remaining warnings pre-existing
- sbt sortImports: environment failure unrelated to this change
  (http/scalafixAll fails with NoSuchMethodError in scala.meta on a
  clean checkout of main too); the files changed here are sort-clean
- manual end-to-end check against grpc-java 1.75.0: with
  max-connection-age = 5s, a client calling every 200 ms for 16 s saw
  0 failures across 3 connection retirements, and a unary call that
  was in flight when the GOAWAY was sent completed normally

References:
None - no pekko-http issue tracks this; akka/akka-grpc#967 is the
equivalent request against akka-http/akka-grpc.

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

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org