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
@@ -34,57 +34,53 @@ These examples exclude the costs for the Workers calling the Durable Objects.
34
34
35
35
If a single Durable Object was called by a Worker 1.5 million times, and was active for 1,000,000 seconds in the month, the estimated cost in a month would be:
36
36
37
-
Total = \~$0.08 USD + Minimum {props.five}/mo usage = {props.five}.08
37
+
Total = ~$0.08 USD + Minimum $5/mo usage = $5.08
38
38
39
-
* (1.5 million requests - included 1 million requests) x $0.15 / 1,000,000 = $0.075
- (128,000 GB-s - included 400,000 GB-s) x $12.50 / 1,000,000 = $0.00
42
42
43
43
#### Example 2
44
44
45
45
If 100 Durable Objects each had 100 WebSocket connections established to each of them which sent approximately one message a minute for a month, the estimated cost in a month would be, if the messages overlapped so that the Objects were actually active for half the month:
- (16,588,800 GB-s - included 400,000 GB-s) x $12.50 / 1,000,000 = $202.36
55
55
56
56
#### Example 3
57
57
58
58
If 100 Durable Objects each had a single WebSocket connection established to each of them, which sent one message a second for a month, and the messages overlapped so that the Objects were actually active for the entire month, the estimated cost in a month would be:
- (33,177,600 GB-s - included 400,000 GB-s) x $12.50 / 1,000,000 = $409.72
68
68
69
69
## Transactional Storage API
70
70
71
71
The [Transactional Storage API](/durable-objects/api/transactional-storage-api/) is only accessible from within Durable Objects. Durable Objects do not have to use the Transactional Storage API, but if your code does call methods on `state.storage`, it will incur the following additional charges:
1. 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 three write request units.
81
+
2. 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 one read request unit.
82
+
3. Delete requests are unmetered. For example, deleting a 100 KB value will be charged one delete request.
83
+
4. 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.
84
+
5. Each alarm write is billed as a single write request unit.
82
85
83
-
84
-
1. 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 three write request units.
85
-
2. 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 one read request unit.
86
-
3. Delete requests are unmetered. For example, deleting a 100 KB value will be charged one delete request.
87
-
4. 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.
88
-
5. Each alarm write is billed as a single write request unit.
89
-
90
-
Requests that hit the Durable Objects in-memory cache or that use the [multi-key versions of `get()`/`put()`/`delete()` methods](/durable-objects/api/transactional-storage-api/) are billed the same as if they were a normal, individual request for each key.
86
+
Requests that hit the Durable Objects in-memory cache or that use the [multi-key versions of `get()`/`put()`/`delete()` methods](/durable-objects/api/transactional-storage-api/) are billed the same as if they were a normal, individual request for each key.
| Rows read | 5 million / day | First 25 billion / month included + $0.001 / million rows |
11
-
| Rows written | 100,000 / day | First 50 million / month included + {props.one}.00 / million rows |
12
-
| Storage (per GB stored) | 5 GB (total) | First 5 GB included + $0.75 / GB-mo |
13
12
14
-
### Definitions
15
13
14
+
### Definitions
16
15
1. Rows read measure how many rows a query reads (scans), regardless of the size of each row. For example, if you have a table with 5000 rows and run a `SELECT * FROM table` as a full table scan, this would count as 5,000 rows read. A query that filters on an [unindexed column](/d1/build-with-d1/use-indexes/) may return fewer rows to your Worker, but is still required to read (scan) more rows to determine which subset to return.
17
16
2. Rows written measure how many rows were written to D1 database. A query that `INSERT` 10 rows into a `users` table would count as 10 rows written.
18
17
3. Row size or the number of columns in a row does not impact how rows are counted. A row that is 1 KB and a row that is 100 KB both count as one row.
@@ -21,3 +20,4 @@ import { Markdown } from "~/components"
21
20
6. Storage is based on gigabytes stored per month, and is based on the sum of all databases in your account. Tables and indexes both count towards storage consumed.
22
21
7. Free limits reset daily at 00:00 UTC. Monthly included limits reset based on your monthly subscription renewal date, which is determined by the day you first subscribed.
23
22
8. There are no data transfer (egress) or throughput (bandwidth) charges for data accessed from D1.
23
+
8. There are no data transfer (egress) or throughput (bandwidth) charges for data accessed from D1.
<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/#call-rpc-methods) on a [Durable Objects stub](/durable-objects/best-practices/create-durable-object-stubs-and-send-requests/#get-a-durable-object-stub) is its own RPC session and therefore a single billed request.
| List requests | 1,000 / day | 1 million/month, + $5.00/million |
16
16
| Stored data | 1 GB | 1 GB, + $0.50/ GB-month |
17
17
18
-
<sup>1</sup> The Workers Free plan includes limited Workers KV usage. All limits reset daily at 00:00 UTC. If you exceed any one of these limits, further operations of that type will fail with an error.
18
+
<sup>1</sup> The Workers Free plan includes limited Workers KV usage. All limits reset daily at 00:00 UTC. If you exceed any one of these limits, further operations of that type will fail with an error.
Copy file name to clipboardExpand all lines: src/content/partials/workers/transactional_storage_api_pricing.mdx
+2-4Lines changed: 2 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,17 +3,15 @@
3
3
4
4
---
5
5
6
-
import { Markdown } from"~/components"
7
-
8
6
The Durable Objects [Transactional Storage API](/durable-objects/api/transactional-storage-api) is only accessible from within Durable Objects.
9
7
10
8
Durable Objects do not have to use the Transactional Storage API, but if your code does call methods on `state.storage`, it will incur the following additional charges:
<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.
|**Total queried vector dimensions**| First 50 million queried vector dimensions / month included + $0.040 per million | 30 million queried vector dimensions / month |
11
-
|**Total stored vector dimensions**| First 10 million stored vector dimensions + $0.040 per million | 5 million stored vector dimensions |
|**Total queried vector dimensions**| First 50 million queried vector dimensions / month included + $0.040 per million | 30 million queried vector dimensions / month |
9
+
|**Total stored vector dimensions**| First 10 million stored vector dimensions + $0.040 per million | 5 million stored vector dimensions |
12
10
13
11
<sup>1</sup> Vectorize will be available to developers on the Workers Free plan in the future.
14
-
15
12
### Calculating vector dimensions
16
13
17
14
To calculate your potential usage, calculate the sum of your stored + queried vectors, multiply by the dimension size, and multiply by the unit price (divided by 1 million). The formula is defined as `(stored vectors + queried vectors) * dimensions * ($0.040 / 1000000)`
18
15
19
16
* For example, inserting 10,000 vectors of 768 dimensions each, and querying those 1,000 times per day (30,000 times per month) would be calculated as `(30000 * 768) = 23,040,000` queried dimensions and `(10000 * 768) = 7,680,000` stored dimensions (within the included monthly allocation)
20
-
* Separately, and excluding the included monthly allocation, this would be calculated as `(30,000+10,000) * 768 * ($0.040 / 1,000,000)` and sum to {props.one}.23 per month.
17
+
* Separately, and excluding the included monthly allocation, this would be calculated as `(30,000+10,000) * 768 * ($0.040 / 1,000,000)` and sum to $1.23 per month.
0 commit comments