Skip to content

Commit e332ea3

Browse files
committed
adds section to remote development docs about routes per zone limit
1 parent 8a5ee2a commit e332ea3

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/content/docs/workers/local-development.mdx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ head: []
77
description: Develop your Workers locally via Wrangler.
88
---
99

10+
import { Aside } from "~/components";
11+
1012
Cloudflare Workers and most connected resources can be fully developed and tested locally - providing confidence that the applications you build locally will work the same way in production. This allows you to be more efficient and effective by providing a faster feedback loop and removing the need to [test against remote resources](#develop-using-remote-resources-and-bindings). Local development runs against the same production runtime used by Cloudflare Workers, [workerd](https://github.com/cloudflare/workerd).
1113

1214
In addition to testing Workers locally with [`wrangler dev`](/workers/wrangler/commands/#dev), the use of Miniflare allows you to test other Developer Platform products locally, such as [R2](/r2/), [KV](/kv/), [D1](/d1/), and [Durable Objects](/durable-objects/).
@@ -127,6 +129,19 @@ npx wrangler dev --remote
127129

128130
For some products like KV and R2, remote resources used for `wrangler dev --remote` must be specified with preview ID/names in the [Wrangler configuration file](/workers/wrangler/configuration/) such as `preview_id` for KV or `preview_bucket name` for R2. Resources used for remote mode (preview) can be different from resources used for production to prevent changing production data during development. To use production data in `wrangler dev --remote`, set the preview ID/name of the resource to the ID/name of your production resource.
129131

132+
<Aside
133+
type="note"
134+
title="Number of routes per zone in a remote development session"
135+
>
136+
When you run a remote development session using the `--remote` flag, a
137+
[limit](/workers/platform/limits/#routes-and-domains) of 50
138+
[routes](/workers/configuration/routing/routes/) per zone is enforced. The
139+
Quick Editor in the Cloudflare Dashboard also uses `wrangler dev --remote`, so
140+
any changes made there are subject to the same 50-route limit. If your zone
141+
has more than 50 routes, you **will not be able to run a remote session**. To
142+
fix this, you must remove routes until you are under the 50-route limit.
143+
</Aside>
144+
130145
## Customize `wrangler dev`
131146

132147
You can customize how `wrangler dev` works to fit your needs. Refer to [the `wrangler dev` documentation](/workers/wrangler/commands/#dev) for available configuration options.

0 commit comments

Comments
 (0)