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
Copy file name to clipboardExpand all lines: src/content/docs/durable-objects/api/sql-storage.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ export class MyDurableObject extends DurableObject {
33
33
}
34
34
```
35
35
36
-
:::note[SQLite in Durable Objects Beta]
36
+
:::note[SQLite in Durable Objects]
37
37
SQL API methods accessed with `ctx.storage.sql` are only allowed on [Durable Object classes with SQLite storage backend](/durable-objects/reference/durable-objects-migrations/#enable-sqlite-storage-backend-on-new-durable-object-class-migration) and will return an error if called on Durable Object classes with a key-value storage backend.
38
38
:::
39
39
@@ -161,7 +161,7 @@ Providing a type parameter does _not_ validate that the query result matches you
161
161
162
162
Your type must conform to the shape of a TypeScript [Record](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type) type representing the name (`string`) of the column and the type of the column. The column type must be a valid `SqlStorageValue`: one of `ArrayBuffer | string | number | null`.
Copy file name to clipboardExpand all lines: src/content/docs/durable-objects/api/storage-api.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,10 +51,10 @@ export class Counter extends DurableObject {
51
51
52
52
## Methods
53
53
54
-
:::note[SQLite in Durable Objects Beta]
55
-
56
-
The new beta version of Durable Objects is available where each Durable Object has a private, embedded SQLite database. When deploying a new Durable Object class, users can [opt-in to a SQLite storage backend](/durable-objects/best-practices/access-durable-objects-storage/#sqlite-storage-backend) to access the new [SQL API](/durable-objects/api/sql-storage/#exec). Otherwise, a Durable Object class has a key-value storage backend.
54
+
:::note[SQLite in Durable Objects]
55
+
SQLite-backed Durable Objects can have a private, embedded SQLite database. When deploying a new Durable Object class, users can [use a SQLite storage backend](/durable-objects/best-practices/access-durable-objects-storage/#sqlite-storage-backend) to access the [SQL API](/durable-objects/api/sql-storage/#exec).
57
56
57
+
Otherwise, a Durable Object class has a key-value storage backend.
58
58
:::
59
59
60
60
The Durable Object Storage API comes with several methods, including key-value (KV) API, SQL API, and point-in-time-recovery (PITR) API.
@@ -263,4 +263,4 @@ The `put()` method returns a `Promise`, but most applications can discard this p
Copy file name to clipboardExpand all lines: src/content/docs/durable-objects/get-started/tutorial-with-sql-api.mdx
-6Lines changed: 0 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,12 +16,6 @@ This guide will instruct you through:
16
16
17
17
If you wish to learn more about Durable Objects, refer to [What are Durable Objects?](/durable-objects/what-are-durable-objects/).
18
18
19
-
:::note[SQLite in Durable Objects Beta]
20
-
21
-
The new beta version of Durable Objects is available where each Durable Object has a private, embedded SQLite database. When deploying a new Durable Object class, users can [opt-in to a SQLite storage backend](/durable-objects/best-practices/access-durable-objects-storage/#sqlite-storage-backend) in order to access new [SQL API](/durable-objects/api/sql-storage/#exec), part of Durable Objects Storage API.
The new beta version of Durable Objects is available where each Durable Object has a private, embedded SQLite database. When deploying a new Durable Object class, users can [opt-in to a SQLite storage backend](/durable-objects/best-practices/access-durable-objects-storage/#sqlite-storage-backend) in order to access new [SQL API](/durable-objects/api/sql-storage/#exec) and [point-in-time-recovery API](/durable-objects/api/sql-storage/#point-in-time-recovery), part of Durable Objects Storage API.
37
-
38
-
Storage API billing is not enabled for Durable Object classes using SQLite storage backend. SQLite-backed Durable Objects will incur [charges for requests and duration](/durable-objects/platform/pricing/#billing-metrics). We plan to enable Storage API billing for Durable Objects using SQLite storage backend in the first half of 2025 after advance notice with the following [pricing](/durable-objects/platform/pricing/#sqlite-storage-backend).
These examples exclude the costs for the Workers calling the Durable Objects. When modelling the costs of a Durable Object, note that:
18
20
19
21
* Inactive objects receiving no requests do not incur any duration charges.
20
22
* The [WebSocket Hibernation API](/durable-objects/best-practices/websockets/#websocket-hibernation-api) can dramatically reduce duration-related charges for Durable Objects communicating with clients over the WebSocket protocol, especially if messages are only transmitted occasionally at sparse intervals.
21
23
22
-
### Example 1
24
+
####Example 1
23
25
24
26
This example represents a simple Durable Object used as a co-ordination service invoked via HTTP.
25
27
@@ -39,7 +41,7 @@ In this scenario, the estimated monthly cost would be calculated as:
This example represents a moderately trafficked Durable Objects based application using WebSockets to broadcast game, chat or real-time user state across connected clients:
45
47
@@ -63,7 +65,7 @@ In this scenario, the estimated monthly cost would be calculated as:
This example represents a horizontally scaled Durable Objects based application using WebSockets to communicate user-specific state to a single client connected to each Durable Object.
69
71
@@ -87,7 +89,7 @@ In this scenario, the estimated monthly cost would be calculated as:
This example represents a moderately trafficked Durable Objects based application using WebSocket Hibernation to broadcast game, chat or real-time user state across connected clients:
93
95
@@ -117,7 +119,7 @@ In this scenario, the estimated monthly cost would be calculated as:
Copy file name to clipboardExpand all lines: src/content/docs/durable-objects/reference/durable-objects-migrations.mdx
-6Lines changed: 0 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -272,12 +272,6 @@ You can rename the `DurableObjectExample` class to `UpdatedName` and delete an o
272
272
273
273
## Enable SQLite storage backend on new Durable Object class migration
274
274
275
-
:::note[SQLite in Durable Objects Beta]
276
-
277
-
The new beta version of Durable Objects is available where each Durable Object has a private, embedded SQLite database. When deploying a new Durable Object class, users can opt-in to a SQLite storage backend in order to access new [SQL API](/durable-objects/api/sql-storage/#exec). Otherwise, a Durable Object class has a key-value storage backend.
278
-
279
-
:::
280
-
281
275
To allow a new Durable Object class to use a SQLite storage backend, use `new_sqlite_classes` on the migration in your Worker's `wrangler` configuration file:
The new beta version of Durable Objects is available where each Durable Object has a private, embedded SQLite database. When deploying a new Durable Object class, users can opt-in to using SQL storage in order to access [Storage SQL API methods](/durable-objects/api/sql-storage/#exec). Otherwise, a Durable Object class has the standard, private key-value storage.
[Durable Objects](/durable-objects/) are available on both the Workers Free and [Workers Paid plans](/workers/platform/pricing/#workers), and are billed while the Durable Object is active (including the <GlossaryTooltipterm="request context"> request context</GlossaryTooltip>).
7
+
Durable Objects are billed only while the Durable Object is active (includes the <GlossaryTooltipterm="request context"> request context</GlossaryTooltip>).
| Requests | Capped at 100,000 per day | 1 million, + $0.15/million<br/> Includes HTTP requests, RPC sessions<sup>1</sup>, WebSocket messages<sup>2</sup>, and alarm invocations |
12
+
| Duration<sup>3</sup> | Capped at <br/> 13,000 GB-s per day | 400,000 GB-s, + $12.50/million GB-s<sup>4,5</sup> |
13
+
14
+
<Detailsheader="Footnotes"open={true}>
13
15
14
16
<sup>1</sup> Each [RPC session](/workers/runtime-apis/rpc/lifecycle/) is billed as one request to your Durable Object. Every [RPC method call](/durable-objects/best-practices/create-durable-object-stubs-and-send-requests/) on a [Durable Objects stub](/durable-objects/) is its own RPC session and therefore a single billed request.
15
17
@@ -29,3 +31,5 @@ await durableObjectStub.cat(); // billed as a request
29
31
<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 at least 60 seconds after the last client disconnects. 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.
30
32
31
33
<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.
Copy file name to clipboardExpand all lines: src/content/partials/durable-objects/durable-objects-vs-d1.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,4 +22,4 @@ Durable Objects require a bit more effort, but in return, give you more flexibil
22
22
23
23
With SQLite in Durable Objects, you may also need to build some of your own database tooling that comes out-of-the-box with D1.
24
24
25
-
SQL query pricing and limits are intended to be identical between D1 ([pricing](/d1/platform/pricing/), [limits](/d1/platform/limits/)) and SQLite in Durable Objects ([pricing](/durable-objects/platform/pricing/#sql-storage-billing), [limits](/durable-objects/platform/limits/)). During SQLite in Durable Objects beta, Storage per Durable Object is 1GB, which will be raised to mirror storage per D1 database (10GB) by general availability.
25
+
SQL query pricing and limits are intended to be identical between D1 ([pricing](/d1/platform/pricing/), [limits](/d1/platform/limits/)) and SQLite in Durable Objects ([pricing](/durable-objects/platform/pricing/#sql-storage-billing), [limits](/durable-objects/platform/limits/)).
0 commit comments