rpc: add DRPC stream multiplexing behind an env gate#170248
Open
shubhamdhama wants to merge 4 commits into
Open
rpc: add DRPC stream multiplexing behind an env gate#170248shubhamdhama wants to merge 4 commits into
shubhamdhama wants to merge 4 commits into
Conversation
Adds a small helper that bumps the DRPC replace directive in go.mod to a specific commit. It takes a GitHub commit URL (cockroachdb or shubhamdhama fork), resolves the pseudo-version with `go list`, rewrites the replace line, runs `go mod tidy`, and regenerates the Bazel files via `./dev generate bazel --mirror`. Bumping DRPC was a multi-step ritual; the script removes the chance of forgetting one of the steps. Release note: None Epic: none
Contributor
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
Member
Contributor
Author
|
🚨 Remove
|
Bumps DRPC to pick up stream multiplexing from cockroachdb/drpc#58, where a single transport connection can carry multiple concurrent streams. The multiplexing dial path is guarded by COCKROACH_EXPERIMENTAL_DRPC_MUX_ENABLED, defaulted to false. With the gate off, DialDRPC keeps using drpcpool, which checks out a connection per active stream and dials a new one when none is idle. The upgraded multiplexing-capable library is therefore exercised on every connection, but the multiplexing capability itself stays unused: every stream still ends up on its own underlying connection, matching the prior behavior. This keeps the initial scope small. The dial-mux path is in place so it can be turned on for validation, with a follow-up to flip the default once we are confident. Both paths now share the same dial-option setup, so the mux path also picks up the client metrics and the request-recording gate that the pool path was already attaching. Release note: None Epic: none
b4179ad to
cc1edf7
Compare
Nukitt
approved these changes
May 13, 2026
Contributor
Nukitt
left a comment
There was a problem hiding this comment.
LGTM! approving since you're already tracking the do-not-merge items.
| log.Dev.Infof(ctx, "dialing DRPC mux connection to %s", target) | ||
| return dialDRPCMux(ctx, target, drpcDialOptions) | ||
| } | ||
| log.Dev.Infof(ctx, "dialing DRPC non-mux connection to %s", target) |
Contributor
There was a problem hiding this comment.
Won't this and the one above this make the logs a lot noisier since we'll be logging every dial. Maybe lets have some verbosity flag if thats possible.
Contributor
Author
There was a problem hiding this comment.
Oh yes. I'll remove these. They were better for debugging.
Contributor
Author
|
Multiplexing off |
Contributor
Author
|
Multiplexing disabled Multiplexing enabled |
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.
Bumps DRPC to pick up stream multiplexing from cockroachdb/drpc#58,
where a single transport connection can carry multiple concurrent
streams.
The multiplexing dial path is guarded by
COCKROACH_EXPERIMENTAL_DRPC_MUX_ENABLED, defaulted to false. With the
gate off, DialDRPC keeps using drpcpool, which checks out a connection
per active stream and dials a new one when none is idle. The upgraded
multiplexing-capable library is therefore exercised on every connection,
but the multiplexing capability itself stays unused: every stream still
ends up on its own underlying connection, matching the prior behavior.
This keeps the initial scope small. The dial-mux path is in place so
it can be turned on for validation, with a follow-up to flip the
default once we are confident.
Both paths now share the same dial-option setup, so the mux path also
picks up the client metrics and the request-recording gate that the
pool path was already attaching.
Release note: None
Epic: none