cloudflare
workerd
BlogDocsChangelog

Add WorkerdDebugPort interface for dynamic RPC entrypoint access

#5568
Comparing
dlapid/debug_port
(
452a4c4
) with
main
(
f80cae3
)
CodSpeed Performance Gauge
0%
Untouched
57
Skipped
30

Benchmarks

Skipped (30)

Encode_ASCII_8192[TextEncoderBenchmark]
src/workerd/tests/bench-text-encoder.c++
Skipped
584.5 µs*
Encode_ASCII_256[TextEncoderBenchmark]
src/workerd/tests/bench-text-encoder.c++
Skipped
530.7 µs*
Encode_TwoByte_256[TextEncoderBenchmark]
src/workerd/tests/bench-text-encoder.c++
Skipped
531.7 µs*
Encode_ASCII_32[TextEncoderBenchmark]
src/workerd/tests/bench-text-encoder.c++
Skipped
527.6 µs*
Encode_ASCII_1024[TextEncoderBenchmark]
src/workerd/tests/bench-text-encoder.c++
Skipped
535 µs*
Encode_OneByte_256[TextEncoderBenchmark]
src/workerd/tests/bench-text-encoder.c++
Skipped
529.3 µs*
EncodeInto_OneByte_256[TextEncoderBenchmark]
src/workerd/tests/bench-text-encoder.c++
Skipped
541.3 µs*
EncodeInto_ASCII_256[TextEncoderBenchmark]
src/workerd/tests/bench-text-encoder.c++
Skipped
538.3 µs*
EncodeInto_TwoByte_256[TextEncoderBenchmark]
src/workerd/tests/bench-text-encoder.c++
Skipped
541 µs*
Encode_ASCII_1024[0/0/1024]
unknown_file
Skipped
3.7 ms*
EncodeInto_ASCII_1024[1/0/1024]
unknown_file
Skipped
2.6 ms*
Encode_TwoByte_256[0/2/256]
unknown_file
Skipped
7.1 ms*
ParseAndSerialize
Mimetype
Skipped
74.9 ms*
Encode_ASCII_256[0/0/256]
unknown_file
Skipped
3.2 ms*
Encode_ASCII_8192[0/0/8192]
unknown_file
Skipped
13.1 ms*
EncodeInto_ASCII_8192[1/0/8192]
unknown_file
Skipped
3.3 ms*
Encode_OneByte_256[0/1/256]
unknown_file
Skipped
5.3 ms*
Encode_ASCII_32[0/0/32]
unknown_file
Skipped
3 ms*
Encode_OneByte_1024[0/1/1024]
unknown_file
Skipped
12.1 ms*
Encode_OneByte_8192[0/1/8192]
unknown_file
Skipped
85.2 ms*
EncodeInto_OneByte_256[1/1/256]
unknown_file
Skipped
4.5 ms*
EncodeInto_OneByte_1024[1/1/1024]
unknown_file
Skipped
10.5 ms*
EncodeInto_OneByte_8192[1/1/8192]
unknown_file
Skipped
66.9 ms*
EncodeInto_ASCII_256[1/0/256]
unknown_file
Skipped
2.6 ms*
EncodeInto_TwoByte_8192[1/2/8192]
unknown_file
Skipped
96.7 ms*
EncodeInto_TwoByte_256[1/2/256]
unknown_file
Skipped
5.4 ms*
Serialize
Mimetype
Skipped
74.6 ms*
EncodeInto_TwoByte_1024[1/2/1024]
unknown_file
Skipped
14.2 ms*
Encode_TwoByte_1024[0/2/1024]
unknown_file
Skipped
19.6 ms*
Encode_TwoByte_8192[0/2/8192]
unknown_file
Skipped
146.2 ms*

Passed

