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/changelog/durable-objects/2025-04-07-durable-objects-free-tier.mdx
+35-4Lines changed: 35 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,15 +4,46 @@ description: Durable Objects now available on Workers Free plan.
4
4
products:
5
5
- durable-objects
6
6
- workers
7
-
date: 2025-04-07T13:00:00Z
7
+
date: 2025-04-07T06:00:00Z
8
8
---
9
9
10
-
Durable Objects can now be used with zero commitment on the [Workers Free plan](/workers/platform/pricing/) allowing you to build AI agents with [Agents SDK](/agents), collaboration tools, or real-time applications like chat or multiplayer games.
10
+
Durable Objects can now be used with zero commitment on the [Workers Free plan](/workers/platform/pricing/) allowing you to build AI agents with [Agents SDK](/agents), collaboration tools, and real-time applications like chat or multiplayer games.
11
11
12
-
Durable Objects let you build stateful, serverless applications with millions of tiny coordination instances that run your application code alongside, in the same thread!, as your durable storage. Each Durable Object can access its own SQLite database through a [Storage API](/durable-objects/best-practices/access-durable-objects-storage/).
12
+
Durable Objects let you build stateful, serverless applications with millions of tiny coordination instances that run your application code alongside, in the same thread!, as your durable storage. Each Durable Object can access its own SQLite database through a [Storage API](/durable-objects/best-practices/access-durable-objects-storage/). A Durable Object class is defined in a Worker script encapulsating the Durable Object's behavior when accessed from a Worker. To try the code below, click the button:
13
+
14
+
[](https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/templates/tree/staging/TODO)
// Every unique ID refers to an individual instance of the Durable Object class
32
+
constid=env.MY_DURABLE_OBJECT.idFromName("foo");
33
+
34
+
// A stub is a client used to invoke methods on the Durable Object
35
+
conststub=env.MY_DURABLE_OBJECT.get(id);
36
+
37
+
// Methods on the Durable Object are invoked via the stub
38
+
constresponse=awaitstub.sayHello("world");
39
+
40
+
return response;
41
+
},
42
+
};
43
+
```
13
44
14
45
Free plan [limits](/durable-objects/platform/pricing/) apply to Durable Objects compute and storage usage. Limits allow developers to build real-world applications, with every Worker request able to call a Durable Object on the free plan.
Copy file name to clipboardExpand all lines: src/content/changelog/durable-objects/2025-04-07-sqlite-in-durable-objects-ga.mdx
+20-3Lines changed: 20 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,28 @@ description: SQLite-bakced Durable Objects are generally available.
4
4
products:
5
5
- durable-objects
6
6
- workers
7
-
date: 2025-04-07T13:00:00Z
7
+
date: 2025-04-07T06:00:00Z
8
8
---
9
9
10
-
SQLite in Durable Objects is now generally available (GA). Since the [beta announcement](https://blog.cloudflare.com/sqlite-in-durable-objects/) in September 2024, we've added feature parity and robustness for the SQLite storage backed compared to the key-value (KV) storage backend that Durable Objects had had before then.
10
+
SQLite in Durable Objects is now generally available (GA). Since the [public beta](https://blog.cloudflare.com/sqlite-in-durable-objects/) in September 2024, we've added feature parity and robustness for the SQLite storage backed compared to the preexisting key-value (KV) storage backend for Durable Objects.
11
11
12
-
SQLite-backed Durable Objects are recommended for all new Durable Object classes, using `new_sqlite_classes`[wrangler configuration](/durable-objects/best-practices/access-durable-objects-storage/#create-sqlite-backed-durable-object-class). Only SQLite-backed Durable Objects have access to Storage API's [SQL](/durable-objects/api/storage-api/#sql-api) and [point-in-time recovery](/durable-objects/api/storage-api/#pitr-point-in-time-recovery-api) methods, which provide flexible, relational data modeling, SQL access, and better data management.
12
+
SQLite-backed Durable Objects are recommended for all new Durable Object classes, using `new_sqlite_classes`[wrangler configuration](/durable-objects/best-practices/access-durable-objects-storage/#create-sqlite-backed-durable-object-class). Only SQLite-backed Durable Objects have access to Storage API's [SQL](/durable-objects/api/storage-api/#sql-api) and [point-in-time recovery](/durable-objects/api/storage-api/#pitr-point-in-time-recovery-api) methods, which provide relational data modeling, SQL querying, and better data management.
13
+
14
+
```js
15
+
exportclassMyDurableObjectextendsDurableObject {
16
+
sql: SqlStorage
17
+
constructor(ctx:DurableObjectState, env:Env) {
18
+
super(ctx, env);
19
+
this.sql=ctx.storage.sql;
20
+
}
21
+
22
+
asyncsayHello() {
23
+
let result =this.sql
24
+
.exec("SELECT 'Hello, World!' as greeting")
25
+
.one();
26
+
returnresult.greeting;
27
+
}
28
+
}
29
+
```
13
30
14
31
KV-backend Durable Objects remain for backwards compatibility, and a migration path from key-value storage to SQL storage for existing Durable Object classes will be offered in the future.
0 commit comments