Skip to content

Commit 4b89b83

Browse files
vicbdaisyfaithauma
authored andcommitted
Move the Static Assets limits to the Workers limits (#22236)
1 parent 4017837 commit 4b89b83

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

src/content/docs/workers/platform/limits.mdx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ import { Render, WranglerConfig } from "~/components";
2121
| [Worker startup time](#worker-startup-time) | 400 ms | 400 ms |
2222
| [Number of Workers](#number-of-workers)<sup>1</sup> | 100 | 500 |
2323
| Number of [Cron Triggers](/workers/configuration/cron-triggers/)<br/>per account | 5 | 250 |
24+
| Number of [Static Asset](#static-assets) files | 20000 | 20000 |
25+
| Individual [Static Asset](#static-assets) file size | 25 MiB | 25 MiB |
2426

2527
<sup>1</sup> If you are running into limits, your project may be a good fit for
2628
[Workers for Platforms](/cloudflare-for-platforms/workers-for-platforms/).
@@ -361,6 +363,22 @@ If your Worker is on a Bundled plan, your limits are the same as the Workers Pai
361363

362364
---
363365

366+
## Static Assets
367+
368+
### Files
369+
370+
There is a 20,000 file count limit per [Worker version](/workers/configuration/versions-and-deployments/), and a 25 MiB individual file size limit. This matches the [limits in Cloudflare Pages](/pages/platform/limits/) today.
371+
372+
### Headers
373+
374+
A `_headers` file may contain up to 100 rules and each line may contain up to 2,000 characters. The entire line, including spacing, header name, and value, counts towards this limit.
375+
376+
### Redirects
377+
378+
A `_redirects` file may contain up to 2,000 static redirects and 100 dynamic redirects, for a combined total of 2,100 redirects. Each redirect declaration has a 1,000-character limit.
379+
380+
---
381+
364382
## Related resources
365383

366384
Review other developer platform resource limits.

src/content/docs/workers/static-assets/billing-and-limitations.mdx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,7 @@ There is no additional cost for storing Assets.
1717

1818
## Limitations
1919

20-
The following limitations apply for Workers with static assets:
21-
22-
- There is a 20,000 file count limit per [Worker version](/workers/configuration/versions-and-deployments/), and a 25 MiB individual file size limit. This matches the [limits in Cloudflare Pages](/pages/platform/limits/) today.
23-
24-
### Headers
25-
26-
A `_headers` file may contain up to 100 rules and each line may contain up to 2,000 characters. The entire line, including spacing, header name, and value, counts towards this limit.
27-
28-
### Redirects
29-
30-
A `_redirects` file may contain up to 2,000 static redirects and 100 dynamic redirects, for a combined total of 2,100 redirects. Each redirect declaration has a 1,000-character limit.
20+
See the [Platform Limits](/workers/platform/limits/#static-assets)
3121

3222
## Troubleshooting
3323

src/content/partials/workers/redirects.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ For example, if you have added `/about/faq/* /about/faqs 200` to your `_redirect
135135

136136
## Surpass `_redirects` limits
137137

138-
A <a href={props.product === 'workers' ? '/workers/static-assets/billing-and-limitations/#redirects' : '/pages/platform/limits/#redirects'}>`_redirects`</a> file has a maximum of 2,000 static redirects and 100 dynamic redirects, for a combined total of 2,100 redirects. Use [Bulk Redirects](/rules/url-forwarding/bulk-redirects/) to handle redirects that surpasses the 2,100 redirect rules limit of `_redirects`.
138+
A <a href={props.product === 'workers' ? '/workers/platform/limits/#redirects' : '/pages/platform/limits/#redirects'}>`_redirects`</a> file has a maximum of 2,000 static redirects and 100 dynamic redirects, for a combined total of 2,100 redirects. Use [Bulk Redirects](/rules/url-forwarding/bulk-redirects/) to handle redirects that surpasses the 2,100 redirect rules limit of `_redirects`.
139139

140140
:::note
141141

0 commit comments

Comments
 (0)