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
Clarify that Durable Objects does not charge for duration beyond the … (cloudflare#23188)
* Clarify that Durable Objects does not charge for duration beyond the last request
* Fixing linebreaks
* Fixing lindbreaks 2
---------
Co-authored-by: Jun Lee <[email protected]>
Durable Objects are billed only while the Durable Object is active (includes the <GlossaryTooltipterm="request context"> request context</GlossaryTooltip>).
@@ -32,7 +32,7 @@ await durableObjectStub.cat(); // billed as a request
32
32
33
33
<sup>3</sup> Application level auto-response messages handled by [`state.setWebSocketAutoResponse()`](/durable-objects/best-practices/websockets/) will not incur additional wall-clock time, and so they will not be charged.
34
34
35
-
<sup>4</sup> Duration is billed in wall-clock time as long as the Object is active, but is shared across all requests active on an Object at once. Calling `accept()` on a WebSocket in an Object will incur duration charges for the entire time the WebSocket is connected. Note that the request context for a Durable Object extends for 10 seconds after the last client disconnects. The request context of a Durable Object is evaluated every 70 seconds and the context is ended if it has been active for 70 seconds. If you prefer, use the [WebSocket Hibernation API](/durable-objects/best-practices/websockets/#websocket-hibernation-api) to avoid incurring duration charges once all event handlers finish running.
35
+
<sup>4</sup> Duration is billed in wall-clock time as long as the Object is active, but is shared across all requests active on an Object at once. Calling `accept()` on a WebSocket in an Object will incur duration charges for the entire time the WebSocket is connected. The request context of a Durable Object is evaluated every 70 seconds and the context is ended if it has been active for 70 seconds. If you prefer, use the [WebSocket Hibernation API](/durable-objects/best-practices/websockets/#websocket-hibernation-api) to avoid incurring duration charges once all event handlers finish running.
36
36
37
37
<sup>5</sup> Duration billing charges for the 128 MB of memory your Durable Object is allocated, regardless of actual usage. If your account creates many instances of a single Durable Object class, Durable Objects may run in the same isolate on the same physical machine and share the 128 MB of memory. These Durable Objects are still billed as if they are allocated a full 128 MB of memory.
38
38
@@ -49,25 +49,25 @@ The [Durable Objects Storage API](/durable-objects/api/storage-api/) is only acc
<sup>1</sup> Rows read and rows written included limits and rates match [D1 pricing](/d1/platform/pricing/), Cloudflare's serverless SQL database.
63
63
64
64
<sup>2</sup> Key-value methods like `get()`, `put()`, `delete()`, or `list()` store and query data in a hidden SQLite table and are billed as rows read and rows written.
65
65
66
-
<sup>3</sup> Each `setAlarm()` is billed as a single row written.
66
+
<sup>3</sup> Each `setAlarm()` is billed as a single row written.
67
67
68
-
<sup>4</sup> Deletes are counted as rows written.
68
+
<sup>4</sup> Deletes are counted as rows written.
69
69
70
-
<sup>5</sup> Durable Objects will be billed for stored data until the [data is removed](/durable-objects/best-practices/access-durable-objects-storage/#remove-a-durable-objects-storage). Once the data is removed, the object will be cleaned up automatically by the system.
70
+
<sup>5</sup> Durable Objects will be billed for stored data until the [data is removed](/durable-objects/best-practices/access-durable-objects-storage/#remove-a-durable-objects-storage). Once the data is removed, the object will be cleaned up automatically by the system.
71
71
72
72
</Details>
73
73
@@ -85,14 +85,14 @@ The [Durable Objects Storage API](/durable-objects/api/storage-api/) is only acc
85
85
86
86
<sup>1</sup> A request unit is defined as 4 KB of data read or written. A request that writes or reads more than 4 KB will consume multiple units, for example, a 9 KB write will consume 3 write request units.
87
87
88
-
<sup>2</sup> List operations are billed by read request units, based on the amount of data examined. For example, a list request that returns a combined 80 KB of keys and values will be billed 20 read request units. A list request that does not return anything is billed for 1 read request unit.
88
+
<sup>2</sup> List operations are billed by read request units, based on the amount of data examined. For example, a list request that returns a combined 80 KB of keys and values will be billed 20 read request units. A list request that does not return anything is billed for 1 read request unit.
89
89
90
-
<sup>3</sup> Each `setAlarm` is billed as a single write request unit.
90
+
<sup>3</sup> Each `setAlarm` is billed as a single write request unit.
91
91
92
-
<sup>4</sup> Delete requests are unmetered. For example, deleting a 100 KB value will be charged one delete request.
92
+
<sup>4</sup> Delete requests are unmetered. For example, deleting a 100 KB value will be charged one delete request.
93
93
94
-
<sup>5</sup> Durable Objects will be billed for stored data until the data is removed. Once the data is removed, the object will be cleaned up automatically by the system.
94
+
<sup>5</sup> Durable Objects will be billed for stored data until the data is removed. Once the data is removed, the object will be cleaned up automatically by the system.
95
95
96
96
Requests that hit the [Durable Objects in-memory cache](/durable-objects/reference/in-memory-state/) or that use the [multi-key versions of `get()`/`put()`/`delete()` methods](/durable-objects/api/storage-api/) are billed the same as if they were a normal, individual request for each key.
0 commit comments