Skip to content

Adds draft docs for connecting to remote resources during local dev (hybrid dev) #22940

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jun 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions public/__redirects
Original file line number Diff line number Diff line change
Expand Up @@ -1527,6 +1527,11 @@
/workers/about/tips/debugging/ /workers/observability/ 301
/workers/testing/debugging-tools/ /workers/observability/dev-tools/ 301
/workers/testing/local-development/ /workers/local-development/ 301
/workers/local-development/ /workers/development-testing/#local-development 301
/workers/local-development/bindings-per-env/ /workers/development-testing/bindings-per-env/ 301
/workers/local-development/environment-variables/ /workers/development-testing/environment-variables/ 301
/workers/local-development/local-data/ /workers/development-testing/local-data/ 301
/workers/local-development/remote-data/ /workers/development-testing/#remote-bindings 301
/workers/about/using-cache/ /workers/reference/how-the-cache-works/ 301
/workers/learning/how-the-cache-works/ /workers/reference/how-the-cache-works/ 301
/workers/api/ /api/resources/workers/subresources/scripts/methods/list/ 301
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,25 @@ curl http://localhost:8600
```sh output
# -> user worker got "intercepted a request for customer-1 by the outbound" from fetch
```

## Remote dispatch namespaces

You can configure dispatch namespace bindings to connect to remote dispatch namespaces during local development by setting [`experimental_remote = true`](/workers/development-testing/#remote-bindings):

<WranglerConfig>
```jsonc title="wrangler.jsonc"
{
"dispatch_namespaces": [
{
"binding": "DISPATCH_NAMESPACE",
"namespace": "testing",
"experimental_remote": true
}
]
}
```
</WranglerConfig>

This allows you to run your [dynamic dispatch Worker](/cloudflare-for-platforms/workers-for-platforms/reference/how-workers-for-platforms-works/#dynamic-dispatch-worker) locally, while connecting it to your remote dispatch namespace binding. You can then test changes to your core dispatching logic against real, deployed [user Workers](/cloudflare-for-platforms/workers-for-platforms/reference/how-workers-for-platforms-works/#user-workers).

For more information about remote bindings during local development, refer to [remote bindings documentation](/workers/development-testing/#remote-bindings).
2 changes: 1 addition & 1 deletion src/content/docs/d1/observability/debug-d1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@ You should include as much of the following in any bug report:

* Learn [how to debug Workers](/workers/observability/).
* Understand how to [access logs](/workers/observability/logs/) generated from your Worker and D1.
* Use [`wrangler dev`](/workers/wrangler/commands/#dev) to run your Worker and D1 locally and [debug issues before deploying](/workers/local-development/).
* Use [`wrangler dev`](/workers/wrangler/commands/#dev) to run your Worker and D1 locally and [debug issues before deploying](/workers/development-testing/).
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Local development sessions create a standalone, local-only environment that mirr

An existing Durable Object binding of `DB` would be available to your Worker when running locally.

Refer to Workers [Local development](/workers/local-development/#supported-resource-bindings-in-different-environments).
Refer to Workers [Local development](/workers/development-testing/bindings-per-env/).

## Remote development

Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/pages/functions/bindings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ You can interact with your R2 bucket bindings locally in one of two ways:

:::note

By default, Wrangler automatically persists data to local storage. For more information, refer to [Local development](/workers/local-development/).
By default, Wrangler automatically persists data to local storage. For more information, refer to [Local development](/workers/development-testing/).

:::

Expand Down Expand Up @@ -282,7 +282,7 @@ Interact with this binding by using `context.env` (for example, `context.env.NOR

:::note

By default, Wrangler automatically persists data to local storage. For more information, refer to [Local development](/workers/local-development/).
By default, Wrangler automatically persists data to local storage. For more information, refer to [Local development](/workers/development-testing/).

:::

Expand Down
6 changes: 3 additions & 3 deletions src/content/docs/pages/functions/wrangler-configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ A [binding](/pages/functions/bindings/) enables your Pages Functions to interact

:::note

When using Wrangler in the default local development mode, files will be written to local storage instead of the preview or production database. Refer to [Local development](/workers/local-development/) for more details.
When using Wrangler in the default local development mode, files will be written to local storage instead of the preview or production database. Refer to [Local development](/workers/development-testing/) for more details.

:::

Expand Down Expand Up @@ -475,7 +475,7 @@ Workers, the `script_name` key is optional.

:::note

When using Wrangler in the default local development mode, files will be written to local storage instead of the preview or production namespace. Refer to [Local development](/workers/local-development/) for more details.
When using Wrangler in the default local development mode, files will be written to local storage instead of the preview or production namespace. Refer to [Local development](/workers/development-testing/) for more details.

:::

Expand All @@ -501,7 +501,7 @@ You cannot currently configure a [queues consumer](/queues/reference/how-queues-

:::note

When using Wrangler in the default local development mode, files will be written to local storage instead of the preview or production bucket. Refer to [Local development](/workers/local-development/) for more details.
When using Wrangler in the default local development mode, files will be written to local storage instead of the preview or production bucket. Refer to [Local development](/workers/development-testing/) for more details.

:::

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
pcx_content_type: navigation
title: Supported bindings in local and remote dev
title: Supported bindings per development mode
sidebar:
order: 4
head: []
description: Supported bindings in local and remote development
description: Supported bindings per development mode
---

import { Render } from "~/components";
Expand Down
Loading
Loading