Skip to content
Cloudflare Docs

FAQs

Pricing FAQs

Does an empty table / SQLite database contribute to my storage?

Yes, although minimal. Empty tables can consume at least a few kilobytes, based on the number of columns (table width) in the table. An empty SQLite database consumes approximately 12 KB of storage.

Does metadata stored in Durable Objects count towards my storage?

All writes to a SQLite-backed Durable Object stores nominal amounts of metadata in internal tables in the Durable Object, which counts towards your billable storage.

The metadata remains in the Durable Object until you call deleteAll().

When does a Durable Object incur duration charges?

A Durable Object incurs duration charges as long as the JavaScript object is held in memory. Once an object has been evicted from memory, the next time it is needed, it will be recreated (calling the constructor again). There are two factors which decide when an object may be evicted from memory: hibernatability and existence of clients.

A Durable Object is considered hibernatable any time that it is not waiting for any I/O or callbacks that depend on the in-memory state.

  • For example, if an object calls fetch() and awaits the response, it is considered to be waiting for I/O, and so cannot hibernate.

  • Less obvious to a user, if an object calls setTimeout() to schedule a callback in the future - no matter how far in the future - then it is considered non-hibernatable, since there would be no way to recreate the callback after hibernating.

  • Additionally, if the Durable Object has received an incoming request and has not fully responded yet, then it cannot be hibernated, because hibernating would mean losing track of the async function which is eventually supposed to return a response to that request.

  • As an exception, a WebSocket request which has explicitly been accepted using the WebSocket hibernation API allows a Durable Object to hibernate even while the WebSocket is still connected.

Once a Durable Object has been in a hibernatable state for 10 consecutive seconds, it hibernates, and duration billing stops.

Even if a Durable Object never becomes hibernatable, it will still be evicted once all clients have gone away. A Durable Object is considered to have clients if any other Worker currently holds a stub pointing to the Durable Object, or is waiting for a response from the Durable Object. An incoming WebSocket connection counts as a client. If the object is currently responding to an alarm event, this also counts as having a client. When not hibernatable, a Durable Object will be evicted from memory after it has had no client for 70-140 seconds (the exact interval varies). But again, if the object is hibernatable, then the 10-second hibernation timeout takes precedence and the 70-140 second no-client timeout is moot.

Limits FAQs

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.

  • An individual Object has a soft limit of 1,000 requests per second. You can have an unlimited number of individual objects per namespace.
  • A simple storage get() on a small value that directly returns the response may realize a higher request throughput compared to a Durable Object that (for example) serializes and/or deserializes large JSON values.
  • Similarly, a Durable Object that performs multiple list() operations may be more limited in terms of request throughput.

A Durable Object that receives too many requests will, after attempting to queue them, return an overloaded error to the caller.

How many Durable Objects can I create?

Durable Objects are designed such that the number of individual objects in the system do not need to be limited, and can scale horizontally.

  • You can create and run as many separate Durable Objects as you want within a given Durable Object namespace.
  • The main limit to your usage of Durable Objects is the total storage limit per account.
  • If you need more storage, contact your account team or complete the Limit Increase Request Form and we will contact you with next steps.