Skip to content

Commit b7691a6

Browse files
committed
Updating pricing table, removing beta SQLite DO
notes from some pages, WIP.
1 parent 8db2218 commit b7691a6

File tree

12 files changed

+84
-107
lines changed

12 files changed

+84
-107
lines changed

src/content/docs/durable-objects/api/sql-storage.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export class MyDurableObject extends DurableObject {
3333
}
3434
```
3535

36-
:::note[SQLite in Durable Objects Beta]
36+
:::note[SQLite in Durable Objects]
3737
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.
3838
:::
3939

@@ -161,7 +161,7 @@ Providing a type parameter does _not_ validate that the query result matches you
161161

162162
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`.
163163

164-
For example,
164+
For example,
165165

166166
```ts
167167
type User = {

src/content/docs/durable-objects/api/storage-api.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ export class Counter extends DurableObject {
5151

5252
## Methods
5353

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).
5756

57+
Otherwise, a Durable Object class has a key-value storage backend.
5858
:::
5959

6060
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
263263

264264
- [Durable Objects: Easy, Fast, Correct – Choose Three](https://blog.cloudflare.com/durable-objects-easy-fast-correct-choose-three/)
265265
- [WebSockets API](/durable-objects/best-practices/websockets/)
266-
```
266+

src/content/docs/durable-objects/get-started/tutorial-with-sql-api.mdx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ This guide will instruct you through:
1616

1717
If you wish to learn more about Durable Objects, refer to [What are Durable Objects?](/durable-objects/what-are-durable-objects/).
1818

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.
22-
23-
:::
24-
2519
## Prerequisites
2620

2721
<Render file="prereqs" product="workers" />

src/content/docs/durable-objects/index.mdx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,6 @@ For more information, refer to the full [What are Durable Objects?](/durable-obj
3131

3232
<LinkButton href="/durable-objects/get-started/tutorial/">Get started</LinkButton>
3333

34-
:::note[SQLite in Durable Objects Beta]
35-
36-
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).
39-
40-
:::
41-
4234
***
4335

4436
## Features

src/content/docs/durable-objects/platform/pricing.mdx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,20 @@ sidebar:
88

99
import { Render } from "~/components"
1010

11-
## Billing metrics
11+
Durable Objects can incur two types of billing: compute and storage.
1212

13-
<Render file="durable_objects_pricing" product="durable-objects" />
13+
## Compute billing
1414

15-
## Durable Objects billing examples
15+
<Render file="durable-objects-pricing" product="durable-objects" />
16+
17+
### Compute billing examples
1618

1719
These examples exclude the costs for the Workers calling the Durable Objects. When modelling the costs of a Durable Object, note that:
1820

1921
* Inactive objects receiving no requests do not incur any duration charges.
2022
* 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.
2123

22-
### Example 1
24+
#### Example 1
2325

2426
This example represents a simple Durable Object used as a co-ordination service invoked via HTTP.
2527

@@ -39,7 +41,7 @@ In this scenario, the estimated monthly cost would be calculated as:
3941

4042
**Estimated total**: \~$0.075 (requests) + $0.00 (compute duration) + minimum $5/mo usage = $5.08 per month
4143

42-
### Example 2
44+
#### Example 2
4345

4446
This example represents a moderately trafficked Durable Objects based application using WebSockets to broadcast game, chat or real-time user state across connected clients:
4547

@@ -63,7 +65,7 @@ In this scenario, the estimated monthly cost would be calculated as:
6365

6466
**Estimated total**: $0.41 (requests) + $133.24 (compute duration) + minimum $5/mo usage = $138.65 per month.
6567

66-
### Example 3
68+
#### Example 3
6769

6870
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.
6971

@@ -87,7 +89,7 @@ In this scenario, the estimated monthly cost would be calculated as:
8789

8890
**Estimated total**: $1.79 (requests) + $409.72 (compute duration) + minimum $5/mo usage = $416.51 per month
8991

90-
### Example 4
92+
#### Example 4
9193

9294
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:
9395

@@ -117,7 +119,7 @@ In this scenario, the estimated monthly cost would be calculated as:
117119

118120
## Storage API billing
119121

120-
<Render file="storage_api_pricing" product="workers" />
122+
<Render file="do_storage_api_pricing" product="workers" />
121123

122124
## Frequently Asked Questions
123125

src/content/docs/durable-objects/reference/durable-objects-migrations.mdx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -272,12 +272,6 @@ You can rename the `DurableObjectExample` class to `UpdatedName` and delete an o
272272

273273
## Enable SQLite storage backend on new Durable Object class migration
274274

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-
281275
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:
282276

283277
<WranglerConfig>

src/content/docs/workers/platform/pricing.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ To learn more about Queues pricing and review billing examples, refer to [Queues
162162

163163
## D1
164164

165-
D1 is available on both the [Workers Free](#workers) and [Workers Paid](#workers) plans.
165+
D1 is available on both the Workers Free and Workers Paid plans.
166166

167167
<Render file="d1-pricing" />
168168

@@ -174,7 +174,7 @@ Refer to [D1 Pricing](/d1/platform/pricing/) to learn more about how D1 is bille
174174

175175
## Durable Objects
176176

177-
Durable Objects are available on both the [Workers Free](#workers) and [Workers Paid](#workers) plans.
177+
Durable Objects are available on both the Workers Free and Workers Paid plans.
178178

179179
<Render file="durable_objects_pricing" product="durable-objects" />
180180

@@ -186,7 +186,7 @@ For more information and [examples of Durable Objects billing](/durable-objects/
186186

187187
## Durable Objects Storage API
188188

189-
<Render file="storage_api_pricing" />
189+
<Render file="do_storage_api_pricing" />
190190

191191
## Vectorize
192192

src/content/docs/workers/platform/storage-options.mdx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -207,12 +207,6 @@ To get started with Vectorize:
207207

208208
<Render file="durable-objects-vs-d1" product="durable-objects" />
209209

210-
:::note[SQLite in Durable Objects Beta]
211-
212-
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.
213-
214-
:::
215-
216210
<Render file="kv-vs-d1" product="kv" />
217211

218212
## D1 vs Hyperdrive

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

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22
{}
33
---
44

5-
import { Markdown, GlossaryTooltip } from "~/components";
5+
import { Markdown, GlossaryTooltip, Details } from "~/components";
66

7-
[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 <GlossaryTooltip term="request context"> request context</GlossaryTooltip>).
7+
Durable Objects are billed only while the Durable Object is active (includes the <GlossaryTooltip term="request context"> request context</GlossaryTooltip>).
88

9-
| | Paid plan |
10-
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
11-
| Requests | 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> | 400,000 GB-s, + $12.50/million GB-s<sup>4,5</sup> |
9+
| | Free plan | Paid plan |
10+
| -------------------- | ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
11+
| 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+
<Details header="Footnotes" open={true}>
1315

1416
<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.
1517

@@ -29,3 +31,5 @@ await durableObjectStub.cat(); // billed as a request
2931
<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.
3032

3133
<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.
34+
35+
</Details>

src/content/partials/durable-objects/durable-objects-vs-d1.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ Durable Objects require a bit more effort, but in return, give you more flexibil
2222

2323
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.
2424

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

Comments
 (0)