diff --git a/src/content/docs/durable-objects/platform/limits.mdx b/src/content/docs/durable-objects/platform/limits.mdx index d147e6b2d69689..d694ee9420dda4 100644 --- a/src/content/docs/durable-objects/platform/limits.mdx +++ b/src/content/docs/durable-objects/platform/limits.mdx @@ -10,27 +10,25 @@ import { Render } from "~/components"; Durable Objects are only available on the [Workers Paid plan](/workers/platform/pricing/#workers). Durable Objects limits are the same as [Workers Limits](/workers/platform/limits/), as well as the following limits that are specific to Durable Objects: -| Feature | Limit for class with key-value storage backend | Limit for class with SQite storage backend 1 | -| --------------------------------- | ---------------------------------------------------------------- | --------------------------------------------- | +| Feature | Limit for class with key-value storage backend | Limit for class with SQite storage backend [^1] | +| --------------------------------- | ---------------------------------------------------------------- | ----------------------------------------------- | | Number of Objects | Unlimited (within an account or of a given class) | Unlimited (within an account or of a given class) | | Maximum Durable Object namespaces | 500 (identical to the [script limit](/workers/platform/limits/)) | 500 (identical to the [script limit](/workers/platform/limits/)) | -| Storage per account | 50 GB (can be raised by contacting Cloudflare) 2 | 50 GB (can be raised by contacting Cloudflare) 2 | +| Storage per account | 50 GB (can be raised by contacting Cloudflare) [^2] | 50 GB (can be raised by contacting Cloudflare) [^2] | | Storage per class | Unlimited | Unlimited | -| Storage per Durable Object | Unlimited | 1 GB 4 | +| Storage per Durable Object | Unlimited | 1 GB [^3] | | Key size | 2 KiB (2048 bytes) | Key and value combined cannot exceed 2 MB | | Value size | 128 KiB (131072 bytes) | Key and value combined cannot exceed 2 MB | | WebSocket message size | 1 MiB (only for received messages) | 1 MiB (only for received messages) | -| CPU per request | 30s (including WebSocket messages) 3 | 30s (including WebSocket messages) 3 | +| CPU per request | 30s (including WebSocket messages) [^4] | 30s (including WebSocket messages) [^4] | -1 The new beta version of Durable Objects is available where each Durable Object has a private, embedded SQLite database. When creating a Durabe Object class, users can [opt-in to using SQL storage](/durable-objects/reference/durable-objects-migrations/#enable-sql-storage-on-create-durable-object-class-migration). +[^1]: The new beta version of Durable Objects is available where each Durable Object has a private, embedded SQLite database. When creating a Durable Object class, users can [opt-in to using SQL storage](/durable-objects/reference/durable-objects-migrations/#enable-sql-storage-on-create-durable-object-class-migration). -2 Durable Objects both bills and measures storage based on a gigabyte
(1 GB = 1,000,000,000 bytes) and not a gibibyte (GiB).
+[^2]: Durable Objects both bills and measures storage based on a gigabyte
(1 GB = 1,000,000,000 bytes) and not a gibibyte (GiB).
-3 Each incoming HTTP request or WebSocket *message* resets the remaining available CPU time to 30 seconds. This allows the Durable Object to consume up to 30 seconds of compute after each incoming network request, with each new network request resetting the timer. If you consume more than 30 seconds of compute between incoming network requests, there is a heightened chance that the individual Durable Object is evicted and reset. +[^3]: Will be raised to 10 GB for general availability. -4 Will be raised to 10GB for general availability. - - +[^4]: Each incoming HTTP request or WebSocket *message* resets the remaining available CPU time to 30 seconds. This allows the Durable Object to consume up to 30 seconds of compute after each incoming network request, with each new network request resetting the timer. If you consume more than 30 seconds of compute between incoming network requests, there is a heightened chance that the individual Durable Object is evicted and reset. For Durable Object classes with [SQLite storage backend](/durable-objects/best-practices/access-durable-objects-storage/#sqlite-storage-backend) these SQL limits apply: @@ -44,6 +42,8 @@ For Durable Object classes with [SQLite storage backend](/durable-objects/best-p | Maximum arguments per SQL function | 32 | | Maximum characters (bytes) in a `LIKE` or `GLOB` pattern | 50 bytes | + + ## How much work can a single Durable Object do? Durable Objects can scale horizontally across many Durable Objects. Each individual Object is inherently single-threaded.