From 8a5ee2a99ca4cdaf53e094877ce8744bbcdf5063 Mon Sep 17 00:00:00 2001 From: korinne Date: Tue, 25 Mar 2025 13:19:46 -0700 Subject: [PATCH 1/2] adds docs for limit on routes per zone when using `--remote` --- src/content/docs/workers/platform/limits.mdx | 45 +++++++++++--------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/src/content/docs/workers/platform/limits.mdx b/src/content/docs/workers/platform/limits.mdx index f998184096001e..63b5fb897ba073 100644 --- a/src/content/docs/workers/platform/limits.mdx +++ b/src/content/docs/workers/platform/limits.mdx @@ -11,16 +11,16 @@ import { Render } from "~/components"; ## Account plan limits -| Feature | Workers Free | Workers Paid | -| -------------------------------------------------------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Feature | Workers Free | Workers Paid | +| -------------------------------------------------------------------------------- | ------------ | ------------ | | [Subrequests](#subrequests) | 50/request | 1000/request | -| [Simultaneous outgoing
connections/request](#simultaneous-open-connections) | 6 | 6 | -| [Environment variables](#environment-variables) | 64/Worker | 128/Worker | -| [Environment variable
size](#environment-variables) | 5 KB | 5 KB | -| [Worker size](#worker-size) | 3 MB | 10 MB | -| [Worker startup time](#worker-startup-time) | 400 ms | 400 ms | -| [Number of Workers](#number-of-workers)1 | 100 | 500 | -| Number of [Cron Triggers](/workers/configuration/cron-triggers/)
per account | 5 | 250 | +| [Simultaneous outgoing
connections/request](#simultaneous-open-connections) | 6 | 6 | +| [Environment variables](#environment-variables) | 64/Worker | 128/Worker | +| [Environment variable
size](#environment-variables) | 5 KB | 5 KB | +| [Worker size](#worker-size) | 3 MB | 10 MB | +| [Worker startup time](#worker-startup-time) | 400 ms | 400 ms | +| [Number of Workers](#number-of-workers)1 | 100 | 500 | +| Number of [Cron Triggers](/workers/configuration/cron-triggers/)
per account | 5 | 250 | 1 If you are running into limits, your project may be a good fit for [Workers for Platforms](/cloudflare-for-platforms/workers-for-platforms/). @@ -58,11 +58,11 @@ Cloudflare does not enforce response limits on response body sizes, but cache li ## Worker limits -| Feature | Workers Free | Workers Paid | -| ------------------------ | ------------------------------------------ | ---------------- | -| [Request](#request) | 100,000 requests/day
1000 requests/min | No limit | -| [Worker memory](#memory) | 128 MB | 128 MB | -| [CPU time](#cpu-time) | 10 ms | 5 min HTTP request
15 min [Cron Trigger](/workers/configuration/cron-triggers/) | +| Feature | Workers Free | Workers Paid | +| ------------------------ | ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Request](#request) | 100,000 requests/day
1000 requests/min | No limit | +| [Worker memory](#memory) | 128 MB | 128 MB | +| [CPU time](#cpu-time) | 10 ms | 5 min HTTP request
15 min [Cron Trigger](/workers/configuration/cron-triggers/) | | [Duration](#duration) | No limit | No limit for Workers.
15 min duration limit for [Cron Triggers](/workers/configuration/cron-triggers/), [Durable Object Alarms](/durable-objects/api/alarms/) and [Queue Consumers](/queues/configuration/javascript-apis/#consumer) | ### Duration @@ -93,7 +93,7 @@ Scheduled Workers ([Cron Triggers](/workers/configuration/cron-triggers/)) have ## Cache API limits -| Feature | Workers Free | Workers Paid +| Feature | Workers Free | Workers Paid | | ---------------------------------------- | ------------ | ------------ | | [Maximum object size](#cache-api-limits) | 512 MB | 512 MB | | [Calls/request](#cache-api-limits) | 50 | 1,000 | @@ -290,6 +290,10 @@ If you need more than 500 Workers, consider using [Workers for Platforms](/cloud Each zone has a limit of 1,000 [routes](/workers/configuration/routing/routes/). If you require more than 1,000 routes on your zone, consider using [Workers for Platforms](/cloudflare-for-platforms/workers-for-platforms/) or request an increase to this limit. +### Number of routes per zone when using `wrangler dev --remote` + +When you run a [remote development](/workers/local-development/#develop-using-remote-resources-and-bindings) session using the `--remote` flag, a limit of 50 [routes](/workers/configuration/routing/routes/) per zone is enforced. The Quick Editor in the Cloudflare Dashboard also uses `wrangler dev --remote`, so any changes made there are subject to the same 50-route limit. If your zone has more than 50 routes, you **will not be able to run a remote session**. To fix this, you must remove routes until you are under the 50-route limit. + ### Number of custom domains per zone Each zone has a limit of 100 [custom domains](/workers/configuration/routing/custom-domains/). If you require more than 100 custom domains on your zone, consider using a wildcard [route](/workers/configuration/routing/routes/) or request an increase to this limit. @@ -323,10 +327,11 @@ Unbound and Bundled plans have been deprecated and are no longer available for n If your Worker is on an Unbound plan, your limits are exactly the same as the Workers Paid plan. If your Worker is on a Bundled plan, your limits are the same as the Workers Paid plan except for the following differences: -* Your limit for [subrequests](/workers/platform/limits/#subrequests) is 50/request -* Your limit for [CPU time](/workers/platform/limits/#cpu-time) is 50ms for HTTP requests and 50ms for [Cron Triggers](/workers/configuration/cron-triggers/) -* You have no [Duration](/workers/platform/limits/#duration) limits for [Cron Triggers](/workers/configuration/cron-triggers/), [Durable Object alarms](/durable-objects/api/alarms/), or [Queue consumers](/queues/configuration/javascript-apis/#consumer) -* Your Cache API limits for calls/requests is 50 + +- Your limit for [subrequests](/workers/platform/limits/#subrequests) is 50/request +- Your limit for [CPU time](/workers/platform/limits/#cpu-time) is 50ms for HTTP requests and 50ms for [Cron Triggers](/workers/configuration/cron-triggers/) +- You have no [Duration](/workers/platform/limits/#duration) limits for [Cron Triggers](/workers/configuration/cron-triggers/), [Durable Object alarms](/durable-objects/api/alarms/), or [Queue consumers](/queues/configuration/javascript-apis/#consumer) +- Your Cache API limits for calls/requests is 50 --- @@ -336,4 +341,4 @@ Review other developer platform resource limits. - [KV limits](/kv/platform/limits/) - [Durable Object limits](/durable-objects/platform/limits/) -- [Queues limits](/queues/platform/limits/) \ No newline at end of file +- [Queues limits](/queues/platform/limits/) From e332ea3b95ac82aa4e50ebbe451dc912912c534f Mon Sep 17 00:00:00 2001 From: korinne Date: Tue, 25 Mar 2025 13:28:43 -0700 Subject: [PATCH 2/2] adds section to remote development docs about routes per zone limit --- src/content/docs/workers/local-development.mdx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/content/docs/workers/local-development.mdx b/src/content/docs/workers/local-development.mdx index 5403c66c1bb2dd..1d1c5a56728002 100644 --- a/src/content/docs/workers/local-development.mdx +++ b/src/content/docs/workers/local-development.mdx @@ -7,6 +7,8 @@ head: [] description: Develop your Workers locally via Wrangler. --- +import { Aside } from "~/components"; + 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). 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 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. + + ## Customize `wrangler dev` 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.