Skip to content

Commit d00c20c

Browse files
committed
Making states consistent in formatting.
1 parent 79540a6 commit d00c20c

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/content/docs/durable-objects/concepts/durable-object-lifecycle.mdx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,21 @@ At this point, the caller sends a request to the Durable Object identified by th
3434

3535
A Durable Object can be in one of the following states at any moment:
3636

37-
| State | Description |
38-
|-----------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
39-
| 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. |
37+
| State | Description |
38+
|--------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
39+
| **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. |
4444

4545
This is how a Durable Object transitions among these states (each state is in a rounded rectangle).
4646

4747
![Lifecycle of a Durable Object](~/assets/images/durable-objects/lifecycle-of-a-do.png)
4848

4949
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.
5050

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**.
5252

5353
If it continuously receives requests or events within 10 seconds of each other, the Durable Object will remain in this state.
5454

@@ -64,13 +64,13 @@ If all conditions are met, the Durable Object will transition into a **hibernate
6464
When hibernated, the in-memory state is discarded, so ensure you persist all important information in the Durable Object's storage.
6565
:::
6666

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.
6868

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.
7070

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.
7272

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.
7474

7575
The next incoming request or event starts the cycle again.
7676

0 commit comments

Comments
 (0)