Repository navigation
Conversation
Motivation: High-cardinality outbound values can displace useful dynamic HPACK table entries. Applications need an opt-in compression policy. Modification: Add role-specific configured names and an optional typed Scala/Java policy. Use ordinary settings fields, independent of internalSettings; preserve the released JVM constructors and copy descriptors. Keep the Latin-1 guard, exact index reuse, and never-index behavior. Rebase on current main and keep both imports required by the HTTP/2 server spec. Result: Unconfigured applications keep their existing behavior. A configured policy can decline eligible new entries without changing index reuse. Tests: JDK 17 on Scala 2.13.18 and 3.3.9: 14 focused ordinary settings, HPACK, and client/server tests per axis and a released 2.0.0 Scala copy caller. Scoped settings MiMa and Scala formatting passed. References: Netty #18501, RFC 7541 Section 6.2.2; related apache#981 and apache#1589.
He-Pin
force-pushed
the
feat/http2-opt-in-server-push
branch
2 times, most recently
from
November 27, 2026 23:29
7d8be21 to
f359a4e
Compare
He-Pin
force-pushed
the
feat/http2-opt-in-server-push
branch
from
November 27, 2026 23:47
f359a4e to
0c7b022
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Applications with a ready companion representation can offer it on the same HTTP/2 connection without changing behavior for applications that leave the feature off or peers that disallow push.
Modification
pekko.http.server.http2.server-push-enabledand typed Scala and Java plan factories.200 OKcompanion representation at a rooted URI on the original origin. No request fields other than the origin are inherited.Result
Server push is best effort. Offers are not queued; if a push does not start, the primary response takes its ordinary path. The API does not acknowledge delivery. No change to HTTP/1.1 fallback, HTTP/1.1 upgrade behavior, clients or the minimum Pekko Core version.
Tests
On JDK 17, Scala 2.13.18 and 3.3.9 each passed four named cases in one process: the producer/codec fixture first, then the three native cases (default off, Scala opt-in, Java opt-in). The producer fixture observes standard header values without replacing shared cached values and tracks reuse only for its custom header. This addresses the test isolation issue found by the broader CI run. A subsequent CI run found an abstract Scala settings getter was binary-incompatible. The getter now has a concrete default of false; the actual settings implementation still returns the configured value.
On the latest head both Scala axes passed the two focused settings tests. Scoped MiMa 1.2.1 backward checks of the Scala and Java settings API against Pekko HTTP 2.0.0 report zero problems on both axes, without any new filter. Earlier focused runs passed a named Java Jupiter case on each axis. The local tests use an in-memory typed native boundary, not sockets, a real TLS/ALPN handshake or an external peer. The GitHub test matrix still needs to pass on the updated head; full MiMa and the docs build were not run locally.
References
Stacked on #1556, which supplies the shared outbound HPACK policy. The proposed head includes a patch-equivalent replay of that PR onto Apache main, followed by one Server Push commit. It does not modify the original #1556 branch; the Apache-main comparison includes the parent patch until #1556 is merged.
Child-only diff: Server Push changes only
Keep this PR in Draft and do not merge it until #1556 has merged and this change is rebased on Apache main. Independent review and the required checks, including binary compatibility, must pass on that head.
RFC 9113 §6.5.2, §6.6 and §8.4.