Skip to content

chore: Use shared port with gRPC for HTTP (stacked) - #2038

Merged
JamieSinn merged 1 commit into
http-get-all-flagsfrom
http-get-all-flags-shared-mux
Aug 28, 2026
Merged

JamieSinn merged 1 commit into
http-get-all-flagsfrom
http-get-all-flags-shared-mux

Conversation

@JamieSinn

Copy link
Copy Markdown
Member

@erka this is the diff for sharing the gRPC setup. Thoughts?

Signed-off-by: Jamie Sinn <[email protected]>
@JamieSinn
JamieSinn requested review from a team as code owners August 28, 2026 14:51
@JamieSinn
JamieSinn requested a review from erka August 28, 2026 14:51
@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Aug 28, 2026
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6eb86506-2cc1-45c7-8169-b8030971fdd4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@JamieSinn JamieSinn changed the title Use shared port with gRPC chore: Use shared port with gRPC for HTTP (stacked) Aug 28, 2026
@sonarqubecloud

Copy link
Copy Markdown

Comment on lines +154 to +159
// Split on the HTTP/2 preface. Both content-type matchers are
// unusable here: the SendSettings one writes a SETTINGS frame while probing and corrupts
// non-gRPC h2 connections, and the read-only one waits for HEADERS that grpc-go will not
// send until it has read a SETTINGS frame, deadlocking every gRPC client.
svc.grpcListener = svc.mux.Match(cmux.HTTP2())
svc.httpListener = svc.mux.Match(cmux.Any())

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@erka this was the largest specific change for this. We now have to do special handling to allow http2 to properly terminate at the right endpoint. Not sure I'm in love with this; especially because it's an added layer of complexity.

@JamieSinn
JamieSinn requested a review from toddbaert August 28, 2026 18:17
@JamieSinn
JamieSinn merged commit 3e100f8 into http-get-all-flags Aug 28, 2026
6 of 7 checks passed
@JamieSinn
JamieSinn deleted the http-get-all-flags-shared-mux branch August 28, 2026 19:01
JamieSinn added a commit that referenced this pull request Aug 30, 2026
@erka this is the diff for sharing the gRPC setup. Thoughts?

Signed-off-by: Jamie Sinn <[email protected]>
JamieSinn added a commit that referenced this pull request Aug 31, 2026
@erka this is the diff for sharing the gRPC setup. Thoughts?

Signed-off-by: Jamie Sinn <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant