You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Active in-memory| The Durable Object runs, in memory, and handles incoming requests. |
40
-
| Idle in-memory non-hibernateable| The Durable Object waits for the next incoming request/event, but does not satisfy the criteria for hibernation. |
41
-
| Idle in-memory hibernateable| The Durable Object waits for the next incoming request/event and satisfies the criteria for hibernation. It is up to the runtime to decide when to hibernate the Durable Object. Currently, it is after 10 seconds of inactivity while in this state. |
42
-
| Hibernated| The Durable Object is removed from memory. |
43
-
| Inactive| The Durable Object is completely removed from the host process. Might need a cold start. This is the initial state of all Durable Objects. |
|**Active in-memory**| The Durable Object runs, in memory, and handles incoming requests. |
40
+
|**Idle in-memory non-hibernateable**| The Durable Object waits for the next incoming request/event, but does not satisfy the criteria for hibernation. |
41
+
|**Idle in-memory hibernateable**| The Durable Object waits for the next incoming request/event and satisfies the criteria for hibernation. It is up to the runtime to decide when to hibernate the Durable Object. Currently, it is after 10 seconds of inactivity while in this state. |
42
+
|**Hibernated**| The Durable Object is removed from memory. |
43
+
|**Inactive**| The Durable Object is completely removed from the host process. Might need a cold start. This is the initial state of all Durable Objects. |
44
44
45
45
This is how a Durable Object transitions among these states (each state is in a rounded rectangle).
46
46
47
47

48
48
49
49
Assuming a Durable Object does not run, the first incoming request or event (like an Alarm) will execute the `constructor()` of the Durable Object class, then run the corresponding function invoked.
50
50
51
-
At this point the Durable Object is in the **Active in-memory state**.
51
+
At this point the Durable Object is in the **active in-memory state**.
52
52
53
53
If it continuously receives requests or events within 10 seconds of each other, the Durable Object will remain in this state.
54
54
@@ -64,13 +64,13 @@ If all conditions are met, the Durable Object will transition into a **hibernate
64
64
When hibernated, the in-memory state is discarded, so ensure you persist all important information in the Durable Object's storage.
65
65
:::
66
66
67
-
If any of the above conditions are false, the Durable Object remains in-memory, in the **Idle in-memory non-hibernateable** state.
67
+
If any of the above conditions are false, the Durable Object remains in-memory, in the **idle in-memory non-hibernateable** state.
68
68
69
-
In case of an incoming request or event while in the hibernated state, the `constructor()` will run again, and the corresponding function invoked will run.
69
+
In case of an incoming request or event while in the **hibernated** state, the `constructor()` will run again, and the corresponding function invoked will run.
70
70
71
-
While in the idle in-memory non-hibernateable state, after 70-140 seconds of inactivity (no incoming requests or events), the Durable Object will be evicted entirely from memory and potentially from the Cloudflare host and transition to the inactive state.
71
+
While in the **idle in-memory non-hibernateable** state, after 70-140 seconds of inactivity (no incoming requests or events), the Durable Object will be evicted entirely from memory and potentially from the Cloudflare host and transition to the **inactive** state.
72
72
73
-
Objects in the hibernated state keep their Websocket clients connected, and the runtime decides it will ever move the object to a different host, thus restarting the lifecycle.
73
+
Objects in the **hibernated** state keep their Websocket clients connected, and the runtime decides it will ever move the object to a different host, thus restarting the lifecycle.
74
74
75
75
The next incoming request or event starts the cycle again.
0 commit comments