request[GlobalScopeBenchmark]
src/workerd/tests/bench-global-scope.c++
CodSpeed Performance Gauge
0%
52.9 ms52.8 ms
Encode_ASCII_8192[TextEncoder][0/0/8192]
src/workerd/tests/bench-text-encoder.c++
CodSpeed Performance Gauge
0%
13.1 ms13.1 ms
request[RegExpBenchmark]
src/workerd/tests/bench-regex.c++
CodSpeed Performance Gauge
0%
7.3 ms7.3 ms
ParseAndSerialize
src/workerd/tests/bench-mimetype.c++::Mimetype
CodSpeed Performance Gauge
0%
74.9 ms74.9 ms
EncodeInto_ASCII_1024[TextEncoder][1/0/1024]
src/workerd/tests/bench-text-encoder.c++
CodSpeed Performance Gauge
0%
2.6 ms2.6 ms
Encode_OneByte_256[TextEncoder][0/1/256]
src/workerd/tests/bench-text-encoder.c++
CodSpeed Performance Gauge
0%
5.3 ms5.3 ms
Encode_OneByte_1024[TextEncoder][0/1/1024]
src/workerd/tests/bench-text-encoder.c++
CodSpeed Performance Gauge
0%
12.1 ms12.1 ms
EncodeInto_OneByte_1024[TextEncoder][1/1/1024]
src/workerd/tests/bench-text-encoder.c++
CodSpeed Performance Gauge
0%
10.5 ms10.5 ms
Encode_TwoByte_8192[TextEncoder][0/2/8192]
src/workerd/tests/bench-text-encoder.c++
CodSpeed Performance Gauge
0%
146.2 ms146.2 ms
EncodeInto_OneByte_256[TextEncoder][1/1/256]
src/workerd/tests/bench-text-encoder.c++
CodSpeed Performance Gauge
0%
4.5 ms4.5 ms
EncodeInto_OneByte_8192[TextEncoder][1/1/8192]
src/workerd/tests/bench-text-encoder.c++
CodSpeed Performance Gauge
0%
66.9 ms66.8 ms
EncodeInto_TwoByte_1024[TextEncoder][1/2/1024]
src/workerd/tests/bench-text-encoder.c++
CodSpeed Performance Gauge
0%
14.1 ms14.1 ms
Test_JSON_ENC
src/workerd/tests/bench-json.c++
CodSpeed Performance Gauge
0%
205.5 ms205.5 ms
bm_ReadyNow
external/capnp-cpp/src/kj/async-bench.c++
CodSpeed Performance Gauge
0%
2.1 µs2.1 µs
bm_Immediate
external/capnp-cpp/src/kj/async-bench.c++
CodSpeed Performance Gauge
0%
3.5 µs3.5 µs
bm_coroCoReturn
external/capnp-cpp/src/kj/async-bench.c++
CodSpeed Performance Gauge
0%
4.5 µs4.5 µs
arrayBufferBody[Response]
src/workerd/tests/bench-response.c++
CodSpeed Performance Gauge
0%
16.7 µs16.7 µs
bm_coroCoAwaitImmediate
external/capnp-cpp/src/kj/async-bench.c++
CodSpeed Performance Gauge
0%
6.1 µs6.1 µs
jsonResponse[Response]
src/workerd/tests/bench-response.c++
CodSpeed Performance Gauge
0%
35.1 µs35.1 µs
nullBodyWithStatus[Response]
src/workerd/tests/bench-response.c++
CodSpeed Performance Gauge
0%
9.4 µs9.4 µs
JsString_Utf8Length_Latin1_NonFlat_256
src/workerd/tests/bench-jsstring.c++
CodSpeed Performance Gauge
0%
8 µs8 µs
Util_RecursivelyFreeze
src/workerd/tests/bench-util.c++
CodSpeed Performance Gauge
0%
10.8 ms10.8 ms
simpleStringBody[Response]
src/workerd/tests/bench-response.c++
CodSpeed Performance Gauge
0%
21.1 µs21.1 µs
JsString_Utf8Length_Latin1_Flat_256
src/workerd/tests/bench-jsstring.c++
CodSpeed Performance Gauge
0%
1.7 µs1.7 µs
JsString_Utf8Length_Latin1_Flat_32
src/workerd/tests/bench-jsstring.c++
CodSpeed Performance Gauge
0%
920.3 ns920.3 ns
JsString_Utf8Length_Latin1_NonFlat_8192
src/workerd/tests/bench-jsstring.c++
CodSpeed Performance Gauge
0%
42.1 µs42.1 µs
JsString_Utf8Length_Utf16_Flat_256
src/workerd/tests/bench-jsstring.c++
CodSpeed Performance Gauge
0%
2.8 µs2.8 µs
JsString_Utf8Length_Latin1_Flat_8192
src/workerd/tests/bench-jsstring.c++
CodSpeed Performance Gauge
0%
31 µs31 µs
JsString_Utf8Length_Utf16_Invalid_Flat_256
src/workerd/tests/bench-jsstring.c++
CodSpeed Performance Gauge
0%
2.8 µs2.8 µs
JsString_Utf8Length_Latin1_NonFlat_1024
src/workerd/tests/bench-jsstring.c++
CodSpeed Performance Gauge
0%
12.2 µs12.2 µs
JsString_Utf8Length_Utf16_Flat_1024
src/workerd/tests/bench-jsstring.c++
CodSpeed Performance Gauge
0%
8.6 µs8.6 µs
JsString_Utf8Length_Utf16_Invalid_Flat_1024
src/workerd/tests/bench-jsstring.c++
CodSpeed Performance Gauge
0%
8.6 µs8.6 µs
JsString_Utf8Length_Utf16_Flat_8192
src/workerd/tests/bench-jsstring.c++
CodSpeed Performance Gauge
0%
62.9 µs62.9 µs
JsString_Utf8Length_Utf16_Invalid_Flat_8192
src/workerd/tests/bench-jsstring.c++
CodSpeed Performance Gauge
0%
62.9 µs62.9 µs
JsString_Utf8Length_Utf16_NonFlat_256
src/workerd/tests/bench-jsstring.c++
CodSpeed Performance Gauge
0%
9 µs9 µs
JsString_Utf8Length_Utf16_NonFlat_1024
src/workerd/tests/bench-jsstring.c++
CodSpeed Performance Gauge
0%
16.2 µs16.2 µs
Parse[KjHeaders]
src/workerd/tests/bench-kj-headers.c++
CodSpeed Performance Gauge
0%
44.5 µs44.5 µs
JsString_Utf8Length_Utf16_NonFlat_8192
src/workerd/tests/bench-jsstring.c++
CodSpeed Performance Gauge
0%
73.8 µs73.8 µs
JsString_Utf8Length_Utf16_Invalid_NonFlat_8192
src/workerd/tests/bench-jsstring.c++
CodSpeed Performance Gauge
0%
73.8 µs73.8 µs
bodyWithHeaders[Response]
src/workerd/tests/bench-response.c++
CodSpeed Performance Gauge
0%
23.6 µs23.6 µs
JsString_Utf8Length_Utf16_Invalid_NonFlat_1024
src/workerd/tests/bench-jsstring.c++
CodSpeed Performance Gauge
0%
16.2 µs16.2 µs
JsString_Utf8Length_Latin1_Flat_1024
src/workerd/tests/bench-jsstring.c++
CodSpeed Performance Gauge
0%
4.6 µs4.6 µs
JsString_Utf8Length_Utf16_Invalid_NonFlat_256
src/workerd/tests/bench-jsstring.c++
CodSpeed Performance Gauge
0%
9 µs9 µs
constructor[ApiHeaders]
src/workerd/tests/bench-api-headers.c++
CodSpeed Performance Gauge
0%
97.3 ms97.3 ms
EncodeInto_ASCII_256[TextEncoder][1/0/256]
src/workerd/tests/bench-text-encoder.c++
CodSpeed Performance Gauge
0%
2.5 ms2.5 ms
Serialize
src/workerd/tests/bench-mimetype.c++::Mimetype
CodSpeed Performance Gauge
0%
74.6 ms74.6 ms
Encode_TwoByte_1024[TextEncoder][0/2/1024]
src/workerd/tests/bench-text-encoder.c++
CodSpeed Performance Gauge
0%
19.6 ms19.6 ms
EncodeInto_TwoByte_8192[TextEncoder][1/2/8192]
src/workerd/tests/bench-text-encoder.c++
CodSpeed Performance Gauge
0%
96.7 ms96.7 ms
Encode_ASCII_32[TextEncoder][0/0/32]
src/workerd/tests/bench-text-encoder.c++
CodSpeed Performance Gauge
0%
3 ms3 ms
Encode_OneByte_8192[TextEncoder][0/1/8192]
src/workerd/tests/bench-text-encoder.c++
CodSpeed Performance Gauge
0%
85.1 ms85.1 ms
EncodeInto_ASCII_8192[TextEncoder][1/0/8192]
src/workerd/tests/bench-text-encoder.c++
CodSpeed Performance Gauge
0%
3.3 ms3.3 ms
Test_JSON_DEC
src/workerd/tests/bench-json.c++
CodSpeed Performance Gauge
0%
3.2 s3.2 s
set_append[ApiHeaders]
src/workerd/tests/bench-api-headers.c++
CodSpeed Performance Gauge
0%
16.9 ms16.9 ms
EncodeInto_TwoByte_256[TextEncoder][1/2/256]
src/workerd/tests/bench-text-encoder.c++
CodSpeed Performance Gauge
0%
5.4 ms5.4 ms
Encode_TwoByte_256[TextEncoder][0/2/256]
src/workerd/tests/bench-text-encoder.c++
CodSpeed Performance Gauge
0%
7.1 ms7.1 ms
Encode_ASCII_1024[TextEncoder][0/0/1024]
src/workerd/tests/bench-text-encoder.c++
CodSpeed Performance Gauge
0%
3.7 ms3.7 ms
Encode_ASCII_256[TextEncoder][0/0/256]
src/workerd/tests/bench-text-encoder.c++
CodSpeed Performance Gauge
0%
3.2 ms3.2 ms

Commits

Click on a commit to change the comparison range
Base
main
f80cae3
-0.01%
Add WorkerdDebugPort interface for dynamic RPC entrypoint access 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>
452a4c4
8 days ago
by danlapid
© 2025 CodSpeed Technology
Home Terms Privacy Docs