Skip to content

Glossary

Review the definitions for terms used across Cloudflare's Durable Objects documentation.

Term Definition
alarm

A Durable Object alarm is a mechanism that allows you to schedule the Durable Object to be woken up at a time in the future.

Durable Object

A Durable Object is an individual instance of a Durable Object class. A Durable Object is globally unique (referenced by ID), provides a global point of coordination for all methods/requests sent to it, and has private, persistent storage that is not shared with other Durable Objects within a namespace.

Durable Object class

The JavaScript class that defines the methods (RPC) and handlers (fetch, alarm) as part of your Durable Object, and/or an optional constructor. All Durable Objects within a single namespace share the same class definition.

Durable Objects

The product name, or the collective noun referring to more than one Durable Object.

event context

The duration of time that a Durable Object is processing an event, such as a remote procedure call. Compute duration charges are incurred for the duration of the event context.

input gate

While a storage operation is executing, no events shall be delivered to a Durable Object except for storage completion events. Any other events will be deferred until such a time as the object is no longer executing JavaScript code and is no longer waiting for any storage operations. We say that these events are waiting for the "input gate" to open.

instance

See "Durable Object".

KV API

API methods part of Storage API that support persisting key-value data.

migration

A Durable Object migration is a mapping process from a class name to a runtime state. Initiate a Durable Object migration when you need to:

  • Create a new Durable Object class.
  • Rename a Durable Object class.
  • Delete a Durable Object class.
  • Transfer an existing Durable Objects class.
namespace

A container for a collection of Durable Objects that all share the same Durable Object (class) definition. A single namespace can have (tens of) millions of Durable Objects. Metrics are scoped per namespace.

output gate

When a storage write operation is in progress, any new outgoing network messages will be held back until the write has completed. We say that these messages are waiting for the "output gate" to open. If the write ultimately fails, the outgoing network messages will be discarded and replaced with errors, while the Durable Object will be shut down and restarted from scratch.

SQL API

API methods part of Storage API that support SQL querying.

Storage API

The transactional and strongly consistent (serializable) Storage API for persisting data within each Durable Object. State stored within a unique Durable Object is "private" to that Durable Object, and not accessible from other Durable Objects.

Storage API includes key-value (KV) API, SQL API, and point-in-time-recovery (PITR) API.

  • Durable Object classes with the key-value storage backend can use KV API.
  • Durable Object classes with the SQLite storage backend can use KV API, SQL API, and PITR API.
Storage Backend

By default, a Durable Object class can use Storage API that leverages a key-value storage backend. New Durable Object classes can opt-in to using a SQLite storage backend.

stub

An object that refers to a unique Durable Object within a namespace and allows you to call into that Durable Object via RPC methods or the fetch API. For example, let stub = env.MY_DURABLE_OBJECT.get(id)