Skip to content

Commit bad9aed

Browse files
joshthowardOxyjun
authored andcommitted
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]>
1 parent 9a04644 commit bad9aed

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

src/content/partials/durable-objects/durable-objects-pricing.mdx

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ params:
33
- product
44
---
55

6-
import {Render, Markdown, GlossaryTooltip, Details, AnchorHeading } from "~/components";
6+
import { Render, Markdown, GlossaryTooltip, Details, AnchorHeading } from "~/components";
77

88
{ props.product === "durable-objects" && <><AnchorHeading title="Compute billing" depth={2}/></> }
99
{ props.product === "workers" && <><AnchorHeading title="Compute billing" depth={3}/></> }
1010

1111
Durable Objects are billed only while the Durable Object is active (includes the <GlossaryTooltip term="request context"> request context</GlossaryTooltip>).
1212

13-
| | Free plan | Paid plan |
14-
| -------------------- | ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
15-
| Requests | 100,000 / day | 1 million, + $0.15/million<br/> Includes HTTP requests, RPC sessions<sup>1</sup>, WebSocket messages<sup>2</sup>, and alarm invocations |
16-
| Duration<sup>3</sup> | 13,000 GB-s / day | 400,000 GB-s, + $12.50/million GB-s<sup>4,5</sup> |
13+
| | Free plan | Paid plan |
14+
| -------------------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
15+
| Requests | 100,000 / day | 1 million, + $0.15/million<br/> Includes HTTP requests, RPC sessions<sup>1</sup>, WebSocket messages<sup>2</sup>, and alarm invocations |
16+
| Duration<sup>3</sup> | 13,000 GB-s / day | 400,000 GB-s, + $12.50/million GB-s<sup>4,5</sup> |
1717

1818
<Details header="Footnotes" open={true}>
1919

@@ -32,7 +32,7 @@ await durableObjectStub.cat(); // billed as a request
3232

3333
<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.
3434

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

3737
<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.
3838

@@ -49,25 +49,25 @@ The [Durable Objects Storage API](/durable-objects/api/storage-api/) is only acc
4949
{ props.product === "durable-objects" && <><AnchorHeading title="SQLite storage backend" depth={3}/></> }
5050
{ props.product === "workers" && <><AnchorHeading title="SQLite storage backend" depth={4}/></> }
5151

52-
<Render file="do-sqlite-storage-no-bill-note" product="durable-objects"/>
52+
<Render file="do-sqlite-storage-no-bill-note" product="durable-objects" />
5353

54-
| | Workers Free plan | Workers Paid plan |
55-
| ----------------------------- | ------------------------- | --------------------------------------------------------- |
56-
| Rows reads <sup>1,2</sup> | 5 million / day | First 25 billion / month included + $0.001 / million rows |
57-
| Rows written <sup>1,2,3,4</sup> | 100,000 / day | First 50 million / month included + $1.00 / million rows |
58-
| SQL Stored data <sup>5</sup> | 5 GB (total) | 5 GB-month, + $0.20/ GB-month |
54+
| | Workers Free plan | Workers Paid plan |
55+
| ------------------------------- | ----------------- | --------------------------------------------------------- |
56+
| Rows reads <sup>1,2</sup> | 5 million / day | First 25 billion / month included + $0.001 / million rows |
57+
| Rows written <sup>1,2,3,4</sup> | 100,000 / day | First 50 million / month included + $1.00 / million rows |
58+
| SQL Stored data <sup>5</sup> | 5 GB (total) | 5 GB-month, + $0.20/ GB-month |
5959

6060
<Details header="Footnotes" open={true}>
6161

6262
<sup>1</sup> Rows read and rows written included limits and rates match [D1 pricing](/d1/platform/pricing/), Cloudflare's serverless SQL database.
6363

6464
<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.
6565

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

68-
<sup>4</sup> Deletes are counted as rows written.
68+
<sup>4</sup> Deletes are counted as rows written.
6969

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

7272
</Details>
7373

@@ -85,14 +85,14 @@ The [Durable Objects Storage API](/durable-objects/api/storage-api/) is only acc
8585

8686
<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.
8787

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

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

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

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

9696
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.
9797

98-
</Details>
98+
</Details>

0 commit comments

Comments
 (0)