Repository navigation
Conversation
Workers rebuild config extensions from their Default implementation, so options left at their default do not need to travel in the headers of every task. Adds a config_propagation benchmark.
Raise the localhost workers' HTTP/2 header list limit so the bench can send ~140 KB of config headers per task, and add an all_overrides scenario.
gabotechs
marked this pull request as ready for review
November 19, 2026 17:32
This branch has not been deployed
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.
Every task the coordinator sends to a worker carries all the session's config extensions as gRPC headers, one header per option, even when the option was never changed. With just
DistributedConfigthat is 19 headers (~1.4 KB) per task, and a user extension with a few dozen options easily brings it to tens of KB. That is paid on every task dispatch, and past hyper's default 16 KiB HTTP/2 header list limit the worker rejects the task altogether with an opaqueGoAway COMPRESSION_ERROR.Workers already rebuild each extension starting from its
Defaultimplementation before applying the headers, so an option that still has its default value tells them nothing new. This PR remembers the defaults of every extension registered for propagation and only sends the options that differ from them.One behavioral nuance: if a worker's session builder pre-populates a user extension with non-default values before calling
with_distributed_option_extension_from_headers, a coordinator option explicitly set back to its default no longer overrides the worker's value.It also adds a
config_propagationbench: 32 localhost workers running a 128-task query that returns one row per task, with a user extension holding 32 string options of 4 KiB plus integer, float, boolean and long-named options (~138 KB of headers per task when everything is sent). To letmainsend all of that, the localhost test workers now raise the HTTP/2 header list limit to 1 MiB.defaultsfew_overridesall_overridesall_overridessends practically the same headers asmain, showing that comparing against the defaults costs nothing measurable.