Add WorkerdDebugPort interface for dynamic RPC entrypoint access#5568
Merged
Add WorkerdDebugPort interface for dynamic RPC entrypoint access#5568
Conversation
ffbdd7c to
df9b629
Compare
CodSpeed Performance ReportMerging #5568 will degrade performances by 10.73%Comparing Summary
Benchmarks breakdown
Footnotes
|
df9b629 to
e207ace
Compare
|
The generated output of |
e207ace to
0d92e30
Compare
9389f13 to
452a4c4
Compare
kentonv
reviewed
Nov 26, 2025
3be2c9e to
c6916af
Compare
Collaborator
Author
Introduces a new privileged debug port interface that enables dynamic
access to worker entrypoints at runtime.
Currently, service bindings between workerd processes must be configured
at startup in the config file. Changing binding targets requires a full
process restart. This is problematic for local development tools like
Miniflare, which need to dynamically re-target RPC connections at runtime.
Today, Miniflare works around this by running a Node.js TCP server that
sits between workerd processes and manually re-routes RPC traffic. This
adds significant complexity and overhead.
This commit implements the WorkerdDebugPort interface which exposes all
service entrypoints in a process through a privileged RPC interface.
External tools can now:
- Get direct access to any entrypoint with custom props at runtime
- Start events and invoke methods via JS RPC without HTTP overhead
- Dynamically switch between entrypoints without process restarts
This enables Miniflare to eliminate its TCP proxy layer and handle
dynamic RPC routing natively through workerd.
```
interface WorkerdDebugPort {
getEntrypoint(service, entrypoint, props) -> (worker)
getActor(service, entrypoint, actorId) -> (actor);
}
```
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
…tpListener No functional changes
c6916af to
5ec33fb
Compare
Collaborator
Author
|
Last change is just a rebase to pick up the wpt test fix. |
kentonv
approved these changes
Dec 3, 2025
Collaborator
Author
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.
Introduces a new privileged debug port interface that enables dynamic access to worker entrypoints at runtime.
Currently, service bindings between workerd processes must be configured at startup in the config file. Changing binding targets requires a full process restart. This is problematic for local development tools like Miniflare, which need to dynamically re-target RPC connections at runtime.
Today, Miniflare works around this by running a Node.js TCP server that sits between workerd processes and manually re-routes RPC traffic. This adds significant complexity and overhead.
This commit implements the WorkerdDebugPort interface which exposes all service entrypoints in a process through a privileged RPC interface. External tools can now:
This enables Miniflare to eliminate its TCP proxy layer and handle dynamic RPC routing natively through workerd.
🤖 Generated with Claude Code